mirror of
https://github.com/zonemaster/zonemaster-gui.git
synced 2026-04-03 17:31:21 +02:00
24 lines
798 B
TypeScript
24 lines
798 B
TypeScript
import { by, browser, element, ExpectedConditions } from 'protractor';
|
|
|
|
import { Utils } from './utils/app.utils';
|
|
|
|
describe('Zonemaster test FR05-fr - [Supports French language]', () => {
|
|
|
|
const utils = new Utils();
|
|
|
|
beforeAll(async () => {
|
|
await utils.goToHome();
|
|
});
|
|
|
|
it('should have French language button', () => {
|
|
expect(element(by.xpath('//a[@lang="fr"]')).isPresent()).toBe(true);
|
|
});
|
|
|
|
it('should switch to French', async () => {
|
|
await utils.setLang('fr');
|
|
await browser.wait(() => ExpectedConditions.presenceOf(element(by.xpath('//h1[.="Nom de domaine"]'))), 5 * 1000);
|
|
const selectedLang = element.all(by.css('nav div.lang a.selected'));
|
|
expect(selectedLang.count()).toBe(1);
|
|
expect(selectedLang.first().getAttribute('lang')).toBe('fr');
|
|
});
|
|
});
|