2021-11-27 03:04:28 +08:00
|
|
|
const { test } = require('@playwright/test');
|
2023-07-08 01:05:06 +08:00
|
|
|
const { encodeCustomParams } = require('../parameters/util');
|
2021-12-02 12:12:14 +08:00
|
|
|
const { Presentation } = require('./presentation');
|
2021-11-27 03:04:28 +08:00
|
|
|
|
2023-02-14 21:59:46 +08:00
|
|
|
const customStyleAvoidUploadingNotifications = encodeCustomParams(`userdata-bbb_custom_style=.presentationUploaderToast{display: none;}`);
|
|
|
|
|
2021-11-27 03:04:28 +08:00
|
|
|
test.describe.parallel('Presentation', () => {
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#navigation-automated
|
2022-06-08 02:52:22 +08:00
|
|
|
test('Skip slide @ci', async ({ browser, context, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.skipSlide();
|
2021-11-27 03:04:28 +08:00
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#minimizerestore-presentation-automated
|
2022-06-08 02:52:22 +08:00
|
|
|
test('Hide/Restore presentation @ci', async ({ browser, context, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.hideAndRestorePresentation();
|
2021-11-27 03:04:28 +08:00
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#start-youtube-video-sharing
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Start external video @ci', async ({ browser, context, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.startExternalVideo();
|
2021-11-27 03:04:28 +08:00
|
|
|
});
|
2022-01-20 03:50:59 +08:00
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#fit-to-width-option
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Presentation fit to width @ci', async ({ browser, context, page }) => {
|
2022-06-21 07:02:10 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
2023-08-23 04:25:50 +08:00
|
|
|
await presentation.initModPage(page, true, { createParameter: customStyleAvoidUploadingNotifications });
|
2023-02-14 21:59:46 +08:00
|
|
|
await presentation.initUserPage(true, context);
|
2022-06-21 07:02:10 +08:00
|
|
|
await presentation.fitToWidthTest();
|
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Presentation fullscreen @ci', async ({ browser, context, page }) => {
|
2022-11-22 23:01:09 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.presentationFullscreen();
|
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Presentation snapshot @ci', async ({ browser, context, page }, testInfo) => {
|
2022-11-22 23:01:09 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.presentationSnapshot(testInfo);
|
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Hide Presentation Toolbar @ci', async ({ browser, context, page }) => {
|
2023-04-20 00:24:30 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.hidePresentationToolbar();
|
|
|
|
});
|
|
|
|
|
2023-08-09 02:13:32 +08:00
|
|
|
test('Zoom In, Zoom Out, Reset Zoom @ci', async ({ browser, context, page }) => {
|
2023-04-20 00:24:30 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.zoom();
|
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Select Slide @ci', async ({ browser, context, page }) => {
|
2023-04-20 00:24:30 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.selectSlide();
|
|
|
|
});
|
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test.describe.parallel('Manage', () => {
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#uploading-a-presentation-automated
|
2023-03-13 19:55:36 +08:00
|
|
|
test('Upload single presentation @ci', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
2022-07-16 02:05:13 +08:00
|
|
|
await presentation.initPages(page, true);
|
2022-06-21 07:02:10 +08:00
|
|
|
await presentation.uploadSinglePresentationTest();
|
|
|
|
});
|
|
|
|
|
2023-08-11 03:10:50 +08:00
|
|
|
test('Upload Other Presentations Format @ci', async ({ browser, context, page }) => {
|
2023-08-09 00:05:09 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page, true);
|
|
|
|
await presentation.uploadOtherPresentationsFormat();
|
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#uploading-multiple-presentations-automated
|
2022-06-21 07:02:10 +08:00
|
|
|
test('Upload multiple presentations', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
2022-06-24 09:38:49 +08:00
|
|
|
await presentation.initPages(page, true);
|
2022-06-21 07:02:10 +08:00
|
|
|
await presentation.uploadMultiplePresentationsTest();
|
2022-01-20 03:50:59 +08:00
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#enabling-and-disabling-presentation-download-automated
|
2023-08-04 02:46:03 +08:00
|
|
|
test('Enable and disable original presentation download @ci', async ({ browser, context, page }, testInfo) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
2023-07-04 23:10:38 +08:00
|
|
|
await presentation.enableAndDisablePresentationDownload(testInfo);
|
|
|
|
});
|
2023-08-04 02:05:56 +08:00
|
|
|
|
2023-08-04 02:46:03 +08:00
|
|
|
test('Send presentation in the current state (with annotations) to chat for downloading @ci', async ({ browser, context, page }, testInfo) => {
|
2023-07-04 23:10:38 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.sendPresentationToDownload(testInfo);
|
2022-01-20 03:50:59 +08:00
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Remove all presentation @ci', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.removeAllPresentation();
|
|
|
|
});
|
2022-08-30 19:16:09 +08:00
|
|
|
|
|
|
|
test('Upload and remove all presentations', async ({ browser, context, page }) => {
|
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.uploadAndRemoveAllPresentations();
|
|
|
|
});
|
2022-11-26 03:54:32 +08:00
|
|
|
|
2022-08-30 19:16:09 +08:00
|
|
|
test('Remove previous presentation from previous presenter', async ({ browser, context, page }) => {
|
|
|
|
const presentation = new Presentation(browser, context);
|
2023-08-23 04:25:50 +08:00
|
|
|
await presentation.initModPage(page, true, { createParameter: customStyleAvoidUploadingNotifications });
|
2023-02-14 21:59:46 +08:00
|
|
|
await presentation.initUserPage(true, context);
|
2022-08-30 19:16:09 +08:00
|
|
|
await presentation.removePreviousPresentationFromPreviousPresenter();
|
|
|
|
});
|
2022-01-20 03:50:59 +08:00
|
|
|
});
|
2021-12-04 01:01:36 +08:00
|
|
|
});
|