diff options
| author | Hank <hank@mullvad.net> | 2022-10-12 11:46:36 +0200 |
|---|---|---|
| committer | Hank <hank@mullvad.net> | 2022-10-17 07:49:47 +0200 |
| commit | 1be192541a8154849267feabb44fc80c6366958e (patch) | |
| tree | f01a93e64526e4e9f78705981f00511a1bfcf2da /gui/test | |
| parent | e49f1da6c1686ac4206b81789e8379b4aa7fba19 (diff) | |
| download | mullvadvpn-1be192541a8154849267feabb44fc80c6366958e.tar.xz mullvadvpn-1be192541a8154849267feabb44fc80c6366958e.zip | |
Wait for 'did-finish-load' when starting app for e2e testing
Diffstat (limited to 'gui/test')
| -rw-r--r-- | gui/test/e2e/utils.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/test/e2e/utils.ts b/gui/test/e2e/utils.ts index 0c68d47d49..d1ae6fa78a 100644 --- a/gui/test/e2e/utils.ts +++ b/gui/test/e2e/utils.ts @@ -15,6 +15,12 @@ export const startApp = async (mainPath: string): Promise<StartAppResponse> => { args: [mainPath], }); + await app.evaluate(({ webContents }) => { + return new Promise((resolve) => { + webContents.getAllWebContents()[0].on('did-finish-load', resolve); + }); + }); + const page = await app.firstWindow(); page.on('pageerror', (error) => { |
