zonemaster-gui/e2e/FR09.e2e-spec.ts
Gaël Berthaud-Müller 840f357501 update e2e tests
2024-02-26 17:01:21 +01:00

17 lines
763 B
TypeScript

const { test, expect } = require('@playwright/test');
import { goToHome, setLang } from './utils/app.utils';
test.describe('Zonemaster test FR09 - [Once a language is chosen, all other links should open in that respective language]', () => {
test.beforeEach(async ({ page })=> {
await goToHome(page);
await setLang(page, 'fr');
});
test('should keep french when opening faq page', async ({ page }) => {
await expect(page.locator('label[for="domain-input"]')).toHaveText('Nom de domaine');
await page.locator('a.nav-link[routerlink="/faq"]').click();
await expect(page.locator('main h1')).toHaveText('Questions fréquentes');
await expect(page.locator('a.nav-link[routerlink="/run-test"]')).toHaveText("Lancer un test");
});
});