2023-01-24 01:31:01 +08:00
|
|
|
const { test } = require('@playwright/test');
|
|
|
|
const { encodeCustomParams } = require('../customparameters/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-04-27 02:53:52 +08:00
|
|
|
test.describe.serial('Layout management', () => {
|
|
|
|
const layouts = new Layouts();
|
|
|
|
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
|
|
const context = await browser.newContext();
|
|
|
|
const page = await context.newPage();
|
|
|
|
await layouts.initModPage(page, true, { customParameter: hidePresentationToast, customMeetingId: CUSTOM_MEETING_ID });
|
|
|
|
await layouts.initUserPage(true, context, { customParameter: hidePresentationToast });
|
|
|
|
await layouts.modPage.shareWebcam();
|
|
|
|
await layouts.userPage.shareWebcam();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Focus on presentation', async () => {
|
|
|
|
await layouts.focusOnPresentation();
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|
2023-04-26 05:20:48 +08:00
|
|
|
|
2023-04-27 02:53:52 +08:00
|
|
|
test('Focus on video', async () => {
|
|
|
|
await layouts.focusOnVideo();
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|
2023-04-26 05:20:48 +08:00
|
|
|
|
2023-04-27 02:53:52 +08:00
|
|
|
test('Smart layout', async () => {
|
|
|
|
await layouts.smartLayout();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
|
|
|
|
2023-04-27 02:53:52 +08:00
|
|
|
test('Custom layout', async () => {
|
|
|
|
await layouts.customLayout();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
|
|
|
|
2023-04-27 02:53:52 +08:00
|
|
|
test('Push layout to all', async () => {
|
|
|
|
await layouts.pushLayout();
|
2023-04-26 05:20:48 +08:00
|
|
|
});
|
2023-01-24 01:31:01 +08:00
|
|
|
});
|