zonemaster-gui/e2e/FR16.e2e-spec.ts
Mats Dufberg 9cb9ebd413
Merge pull request #518 from matsduf/update-sv-translation
Updates Swedish translation of FAQ and messages
2025-12-15 10:09:53 +01:00

38 lines
1.4 KiB
TypeScript

import {test, expect} from './global-setup';
import {goToHome, mounted, 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 mounted(page);
await showOptions(page);
});
test('should have a link to the proper faq answer', async ({page}) => {
await page.waitForTimeout(400);
const alert = page.locator('#advanced-options div[role="alert"]');
await expect(alert).toBeVisible();
await expect(alert.locator('a')).toHaveAttribute('href', '/en/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'},
];
for (const {lang, text} of testSuite) {
await setLang(page, lang);
await mounted(page);
await showOptions(page);
await page.waitForTimeout(400);
const alert = page.locator('#advanced-options div[role="alert"]');
await expect(alert.locator('a')).toContainText(text);
}
});
});