bigbluebutton-Github/bigbluebutton-tests/playwright/settings/language.js

24 lines
685 B
JavaScript
Raw Normal View History

2021-11-18 04:07:14 +08:00
const Page = require('../core/page');
const { openSettings } = require('./util');
const e = require('../core/elements');
class Language extends Page {
constructor(browser, page) {
super(browser, page);
}
async test(locale) {
2021-12-23 03:06:42 +08:00
for(let locale of e.locales) {
console.log(`Testing ${locale} locale`);
await openSettings(this.page);
await this.page.waitForSelector('#langSelector');
const langDropdown = await this.page.$('#langSelector');
const langOptions = await langDropdown.$$('option');
await langDropdown.selectOption({ value: locale });
await this.page.click(e.modalConfirmButton);
}
}
}
exports.Language = Language;