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');
|
2023-10-19 03:00:22 +08:00
|
|
|
const { linkIssue } = require('../core/helpers');
|
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
|
2023-12-06 02:15:25 +08:00
|
|
|
test('Skip slide @ci @flaky', 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
|
|
|
});
|
|
|
|
|
2023-10-17 20:32:36 +08:00
|
|
|
test('Share Camera As Content', async ({ browser, context, page }) => {
|
|
|
|
const presentation = new Presentation(browser, context);
|
|
|
|
await presentation.initPages(page);
|
|
|
|
await presentation.shareCameraAsContent();
|
|
|
|
});
|
|
|
|
|
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-09-19 00:39:59 +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-12-06 02:15:25 +08:00
|
|
|
test('Presentation snapshot @ci @flaky', 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-12-06 02:15:25 +08:00
|
|
|
test('Hide Presentation Toolbar @ci @flaky', 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-12-06 02:15:25 +08:00
|
|
|
test('Zoom In, Zoom Out, Reset Zoom @ci @flaky', 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-12-06 02:15:25 +08:00
|
|
|
test('Upload single presentation @ci @flaky', 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-12-06 02:15:25 +08:00
|
|
|
test('Upload Other Presentations Format @ci @flaky', async ({ browser, context, page }) => {
|
2023-10-19 03:00:22 +08:00
|
|
|
linkIssue(18971);
|
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-07-04 23:10:38 +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-05 03:47:23 +08:00
|
|
|
|
2023-09-19 00:39:59 +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
|
|
|
});
|