summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2024-10-18 14:38:04 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2024-10-23 14:59:46 +0200
commit2a20e5a4c72fd3ed7c28febe087d0a3856b84056 (patch)
tree5a8527caaef31d8a89a273d10e63caa5a3b95af1
parent83d070a2bbe66a7a3c8180169e9c5b235baa2e4d (diff)
downloadmullvadvpn-2a20e5a4c72fd3ed7c28febe087d0a3856b84056.tar.xz
mullvadvpn-2a20e5a4c72fd3ed7c28febe087d0a3856b84056.zip
Update API access method GUI e2e tests to include Encrypted DNS proxy
-rw-r--r--gui/test/e2e/installed/state-dependent/api-access-methods.spec.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/gui/test/e2e/installed/state-dependent/api-access-methods.spec.ts b/gui/test/e2e/installed/state-dependent/api-access-methods.spec.ts
index d17611261b..662ac4bf2a 100644
--- a/gui/test/e2e/installed/state-dependent/api-access-methods.spec.ts
+++ b/gui/test/e2e/installed/state-dependent/api-access-methods.spec.ts
@@ -15,6 +15,7 @@ import { startInstalledApp } from '../installed-utils';
const DIRECT_NAME = 'Direct';
const BRIDGES_NAME = 'Mullvad Bridges';
+const ENCRYPTED_DNS_PROXY_NAME = 'Encrypted DNS proxy';
const IN_USE_LABEL = 'In use';
const FUNCTIONING_METHOD_NAME = 'Test method';
const NON_FUNCTIONING_METHOD_NAME = 'Non functioning test method';
@@ -42,12 +43,14 @@ test('App should display access methods', async () => {
await navigateToAccessMethods();
const accessMethods = page.getByTestId('access-method');
- await expect(accessMethods).toHaveCount(2);
+ await expect(accessMethods).toHaveCount(3);
const direct = accessMethods.first();
- const bridges = accessMethods.last();
+ const bridges = accessMethods.nth(1);
+ const encryptedDnsProxy = accessMethods.nth(2);
await expect(direct).toContainText(DIRECT_NAME);
await expect(bridges).toContainText(BRIDGES_NAME);
+ await expect(encryptedDnsProxy).toContainText(ENCRYPTED_DNS_PROXY_NAME);
await expect(page.getByText(IN_USE_LABEL)).toHaveCount(1);
});
@@ -144,6 +147,7 @@ test('App should use valid method', async () => {
const direct = accessMethods.first();
const bridges = accessMethods.nth(1);
+ const encryptedDnsProxy = accessMethods.nth(2);
const functioningTestMethod = accessMethods.last();
await expect(page.getByText(IN_USE_LABEL)).toHaveCount(1);
@@ -154,6 +158,7 @@ test('App should use valid method', async () => {
await functioningTestMethod.getByText('Use').click();
await expect(direct).not.toContainText(IN_USE_LABEL);
await expect(bridges).not.toContainText(IN_USE_LABEL);
+ await expect(encryptedDnsProxy).not.toContainText(IN_USE_LABEL);
await expect(functioningTestMethod).toContainText('API reachable');
await expect(functioningTestMethod).toContainText(IN_USE_LABEL);
});