Skip to content

Commit 9a24b4a

Browse files
committed
fixup: only run when the docs list is displayed
1 parent 4de4d0f commit 9a24b4a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

packages/compass-e2e-tests/helpers/commands/run-find.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ export async function runFind(
2727
return resultId !== initialResultId;
2828
});
2929

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') {
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.
3437
await browser.waitForAnimations(Selectors.DocumentList);
35-
} else if (tabName === 'Schema') {
36-
/* not virtualized */
37-
} else {
38-
throw new Error(`Unknown tab name ${tabName}`);
3938
}
4039
}
4140
}

0 commit comments

Comments
 (0)