File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed
compass-crud/src/components
compass-e2e-tests/helpers Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1005,6 +1005,7 @@ class DocumentTableView extends React.Component<DocumentTableViewProps> {
10051005 'document-table-view-container' ,
10061006 this . props . darkMode && 'document-table-view-container-darkmode'
10071007 ) }
1008+ data-testid = "document-list"
10081009 >
10091010 < div className = { cx ( 'ag-parent' , this . props . className ) } >
10101011 < BreadcrumbComponent
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ const VirtualizedDocumentJsonView: React.FC<
111111 renderItem = { renderItem }
112112 estimateItemInitialHeight = { estimateDocumentInitialHeight }
113113 rowGap = { spacing [ 200 ] }
114+ dataTestId = "document-list"
114115 itemDataTestId = "document-json-item"
115116 // Keeping the overscanCount low here helps us avoid scroll dangling
116117 // issues
Original file line number Diff line number Diff line change @@ -26,5 +26,16 @@ export async function runFind(
2626 const resultId = await browser . getQueryId ( tabName ) ;
2727 return resultId !== initialResultId ;
2828 } ) ;
29+
30+ // Wait for animations to finish on the documents or schema page.
31+ // Because we're virtualizing the list on crud, the query results may
32+ // change after the resultId has changed.
33+ if ( tabName === 'Documents' ) {
34+ await browser . waitForAnimations ( Selectors . DocumentList ) ;
35+ } else if ( tabName === 'Schema' ) {
36+ /* not virtualized */
37+ } else {
38+ throw new Error ( `Unknown tab name ${ tabName } ` ) ;
39+ }
2940 }
3041}
Original file line number Diff line number Diff line change @@ -603,6 +603,7 @@ export const ImportFileOption =
603603export const DocumentListEntry = '[data-testid="editable-document"]' ;
604604export const DocumentJSONEntry = '[data-testid="document-json-item"]' ;
605605export const DocumentExpandButton = '[data-testid="expand-document-button"]' ;
606+ export const DocumentList = '[data-testid="document-list"]' ;
606607export const SelectJSONView = '[data-testid="toolbar-view-json"]' ;
607608export const SelectTableView = '[data-testid="toolbar-view-table"]' ;
608609export const SelectListView = '[data-testid="toolbar-view-list"]' ;
You can’t perform that action at this time.
0 commit comments