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 @@ -1004,6 +1004,7 @@ class DocumentTableView extends React.Component<DocumentTableViewProps> {
10041004 'document-table-view-container' ,
10051005 this . props . darkMode && 'document-table-view-container-darkmode'
10061006 ) }
1007+ data-testid = "document-list"
10071008 >
10081009 < div className = { cx ( 'ag-parent' , this . props . className ) } >
10091010 < 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,15 @@ export async function runFind(
2626 const resultId = await browser . getQueryId ( tabName ) ;
2727 return resultId !== initialResultId ;
2828 } ) ;
29+
30+ if (
31+ tabName === 'Documents' &&
32+ ( await browser . $ ( Selectors . DocumentList ) . isDisplayed ( ) )
33+ ) {
34+ // Wait for animations to finish on the document page.
35+ // Because we're virtualizing the list on crud, the query results may
36+ // change after the resultId has changed.
37+ await browser . waitForAnimations ( Selectors . DocumentList ) ;
38+ }
2939 }
3040}
Original file line number Diff line number Diff line change @@ -603,6 +603,8 @@ 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 =
607+ '[data-testid="document-list"] [data-testid="virtual-list-inner-container"]' ;
606608export const SelectJSONView = '[data-testid="toolbar-view-json"]' ;
607609export const SelectTableView = '[data-testid="toolbar-view-table"]' ;
608610export const SelectListView = '[data-testid="toolbar-view-list"]' ;
You can’t perform that action at this time.
0 commit comments