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> {
1004
1004
'document-table-view-container' ,
1005
1005
this . props . darkMode && 'document-table-view-container-darkmode'
1006
1006
) }
1007
+ data-testid = "document-list"
1007
1008
>
1008
1009
< div className = { cx ( 'ag-parent' , this . props . className ) } >
1009
1010
< BreadcrumbComponent
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ const VirtualizedDocumentJsonView: React.FC<
111
111
renderItem = { renderItem }
112
112
estimateItemInitialHeight = { estimateDocumentInitialHeight }
113
113
rowGap = { spacing [ 200 ] }
114
+ dataTestId = "document-list"
114
115
itemDataTestId = "document-json-item"
115
116
// Keeping the overscanCount low here helps us avoid scroll dangling
116
117
// issues
Original file line number Diff line number Diff line change @@ -26,5 +26,15 @@ export async function runFind(
26
26
const resultId = await browser . getQueryId ( tabName ) ;
27
27
return resultId !== initialResultId ;
28
28
} ) ;
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
+ }
29
39
}
30
40
}
Original file line number Diff line number Diff line change @@ -603,6 +603,8 @@ export const ImportFileOption =
603
603
export const DocumentListEntry = '[data-testid="editable-document"]' ;
604
604
export const DocumentJSONEntry = '[data-testid="document-json-item"]' ;
605
605
export const DocumentExpandButton = '[data-testid="expand-document-button"]' ;
606
+ export const DocumentList =
607
+ '[data-testid="document-list"] [data-testid="virtual-list-inner-container"]' ;
606
608
export const SelectJSONView = '[data-testid="toolbar-view-json"]' ;
607
609
export const SelectTableView = '[data-testid="toolbar-view-table"]' ;
608
610
export const SelectListView = '[data-testid="toolbar-view-list"]' ;
You can’t perform that action at this time.
0 commit comments