diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-12-15 15:26:52 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-12-15 16:07:50 +0100 |
| commit | c9beb24e50a52b5941a731b6fb456e41ebcdc55e (patch) | |
| tree | dd346890d9bc75d66775868c6250e32b2d7f6f38 /gui/test | |
| parent | d7eed8700994e9fb8ef14663465bb5460790e837 (diff) | |
| download | mullvadvpn-c9beb24e50a52b5941a731b6fb456e41ebcdc55e.tar.xz mullvadvpn-c9beb24e50a52b5941a731b6fb456e41ebcdc55e.zip | |
Add test for successfull login from daemon
Diffstat (limited to 'gui/test')
| -rw-r--r-- | gui/test/e2e/installed/requires-input/login.spec.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gui/test/e2e/installed/requires-input/login.spec.ts b/gui/test/e2e/installed/requires-input/login.spec.ts new file mode 100644 index 0000000000..44ea19a970 --- /dev/null +++ b/gui/test/e2e/installed/requires-input/login.spec.ts @@ -0,0 +1,32 @@ +import { expect, test } from '@playwright/test'; +import { Page } from 'playwright'; +import { RoutePath } from '../../../../src/renderer/lib/routes'; +import { TestUtils } from '../../utils'; +import { assertDisconnected } from '../../shared/tunnel-state'; + +import { startInstalledApp } from '../installed-utils'; + +// This test expects the daemon to be logged out and then log in. + +let page: Page; +let util: TestUtils; + +test.beforeAll(async () => { + ({ page, util } = await startInstalledApp()); +}); + +test.afterAll(async () => { + await page.close(); +}); + +// Disables timeout since it's handled by the rust test +test.setTimeout(0); + +test('App should go from login view to main view when daemon logs in', async () => { + expect(await util.currentRoute()).toEqual(RoutePath.login); + + // Waiting for the daemon to log in + expect(await util.nextRoute()).toEqual(RoutePath.main); + + await assertDisconnected(page); +}); |
