2024-03-06 22:26:03 +08:00
|
|
|
const { test } = require('../fixtures');
|
|
|
|
const { devices } = require('@playwright/test');
|
2021-12-02 12:12:14 +08:00
|
|
|
const { ScreenShare } = require('./screenshare');
|
2021-12-01 01:14:03 +08:00
|
|
|
|
|
|
|
test.describe.parallel('Screenshare', () => {
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#sharing-screen-in-full-screen-mode-automated
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Share screen', { tag: '@ci' }, async ({ browser, browserName, page }) => {
|
2022-08-23 04:46:23 +08:00
|
|
|
test.skip(browserName === 'firefox' && process.env.DISPLAY === undefined,
|
2024-01-20 00:42:01 +08:00
|
|
|
'Screenshare tests not able in Firefox browser without desktop'
|
|
|
|
);
|
2021-12-02 12:12:14 +08:00
|
|
|
const screenshare = new ScreenShare(browser, page);
|
|
|
|
await screenshare.init(true, true);
|
|
|
|
await screenshare.startSharing();
|
2021-12-01 01:14:03 +08:00
|
|
|
});
|
2021-12-02 12:12:14 +08:00
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test('Start screenshare stops external video', { tag: [ '@ci', '@flaky' ] }, async ({ browser, page }) => {
|
2024-04-16 03:28:53 +08:00
|
|
|
const screenshare = new ScreenShare(browser, page);
|
|
|
|
await screenshare.init(true, true);
|
|
|
|
await screenshare.screenshareStopsExternalVideo();
|
|
|
|
});
|
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test.describe.parallel('Mobile', () => {
|
2022-03-08 02:56:08 +08:00
|
|
|
test.beforeEach(({ browserName }) => {
|
|
|
|
test.skip(browserName === 'firefox', 'Mobile tests are not able in Firefox browser');
|
|
|
|
});
|
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test('Share screen unavailable on Mobile Android', async ({ browser }) => {
|
|
|
|
const motoG4 = devices['Moto G4'];
|
|
|
|
const context = await browser.newContext({ ...motoG4 });
|
|
|
|
const page = await context.newPage();
|
|
|
|
const screenshare = new ScreenShare(browser, page);
|
|
|
|
await screenshare.init(true, true);
|
|
|
|
await screenshare.testMobileDevice();
|
|
|
|
});
|
2021-12-01 01:14:03 +08:00
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test('Share screen unavailable on Mobile iPhone', async ({ browser }) => {
|
|
|
|
const iPhone11 = devices['iPhone 11'];
|
|
|
|
const context = await browser.newContext({ ...iPhone11 });
|
|
|
|
const page = await context.newPage();
|
|
|
|
const screenshare = new ScreenShare(browser, page);
|
|
|
|
await screenshare.init(true, true);
|
|
|
|
await screenshare.testMobileDevice();
|
|
|
|
});
|
2021-12-01 01:14:03 +08:00
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test('Share screen unavailable on Tablet iPad', async ({ browser }) => {
|
|
|
|
const iPadPro11 = devices['iPad Pro 11'];
|
|
|
|
const context = await browser.newContext({ ...iPadPro11 });
|
|
|
|
const page = await context.newPage();
|
|
|
|
const screenshare = new ScreenShare(browser, page);
|
|
|
|
await screenshare.init(true, true);
|
|
|
|
await screenshare.testMobileDevice();
|
|
|
|
});
|
2021-12-01 01:14:03 +08:00
|
|
|
});
|
2021-12-04 01:01:36 +08:00
|
|
|
});
|