2024-03-06 22:26:03 +08:00
|
|
|
const { test } = require('../fixtures');
|
2023-03-29 22:16:47 +08:00
|
|
|
const { MultiUsers } = require('../user/multiusers');
|
2021-12-02 12:12:14 +08:00
|
|
|
const { Webcam } = require('./webcam');
|
2021-11-27 04:01:41 +08:00
|
|
|
|
2023-08-02 00:45:33 +08:00
|
|
|
test.describe.parallel('Webcam', () => {
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#joining-webcam-automated
|
2023-08-02 00:45:33 +08:00
|
|
|
test('Shares webcam @ci', async ({ browser, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.share();
|
2021-11-27 04:01:41 +08:00
|
|
|
});
|
|
|
|
|
2022-04-08 02:34:25 +08:00
|
|
|
test('Checks content of webcam', async ({ browser, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.checksContent();
|
2021-11-27 04:01:41 +08:00
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Webcam talking indicator @ci', async ({ browser, page }) => {
|
2021-12-02 12:12:14 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, false);
|
|
|
|
await webcam.talkingIndicator();
|
2021-11-27 04:01:41 +08:00
|
|
|
});
|
2022-09-13 01:10:57 +08:00
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Pinning and unpinning webcams @ci', async ({ browser, context, page }) => {
|
2022-09-13 01:10:57 +08:00
|
|
|
const webcam = new MultiUsers(browser, context);
|
|
|
|
await webcam.initModPage(page);
|
|
|
|
await webcam.initUserPage();
|
|
|
|
await webcam.initModPage2();
|
|
|
|
await webcam.pinningWebcams();
|
|
|
|
});
|
2023-03-29 22:16:47 +08:00
|
|
|
|
|
|
|
test('Change video quality', async ({ browser, page }) => {
|
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.changeVideoQuality();
|
|
|
|
});
|
|
|
|
|
2023-03-30 00:49:22 +08:00
|
|
|
test('Webcam fullscreen', async ({ browser, page }) => {
|
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.webcamFullscreen();
|
|
|
|
});
|
|
|
|
|
2023-10-03 19:47:50 +08:00
|
|
|
test('Disable Self-view', async ({ browser, page }) => {
|
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.disableSelfView();
|
|
|
|
});
|
|
|
|
|
2023-10-17 20:32:36 +08:00
|
|
|
test.describe('Webcam background @ci', () => {
|
2023-08-26 00:45:07 +08:00
|
|
|
/* this test has the flaky tag because it is breaking due to a default video from chrome that
|
|
|
|
is overlapping the virtual background. */
|
2023-10-17 20:32:36 +08:00
|
|
|
test('Select one of the default backgrounds', async ({ browser, page }) => {
|
2023-03-29 22:16:47 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.applyBackground();
|
|
|
|
});
|
|
|
|
|
2023-08-02 00:45:33 +08:00
|
|
|
// following test is throwing failures due to mis-comparison screenshot
|
|
|
|
// as the emulated video is not static, we may add a mask in the middle part - where it moves the most
|
2023-10-17 20:32:36 +08:00
|
|
|
test('Managing new background', async ({ browser, page }) => {
|
2023-03-29 22:16:47 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
|
|
|
await webcam.managingNewBackground();
|
|
|
|
});
|
|
|
|
|
2023-10-17 20:32:36 +08:00
|
|
|
test('Keep background when rejoin', async ({ browser, context, page }) => {
|
2023-03-29 22:16:47 +08:00
|
|
|
const webcam = new Webcam(browser, page);
|
|
|
|
await webcam.init(true, true);
|
2023-03-30 00:56:53 +08:00
|
|
|
await webcam.keepBackgroundWhenRejoin(context);
|
2023-03-29 22:16:47 +08:00
|
|
|
});
|
|
|
|
});
|
2021-12-04 01:01:36 +08:00
|
|
|
});
|