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

125 lines
5.6 KiB
JavaScript
Raw Normal View History

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');
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 }) => {
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 }) => {
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
test('Start external video @ci', async ({ browser, context, page }) => {
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 }) => {
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);
await presentation.fitToWidthTest();
});
test('Presentation fullscreen @ci', async ({ browser, context, page }) => {
const presentation = new Presentation(browser, context);
await presentation.initPages(page);
await presentation.presentationFullscreen();
});
test('Presentation snapshot @ci', async ({ browser, context, page }, testInfo) => {
const presentation = new Presentation(browser, context);
await presentation.initPages(page);
await presentation.presentationSnapshot(testInfo);
});
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-07-31 22:24:25 +08:00
/**
* temporally skipped because it's currently failing the screenshot comparisons
* due to https://github.com/bigbluebutton/bigbluebutton/issues/18232
*/
test.skip('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();
});
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);
await presentation.initPages(page, true);
await presentation.uploadSinglePresentationTest();
});
2023-08-11 03:10:50 +08:00
test('Upload Other Presentations Format @ci', async ({ browser, context, page }) => {
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
test('Upload multiple presentations', async ({ browser, context, page }) => {
2022-01-20 03:50:59 +08:00
const presentation = new Presentation(browser, context);
await presentation.initPages(page, true);
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
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);
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) => {
const presentation = new Presentation(browser, context);
await presentation.initPages(page);
await presentation.sendPresentationToDownload(testInfo);
2022-01-20 03:50:59 +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();
});
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
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);
await presentation.removePreviousPresentationFromPreviousPresenter();
});
2022-01-20 03:50:59 +08:00
});
2021-12-04 01:01:36 +08:00
});