bigbluebutton-Github/bigbluebutton-tests/playwright/customparameters/customparameters.spec.js

298 lines
14 KiB
JavaScript
Raw Normal View History

2021-12-15 01:10:44 +08:00
const { test } = require('@playwright/test');
const { CustomParameters } = require('./customparameters');
const c = require('./constants');
const { encodeCustomParams, getAllShortcutParams, hexToRgb } = require('./util');
test.describe.parallel('CustomParameters', () => {
2022-01-20 03:50:59 +08:00
test('Show Public Chat On Login', async ({ browser, context, page }) => {
2021-12-15 01:10:44 +08:00
const customParam = new CustomParameters(browser, context);
2022-01-20 03:50:59 +08:00
await customParam.initModPage(page, true, { customParameter: c.showPublicChatOnLogin });
await customParam.showPublicChatOnLogin();
2021-12-15 01:10:44 +08:00
});
2022-01-20 03:50:59 +08:00
test('Record Meeting', async ({ browser, context, page }) => {
2021-12-15 01:10:44 +08:00
const customParam = new CustomParameters(browser, context);
2022-01-20 03:50:59 +08:00
await customParam.initModPage(page, true, { customParameter: c.recordMeeting });
await customParam.recordMeeting();
2021-12-15 01:10:44 +08:00
});
2022-01-20 03:50:59 +08:00
test('Show Participants on Login', async ({ browser, context, page }) => {
2021-12-15 01:10:44 +08:00
const customParam = new CustomParameters(browser, context);
2022-01-20 03:50:59 +08:00
await customParam.initModPage(page, true, { customParameter: c.showParticipantsOnLogin });
await customParam.showParticipantsOnLogin();
2021-12-15 01:10:44 +08:00
});
test('Client title', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.clientTitle });
await customParam.clientTitle();
});
test('Ask For Feedback On Logout', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.askForFeedbackOnLogout });
await customParam.askForFeedbackOnLogout();
});
test('Display Branding Area', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: `${c.displayBrandingArea}&${encodeCustomParams(c.logo)}` });
await customParam.displayBrandingArea();
});
test('Shortcuts', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
const shortcutParam = getAllShortcutParams();
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(shortcutParam) });
await customParam.initUserPage(true, context, { useModMeetingId: true });
await customParam.shortcuts();
});
test('Custom Styles: CSS code', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.customStyle) });
await customParam.customStyle();
});
test('Custom Styles: URL', async ({ browser, context, page }) => {
test.fixme();
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.customStyleUrl) });
await customParam.customStyle();
});
test('Auto Swap Layout', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.autoSwapLayout });
await customParam.autoSwapLayout();
});
2023-02-08 02:12:20 +08:00
test('Hide Actions Bar', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.hideActionsBar });
2023-02-11 03:19:43 +08:00
await customParam.hideActionsBarTest();
2023-02-08 02:12:20 +08:00
});
test('Override Default Locale', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.overrideDefaultLocale });
2023-02-11 03:19:43 +08:00
await customParam.overrideDefaultLocaleTest();
2023-02-08 02:12:20 +08:00
});
2023-02-11 03:19:43 +08:00
test('Hide NavBar', async ({ browser, context, page }) => {
2023-02-08 02:12:20 +08:00
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.hideNavBar });
2023-02-11 03:19:43 +08:00
await customParam.hideNavBarTest();
2023-02-08 02:12:20 +08:00
});
2023-02-11 03:19:43 +08:00
test('Preferred Camera Profile', async ({ browser, context, page }) => {
2023-02-08 02:12:20 +08:00
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.preferredCameraProfile });
2023-02-11 03:19:43 +08:00
await customParam.preferredCameraProfileTest();
2023-02-08 02:12:20 +08:00
});
2022-01-20 03:50:59 +08:00
test.describe.parallel('Audio', () => {
test('Auto join', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, false, { customParameter: c.autoJoin });
await customParam.autoJoin();
});
test('Disable Listen Only Mode', async ({ browser, context, page }) => {
2022-01-20 03:50:59 +08:00
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, false, { customParameter: c.listenOnlyMode });
await customParam.listenOnlyMode();
});
test('Force Listen Only', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initUserPage(false, context, { useModMeetingId: false, customParameter: c.forceListenOnly });
await customParam.forceListenOnly(page);
});
test('Skip audio check', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, false, { customParameter: c.skipCheck });
await customParam.skipCheck();
});
test('Skip audio check on first join', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, false, { customParameter: c.skipCheckOnFirstJoin });
await customParam.skipCheckOnFirstJoin();
});
});
test.describe.parallel('Banner', () => {
test('Banner Text', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.bannerText) });
await customParam.bannerText();
});
test('Banner Color', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
const colorToRGB = hexToRgb(c.color);
await customParam.initModPage(page, true, { customParameter: `${c.bannerColor}&${encodeCustomParams(c.bannerText)}` });
await customParam.bannerColor(colorToRGB);
});
})
test.describe.parallel('Presentation', () => {
test('Hide Presentation', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.hidePresentation) });
await customParam.hidePresentation();
});
test('Force Restore Presentation On New Events', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
const customParameter = c.forceRestorePresentationOnNewEvents;
await customParam.initModPage(page, true, { customParameter });
await customParam.forceRestorePresentationOnNewEvents(customParameter);
});
test('Force Restore Presentation On New Poll Result', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
const customParameter = c.forceRestorePresentationOnNewEvents;
await customParam.initModPage(page, true, { customParameter });
await customParam.forceRestorePresentationOnNewPollResult(customParameter);
});
});
test.describe.parallel('Webcam', () => {
test('Disable Webcam Sharing', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.enableVideo });
await customParam.enableVideo();
});
test('Skip Video Preview', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.skipVideoPreview });
await customParam.skipVideoPreview();
});
test('Skip Video Preview on First Join', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.skipVideoPreviewOnFirstJoin });
await customParam.skipVideoPreviewOnFirstJoin();
});
test('Mirror Own Webcam', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.mirrorOwnWebcam });
await customParam.mirrorOwnWebcam();
});
});
test.describe.parallel('Whiteboard', () => {
test.skip();
2022-01-20 03:50:59 +08:00
test('Multi Users Pen Only', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.multiUserPenOnly });
await customParam.initUserPage(true, context, { useModMeetingId: true, customParameter: c.multiUserPenOnly });
await customParam.multiUserPenOnly();
});
test('Presenter Tools', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.presenterTools) });
await customParam.presenterTools();
});
test('Multi Users Tools', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: encodeCustomParams(c.multiUserTools) });
await customParam.initUserPage(true, context, { useModMeetingId: true, customParameter: encodeCustomParams(c.multiUserTools) });
await customParam.multiUserTools();
});
2021-12-15 01:10:44 +08:00
});
2023-02-22 02:28:53 +08:00
test.describe.parallel('Disabled Features', () => {
test('Breakout Rooms', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.breakoutRooms });
await customParam.breakoutRooms();
});
test('Live Transcription', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, false, { customParameter: c.liveTranscription });
await customParam.liveTranscription();
});
test('Captions', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.captions });
await customParam.captions();
});
test('Chat', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.chat });
await customParam.chat();
});
test('External Videos', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.externalVideos });
await customParam.externalVideos();
});
2023-02-23 20:05:57 +08:00
test('Layouts', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.layouts });
await customParam.layouts();
});
2023-02-22 02:28:53 +08:00
test('Learning Dashboard', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.learningDashboard });
await customParam.learningDashboard();
});
test('Polls', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.polls });
await customParam.polls();
});
test('Screenshare', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.screenshare });
await customParam.screenshare();
});
test('Shared Notes', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.sharedNotes });
await customParam.sharedNotes();
});
test('Virtual Backgrounds', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.virtualBackgrounds });
await customParam.virtualBackgrounds();
});
test('Download Presentation With Annotations', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.downloadPresentationWithAnnotations });
await customParam.downloadPresentationWithAnnotations();
});
test('Import Presentation With Annotations From Breakout Rooms', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.importPresentationWithAnnotationsFromBreakoutRooms });
await customParam.importPresentationWithAnnotationsFromBreakoutRooms();
});
test('Import Shared Notes From Breakout Rooms', async ({ browser, context, page }) => {
const customParam = new CustomParameters(browser, context);
await customParam.initModPage(page, true, { customParameter: c.importSharedNotesFromBreakoutRooms });
await customParam.importSharedNotesFromBreakoutRooms();
});
});
2022-01-20 21:03:18 +08:00
});