diff options
| author | Oskar <oskar@mullvad.net> | 2024-08-21 17:08:37 +0200 |
|---|---|---|
| committer | Oskar <oskar@mullvad.net> | 2024-08-21 17:08:37 +0200 |
| commit | 0cc9684200426eef11b65cf8373d29eddf8aa90e (patch) | |
| tree | 68dc1c457f693035ea26b723414b7cd2a28958e3 /gui/test/e2e/shared | |
| parent | b26659e05b50c3a1b0499620f683748287707769 (diff) | |
| parent | 6ceed1dffca2fc0c4b867fe60638db5bf29f1065 (diff) | |
| download | mullvadvpn-0cc9684200426eef11b65cf8373d29eddf8aa90e.tar.xz mullvadvpn-0cc9684200426eef11b65cf8373d29eddf8aa90e.zip | |
Merge branch 'implement-feature-indicators-in-main-view-des-910'
Diffstat (limited to 'gui/test/e2e/shared')
| -rw-r--r-- | gui/test/e2e/shared/tunnel-state.ts | 63 |
1 files changed, 23 insertions, 40 deletions
diff --git a/gui/test/e2e/shared/tunnel-state.ts b/gui/test/e2e/shared/tunnel-state.ts index db7b7e3658..4d75f79d01 100644 --- a/gui/test/e2e/shared/tunnel-state.ts +++ b/gui/test/e2e/shared/tunnel-state.ts @@ -3,51 +3,54 @@ import { Page } from 'playwright'; import { colors } from '../../../src/config.json'; import { anyOf } from '../utils'; -const UNSECURED_COLOR = colors.red; -const SECURE_COLOR = colors.green; +const DISCONNECTED_COLOR = colors.red; +const CONNECTED_COLOR = colors.green; const WHITE_COLOR = colors.white; -const UNSECURE_BUTTON_COLOR = anyOf(colors.red60, colors.red80); -const SECURE_BUTTON_COLOR = anyOf(colors.green, colors.green90); +const DISCONNECTED_BUTTON_COLOR = anyOf(colors.red, colors.red80); +const DISCONNECTING_BUTTON_COLOR = anyOf(colors.green40); +const CONNECTED_BUTTON_COLOR = anyOf(colors.green, colors.green90); const getLabel = (page: Page) => page.locator('span[role="status"]'); const getHeader = (page: Page) => page.locator('header'); export async function expectDisconnected(page: Page) { await expectTunnelState(page, { - labelText: 'unsecured connection', - labelColor: UNSECURED_COLOR, - headerColor: UNSECURED_COLOR, - buttonText: 'secure my connection', - buttonColor: SECURE_BUTTON_COLOR, + labelText: 'disconnected', + labelColor: DISCONNECTED_COLOR, + headerColor: DISCONNECTED_COLOR, + buttonText: 'connect', + buttonColor: CONNECTED_BUTTON_COLOR, }); } export async function expectConnecting(page: Page) { await expectTunnelState(page, { - labelText: 'creating secure connection', + labelText: 'connecting', labelColor: WHITE_COLOR, - headerColor: SECURE_COLOR, + headerColor: CONNECTED_COLOR, buttonText: 'cancel', - buttonColor: UNSECURE_BUTTON_COLOR, + buttonColor: DISCONNECTED_BUTTON_COLOR, }); } export async function expectConnected(page: Page) { await expectTunnelState(page, { - labelText: 'secure connection', - labelColor: SECURE_COLOR, - headerColor: SECURE_COLOR, + labelText: 'connected', + labelColor: CONNECTED_COLOR, + headerColor: CONNECTED_COLOR, buttonText: 'disconnect', - buttonColor: UNSECURE_BUTTON_COLOR, + buttonColor: DISCONNECTED_BUTTON_COLOR, }); } export async function expectDisconnecting(page: Page) { await expectTunnelState(page, { - headerColor: UNSECURED_COLOR, - buttonText: 'secure my connection', - buttonColor: SECURE_BUTTON_COLOR, + labelText: 'disconnecting', + labelColor: WHITE_COLOR, + headerColor: DISCONNECTED_COLOR, + buttonText: 'connect', + buttonColor: DISCONNECTING_BUTTON_COLOR, }); } @@ -55,27 +58,7 @@ export async function expectError(page: Page) { await expectTunnelState(page, { labelText: 'blocked connection', labelColor: WHITE_COLOR, - headerColor: SECURE_COLOR, - }); -} - -export async function expectConnectingPq(page: Page) { - await expectTunnelState(page, { - labelText: 'creating quantum secure connection', - labelColor: WHITE_COLOR, - headerColor: SECURE_COLOR, - buttonText: 'cancel', - buttonColor: UNSECURE_BUTTON_COLOR, - }); -} - -export async function expectConnectedPq(page: Page) { - await expectTunnelState(page, { - labelText: 'quantum secure connection', - labelColor: SECURE_COLOR, - headerColor: SECURE_COLOR, - buttonText: 'disconnect', - buttonColor: UNSECURE_BUTTON_COLOR, + headerColor: CONNECTED_COLOR, }); } |
