We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 948a7be commit c96535fCopy full SHA for c96535f
packages/compass-e2e-tests/helpers/commands/wait-for-open-modal.ts
@@ -9,8 +9,19 @@ export async function waitForOpenModal(
9
): Promise<void> {
10
await browser.waitUntil(
11
async () => {
12
- const open = await browser.isModalOpen(selector);
13
- return reverse ? !open : open;
+ const modals = await browser.getOpenModals(selector);
+ if (reverse) {
14
+ return modals.length === 0;
15
+ } else {
16
+ for (const modal of modals) {
17
+ // Ensure any modals are interactable if open
18
+ await modal.waitForClickable({
19
+ timeout: 500,
20
+ timeoutMsg: 'Timeout waiting for open modal to become clickable',
21
+ });
22
+ }
23
+ return modals.length > 0;
24
25
},
26
{
27
timeout: 2_000,
0 commit comments