2023-01-24 01:31:01 +08:00
|
|
|
const { test } = require('@playwright/test');
|
2023-09-01 04:21:48 +08:00
|
|
|
const { fullyParallel } = require('../playwright.config');
|
2023-07-08 01:05:06 +08:00
|
|
|
const { encodeCustomParams } = require('../parameters/util');
|
2023-03-08 23:33:05 +08:00
|
|
|
const { PARAMETER_HIDE_PRESENTATION_TOAST } = require('../core/constants');
|
2023-04-27 02:53:52 +08:00
|
|
|
const { Layouts } = require('./layouts');
|
2023-03-08 23:33:05 +08:00
|
|
|
|
|
|
|
const hidePresentationToast = encodeCustomParams(PARAMETER_HIDE_PRESENTATION_TOAST);
|
2023-01-24 01:31:01 +08:00
|
|
|
|
2023-02-22 05:49:24 +08:00
|
|
|
const CUSTOM_MEETING_ID = 'layout_management_meeting';
|
|
|
|
|
2023-09-01 04:21:48 +08:00
|
|
|
if (!fullyParallel) test.describe.configure({ mode: 'serial' });
|
|
|
|
|
|
|
|
test.describe("Layout management", () => {
|
2023-04-27 02:53:52 +08:00
|
|
|
const layouts = new Layouts();
|
|
|
|
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
|
|
const context = await browser.newContext();
|
|
|
|
const page = await context.newPage();
|
2023-08-23 22:05:40 +08:00
|
|
|
await layouts.initModPage(page, true, { createParameter: hidePresentationToast, customMeetingId: CUSTOM_MEETING_ID });
|
2023-08-23 04:25:50 +08:00
|
|
|
await layouts.initUserPage(true, context, { createParameter: hidePresentationToast });
|
2023-04-27 02:53:52 +08:00
|
|
|
await layouts.modPage.shareWebcam();
|
|
|
|
await layouts.userPage.shareWebcam();
|
|
|
|
});
|
|
|
|
|
2023-07-11 03:28:00 +08:00
|
|
|
test("Focus on presentation", async () => {
|
2023-04-27 02:53:52 +08:00
|
|
|
await layouts.focusOnPresentation();
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|
2023-04-26 05:20:48 +08:00
|
|
|
|
2023-10-17 20:32:36 +08:00
|
|
|
test("Grid Layout", async () => {
|
|
|
|
await layouts.gridLayout();
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|
2023-04-26 05:20:48 +08:00
|
|
|
|
2023-07-11 03:28:00 +08:00
|
|
|
test("Smart layout", async () => {
|
2023-04-27 02:53:52 +08:00
|
|
|
await layouts.smartLayout();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
|
|
|
|
2023-07-11 03:28:00 +08:00
|
|
|
test("Custom layout", async () => {
|
2023-04-27 02:53:52 +08:00
|
|
|
await layouts.customLayout();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
|
|
|
|
2023-07-11 03:28:00 +08:00
|
|
|
test("Update everyone's layout", async () => {
|
|
|
|
await layouts.updateEveryone();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|