refactor(e2e): test urls can have trailing slashes (#58283)

This commit is contained in:
Oliver Eyton-Williams
2025-01-24 00:04:35 +01:00
committed by GitHub
parent 4eef3854c7
commit 8a852719f1
9 changed files with 24 additions and 11 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';
import translations from '../client/i18n/locales/english/translations.json';
import { allowTrailingSlash } from './utils/url';
test.beforeEach(async ({ page }) => {
await page.goto('/');
@@ -49,7 +50,7 @@ test.describe('Signout Modal component', () => {
await expect(
page.getByRole('dialog', { name: translations.signout.heading })
).not.toBeVisible();
await expect(page).toHaveURL(/.*\/learn\/?$/);
await expect(page).toHaveURL(allowTrailingSlash('/learn'));
});
test('closes modal after user cancels signing out', async ({ page }) => {