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

129 lines
5.8 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');
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
2024-01-26 00:49:04 +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
});
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 }) => {
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 @flaky', async ({ browser, context, page }, testInfo) => {
const presentation = new Presentation(browser, context);
await presentation.initPages(page);
await presentation.presentationSnapshot(testInfo);
});
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();
});
2024-02-01 00:39:51 +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', () => {
2022-07-26 03:42:48 +08:00
// https://docs.bigbluebutton.org/2.6/release-tests.html#uploading-a-presentation-automated
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 }) => {
linkIssue(18971);
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
});