mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(e2e): test urls can have trailing slashes (#58283)
This commit is contained in:
committed by
GitHub
parent
4eef3854c7
commit
8a852719f1
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user