summaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-10-16 13:13:19 +0200
committerTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-10-20 14:12:48 +0200
commit6053cff0393b568da7514d75c19ec8e5fe652a28 (patch)
tree814b79c8297d865f59c45b04394d853ee50576bb /desktop
parent3b21f5919a756c0a2c265711c4ef65c61d1cadb2 (diff)
downloadmullvadvpn-6053cff0393b568da7514d75c19ec8e5fe652a28.tar.xz
mullvadvpn-6053cff0393b568da7514d75c19ec8e5fe652a28.zip
Update notification test to handle hidden notification removed from DOM
Diffstat (limited to 'desktop')
-rw-r--r--desktop/packages/mullvad-vpn/test/e2e/mocked/notifications.spec.ts18
1 files changed, 17 insertions, 1 deletions
diff --git a/desktop/packages/mullvad-vpn/test/e2e/mocked/notifications.spec.ts b/desktop/packages/mullvad-vpn/test/e2e/mocked/notifications.spec.ts
index b8173c1cb5..d76090814d 100644
--- a/desktop/packages/mullvad-vpn/test/e2e/mocked/notifications.spec.ts
+++ b/desktop/packages/mullvad-vpn/test/e2e/mocked/notifications.spec.ts
@@ -150,7 +150,23 @@ test.describe('Unsupported wireguard port', () => {
const subTitle = page.getByTestId('notificationSubTitle');
- await expect(subTitle).not.toContainText(/The selected WireGuard port is not supported/i);
+ // TODO: Remove these test cases which test for the absence of a specific
+ // notification. We prefer to have tests which test for something, rather
+ // than the absence of something.
+ await expect(async () => {
+ const visible = await subTitle.isVisible();
+ if (visible) {
+ // EITHER: A notification is displayed, but not for unsupported WireGuard port
+ expect(await subTitle.innerText()).not.toMatch(
+ /The selected WireGuard port is not supported/i,
+ );
+ } else {
+ // OR: no notification is displayed at all
+ // NO OP
+ }
+ }).toPass({
+ timeout: 5000,
+ });
});
});