test: Backport share camera as content test to 2.7 (#20964)
* backport camera as content test * add test to ci
This commit is contained in:
parent
7a8abd0127
commit
f66f07d177
@ -33,6 +33,38 @@ class Presentation extends MultiUsers {
|
||||
await checkSvgIndex(this.modPage, '/svg/1');
|
||||
}
|
||||
|
||||
async shareCameraAsContent() {
|
||||
await this.modPage.hasElement(e.whiteboard, ELEMENT_WAIT_LONGER_TIME);
|
||||
|
||||
await this.modPage.waitAndClick(e.actions);
|
||||
await this.modPage.waitAndClick(e.shareCameraAsContent);
|
||||
await this.modPage.hasElement(e.videoPreview);
|
||||
await this.modPage.waitAndClick(e.startSharingWebcam);
|
||||
await this.modPage.hasElement(e.screenshareConnecting);
|
||||
|
||||
await this.modPage.wasRemoved(e.screenshareConnecting);
|
||||
await this.modPage.hasElement(e.screenShareVideo);
|
||||
// close all notifications displayed before comparing screenshots
|
||||
for (const closeButton of await this.modPage.getLocator(e.closeToastBtn).all()) {
|
||||
await closeButton.click();
|
||||
}
|
||||
const modWhiteboardLocator = this.modPage.getLocator(e.screenShareVideo);
|
||||
await expect(modWhiteboardLocator).toHaveScreenshot('moderator-share-camera-as-content.png', {
|
||||
maxDiffPixels: 1000,
|
||||
});
|
||||
|
||||
await this.userPage.wasRemoved(e.screenshareConnecting);
|
||||
await this.userPage.hasElement(e.screenShareVideo);
|
||||
// close all notifications displayed before comparing screenshots
|
||||
for (const closeButton of await this.userPage.getLocator(e.closeToastBtn).all()) {
|
||||
await closeButton.click();
|
||||
}
|
||||
const viewerWhiteboardLocator = this.userPage.getLocator(e.screenShareVideo);
|
||||
await expect(viewerWhiteboardLocator).toHaveScreenshot('viewer-share-camera-as-content.png', {
|
||||
maxDiffPixels: 1000,
|
||||
});
|
||||
}
|
||||
|
||||
async hideAndRestorePresentation() {
|
||||
const { presentationHidden } = getSettings();
|
||||
if (!presentationHidden) {
|
||||
|
@ -12,6 +12,12 @@ test.describe.parallel('Presentation', () => {
|
||||
await presentation.skipSlide();
|
||||
});
|
||||
|
||||
test('Share Camera As Content @ci', async ({ browser, context, page }) => {
|
||||
const presentation = new Presentation(browser, context);
|
||||
await presentation.initPages(page);
|
||||
await presentation.shareCameraAsContent();
|
||||
});
|
||||
|
||||
// https://docs.bigbluebutton.org/2.7/testing/release-testing/#minimizerestore-presentation-automated
|
||||
test('Hide/Restore presentation @ci', async ({ browser, context, page }) => {
|
||||
const presentation = new Presentation(browser, context);
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 281 KiB |
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
Loading…
Reference in New Issue
Block a user