Skip to content

Commit 1c914b0

Browse files
committed
test(e2e): ensure screen sharing button is loaded before proceeding
1 parent 7e114c4 commit 1c914b0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/__tests__/screen-sharing.test.e2e.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ describe('E2E :: Screen sharing test suite', () => {
4040
]
4141
}
4242
});
43-
// Wait for main window to ensure app is ready
44-
await electron.waitForWindow(
45-
({url, title}) => url.includes('chrome-tabs') || title === 'ElectronIM tabs');
46-
4743
// Wait for the test page window to appear
4844
testPageWindow = await electron.waitForWindow(
4945
({url}) => url === testServer.url || url.includes('localhost'),
5046
5000
5147
);
48+
// Ensure the screen sharing button is loaded
49+
await electron.waitForCondition(() => testPageWindow.locator('#share-screen-btn') !== null);
5250
});
5351

5452
afterAll(async () => {

0 commit comments

Comments
 (0)