changing to serial mode

This commit is contained in:
Gabriel Porfirio 2023-04-24 09:44:25 -03:00
parent ae83dd3b94
commit 2353b9930b
2 changed files with 44 additions and 11 deletions

View File

@ -1,18 +1,18 @@
const { expect } = require('@playwright/test'); const { expect } = require('@playwright/test');
const Page = require('../core/page');
const { openAboutModal, openSettings, getLocaleValues } = require('./util'); const { openAboutModal, openSettings, getLocaleValues } = require('./util');
const e = require('../core/elements'); const e = require('../core/elements');
const { ELEMENT_WAIT_TIME } = require('../core/constants'); const { ELEMENT_WAIT_TIME } = require('../core/constants');
const { MultiUsers } = require('../user/multiusers');
class Options extends Page { class Options extends MultiUsers {
constructor(browser, page) { constructor(browser, context) {
super(browser, page); super(browser, context);
} }
async openedAboutModal() { async openedAboutModal() {
await openAboutModal(this); await openAboutModal(this.modPage);
await this.hasElement(e.closeModal); await this.modPage.hasElement(e.closeModal);
} }
async openHelp(context) { async openHelp(context) {

View File

@ -1,20 +1,52 @@
const { test } = require('@playwright/test'); const { test } = require('@playwright/test');
const { Options } = require('./options'); const { Options } = require('./options');
test.describe.parallel('Options', () => { test.describe.serial('Options', () => {
test('Open about modal', async ({ browser, page }) => { const options = new Options();
const about = new Options(browser, page); test.beforeAll(async({ browser }) => {
await about.init(true, true); const context = await browser.newContext();
await about.openedAboutModal(); const page = await context.newPage();
await options.initModPage(page, true);
})
test('Open about modal', async () => {
await options.openedAboutModal();
}); });
test('Open Help Button', async () => {
await options.openHelp();
});
/*
test('Open Help Button', async ({ browser, page, context }) => { test('Open Help Button', async ({ browser, page, context }) => {
const helpButton = new Options(browser, page); const helpButton = new Options(browser, page);
await helpButton.init(true, true); await helpButton.init(true, true);
await helpButton.openHelp(context); await helpButton.openHelp(context);
}); });
// https://docs.bigbluebutton.org/2.6/release-tests.html#application-settings
test(`Locales`, async ({ browser, page }) => {
test.slow();
const language = new Options(browser, page);
await language.init(true, true);
await language.localesTest();
});
test('Dark mode', async ({ browser, page }) => {
const darkModeTest = new Options(browser, page);
await darkModeTest.init(true, true);
await darkModeTest.darkMode();
});
test('Font size', async ({ browser, page }) => {
const fontSize = new Options(browser, page);
await fontSize.init(true, true);
await fontSize.fontSizeTest();
});
*/
}); });
/*
test.describe.parallel('Settings', () => { test.describe.parallel('Settings', () => {
// https://docs.bigbluebutton.org/2.6/release-tests.html#application-settings // https://docs.bigbluebutton.org/2.6/release-tests.html#application-settings
test(`Locales`, async ({ browser, page }) => { test(`Locales`, async ({ browser, page }) => {
@ -36,3 +68,4 @@ test.describe.parallel('Settings', () => {
await fontSize.fontSizeTest(); await fontSize.fontSizeTest();
}); });
}); });
*/