Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ class DocumentTableView extends React.Component<DocumentTableViewProps> {
'document-table-view-container',
this.props.darkMode && 'document-table-view-container-darkmode'
)}
data-testid="document-list"
>
<div className={cx('ag-parent', this.props.className)}>
<BreadcrumbComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const VirtualizedDocumentJsonView: React.FC<
renderItem={renderItem}
estimateItemInitialHeight={estimateDocumentInitialHeight}
rowGap={spacing[200]}
dataTestId="document-list"
itemDataTestId="document-json-item"
// Keeping the overscanCount low here helps us avoid scroll dangling
// issues
Expand Down
10 changes: 10 additions & 0 deletions packages/compass-e2e-tests/helpers/commands/run-find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,15 @@ export async function runFind(
const resultId = await browser.getQueryId(tabName);
return resultId !== initialResultId;
});

if (
tabName === 'Documents' &&
(await browser.$(Selectors.DocumentList).isDisplayed())
) {
// Wait for animations to finish on the document page.
// Because we're virtualizing the list on crud, the query results may
// change after the resultId has changed.
await browser.waitForAnimations(Selectors.DocumentList);
}
}
}
2 changes: 2 additions & 0 deletions packages/compass-e2e-tests/helpers/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ export const ImportFileOption =
export const DocumentListEntry = '[data-testid="editable-document"]';
export const DocumentJSONEntry = '[data-testid="document-json-item"]';
export const DocumentExpandButton = '[data-testid="expand-document-button"]';
export const DocumentList =
'[data-testid="document-list"] [data-testid="virtual-list-inner-container"]';
export const SelectJSONView = '[data-testid="toolbar-view-json"]';
export const SelectTableView = '[data-testid="toolbar-view-table"]';
export const SelectListView = '[data-testid="toolbar-view-list"]';
Expand Down
Loading