bigbluebutton-Github/bigbluebutton-tests/playwright/screenshare/screenshare.spec.js
Anton Barboza de Sá 6564659750
test: All param tests on ci (#20878)
* test: all param tests on ci

* test: remove check for notification on parameter test

* test: remove 'Force restore presentation on new poll result' test - keep only one using the parameter -, fix selector and add all necessary assertions for the cases when the presentation should be restored

* test: enable param test in CI

* test: update tests tagging
2024-08-23 14:32:58 -03:00

55 lines
2.2 KiB
JavaScript

const { test } = require('../fixtures');
const { devices } = require('@playwright/test');
const { ScreenShare } = require('./screenshare');
test.describe.parallel('Screenshare', () => {
// https://docs.bigbluebutton.org/2.6/release-tests.html#sharing-screen-in-full-screen-mode-automated
test('Share screen', { tag: '@ci' }, async ({ browser, browserName, page }) => {
test.skip(browserName === 'firefox' && process.env.DISPLAY === undefined,
'Screenshare tests not able in Firefox browser without desktop'
);
const screenshare = new ScreenShare(browser, page);
await screenshare.init(true, true);
await screenshare.startSharing();
});
test('Start screenshare stops external video', { tag: [ '@ci', '@flaky' ] }, async ({ browser, page }) => {
const screenshare = new ScreenShare(browser, page);
await screenshare.init(true, true);
await screenshare.screenshareStopsExternalVideo();
});
test.describe.parallel('Mobile', () => {
test.beforeEach(({ browserName }) => {
test.skip(browserName === 'firefox', 'Mobile tests are not able in Firefox browser');
});
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();
});
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();
});
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();
});
});
});