summaryrefslogtreecommitdiffhomepage
path: root/gui/test
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-09-29 15:19:11 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-10-03 16:50:24 +0200
commit672bda049a754cdc165b620d24c55b1de5224e39 (patch)
treefcc404cb27d25560c3ac32a7362ca09413eec162 /gui/test
parent339f506fb8a32b0e33c53b1c4e4d091bc01e297e (diff)
downloadmullvadvpn-672bda049a754cdc165b620d24c55b1de5224e39.tar.xz
mullvadvpn-672bda049a754cdc165b620d24c55b1de5224e39.zip
Add test for ensuring country is set
Diffstat (limited to 'gui/test')
-rw-r--r--gui/test/e2e/daemon/location.spec.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/gui/test/e2e/daemon/location.spec.ts b/gui/test/e2e/daemon/location.spec.ts
new file mode 100644
index 0000000000..15a86abb37
--- /dev/null
+++ b/gui/test/e2e/daemon/location.spec.ts
@@ -0,0 +1,26 @@
+import { expect, test } from '@playwright/test';
+import { Page } from 'playwright';
+
+import { GetByTestId } from '../utils';
+import { startAppWithDaemon } from './daemon-utils';
+
+let page: Page;
+let getByTestId: GetByTestId;
+
+test.beforeAll(async () => {
+ ({ page, getByTestId } = await startAppWithDaemon());
+});
+
+test.afterAll(async () => {
+ await page.close();
+});
+
+test('App should have a country', async () => {
+ const countryLabel = getByTestId('country');
+ await expect(countryLabel).not.toBeEmpty();
+
+ const cityLabel = getByTestId('city');
+ const noCityLabel = await cityLabel.count() === 0;
+ expect(noCityLabel).toBeTruthy();
+});
+