Added more test cases and fix system partition key load issue (#2126)

* Added more test cases and fix system partition key load issue

* Fix unit tests and fix ci

* Updated test snapsho
This commit is contained in:
sunghyunkang1111
2025-04-30 15:18:11 -05:00
committed by GitHub
parent fe73d0a1c6
commit bb66deb3a4
11 changed files with 136 additions and 31 deletions

View File

@@ -193,6 +193,7 @@ export const InputDataList: FC<InputDataListProps> = ({
<>
<Input
id="filterInput"
data-test={"DocumentsTab/FilterInput"}
ref={inputRef}
type="text"
size="small"

View File

@@ -773,8 +773,11 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
[_collection, _partitionKey],
);
const partitionKeyPropertyHeaders: string[] = useMemo(
() => (partitionKey?.systemKey ? [] : _collection?.partitionKeyPropertyHeaders || partitionKey?.paths),
[_collection?.partitionKeyPropertyHeaders, partitionKey?.paths, partitionKey?.systemKey],
() =>
isPreferredApiMongoDB && partitionKey?.systemKey
? []
: _collection?.partitionKeyPropertyHeaders || partitionKey?.paths,
[_collection?.partitionKeyPropertyHeaders, partitionKey?.paths, partitionKey?.systemKey, isPreferredApiMongoDB],
);
let partitionKeyProperties = useMemo(() => {
return partitionKeyPropertyHeaders?.map((partitionKeyPropertyHeader) =>
@@ -2116,6 +2119,7 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
/>
<Button
appearance="primary"
data-test={"DocumentsTab/ApplyFilter"}
size="small"
onClick={() => {
if (isExecuting) {
@@ -2188,6 +2192,7 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
{tableItems.length > 0 && (
<a
className={styles.loadMore}
data-test={"DocumentsTab/LoadMore"}
role="button"
tabIndex={0}
onClick={() => loadNextPage(documentsIterator.iterator, false)}

View File

@@ -51,6 +51,7 @@ exports[`Documents tab (noSql API) when rendered should render the page 1`] = `
<Button
appearance="primary"
aria-label="Apply filter"
data-test="DocumentsTab/ApplyFilter"
disabled={false}
onClick={[Function]}
size="small"