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

121 lines
5.5 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', () => {
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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
});
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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
});
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#fit-to-width-option
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-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();
});
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', () => {
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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();
});
test('Upload Other Presentations Format @ci @flaky', async ({ browser, context, page }) => {
const presentation = new Presentation(browser, context);
await presentation.initPages(page, true);
await presentation.uploadOtherPresentationsFormat();
});
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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
});
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#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);
});
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
});