mirror of
https://github.com/zonemaster/zonemaster-gui.git
synced 2025-11-22 16:31:04 +01:00
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import {test, expect} from '@playwright/test';
|
|
|
|
import {goToHome, setLang, showOptions} from './utils/app.utils';
|
|
|
|
test.describe('Zonemaster test FR16 - [The advanced view should have a text describing what undelegated means]', () => {
|
|
test.beforeEach(async ({page}) => {
|
|
await goToHome(page);
|
|
await setLang(page, 'en');
|
|
await showOptions(page);
|
|
});
|
|
|
|
test('should have a link to the proper faq answer', async ({page}) => {
|
|
const alert = page.locator('#advanced-options div[role="alert"]');
|
|
await expect(alert).toBeVisible();
|
|
await expect(alert.locator('a')).toHaveAttribute('href', '/faq/#undelegated');
|
|
});
|
|
|
|
test('should have a description text in multi languages', async ({page}) => {
|
|
const testSuite = [
|
|
{lang: 'en', text: 'undelegated'},
|
|
{lang: 'fr', text: 'non délégué'},
|
|
{lang: 'sv', text: 'odelegerat domäntest'},
|
|
];
|
|
|
|
for (const {lang, text} of testSuite) {
|
|
await setLang(page, lang);
|
|
await showOptions(page);
|
|
await page.waitForTimeout(400);
|
|
|
|
const alert = page.locator('#advanced-options div[role="alert"]');
|
|
|
|
await expect(alert.locator('a')).toContainText(text);
|
|
}
|
|
});
|
|
});
|