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

40 lines
1.9 KiB
JavaScript
Raw Normal View History

const { test } = require('../fixtures');
2022-01-20 03:50:59 +08:00
const { ConnectionStatus } = require('./connectionStatus');
test.describe.parallel('Connection Status', () => {
2024-07-08 21:42:57 +08:00
test('Open connection Status Modal', { tag: '@ci' }, async ({ browser, context, page }) => {
2022-01-20 03:50:59 +08:00
const connectionStatus = new ConnectionStatus(browser, context);
await connectionStatus.initModPage(page);
await connectionStatus.connectionStatusModal();
});
2024-07-08 21:42:57 +08:00
test('Show network data in Connection Status', { tag: '@ci' }, async ({ browser, context, page }) => {
2022-01-20 03:50:59 +08:00
const connectionStatus = new ConnectionStatus(browser, context);
await connectionStatus.initModPage(page);
await connectionStatus.usersConnectionStatus();
});
2024-07-08 21:42:57 +08:00
test('Report a User with bad connection in Connection Issues', { tag: ['@ci', '@flaky'] }, async ({ browser, context, page }) => {
// The following test emulates a bad connection with a custom event
// PR #19289 changed the way it's measured, not able to do so with a custom event anymore
2022-01-20 03:50:59 +08:00
const connectionStatus = new ConnectionStatus(browser, context);
await connectionStatus.initModPage(page);
await connectionStatus.reportUserInConnectionIssues();
});
2022-06-21 08:22:14 +08:00
2024-07-08 21:42:57 +08:00
test('Redirect to data saving settings when a bad connection is detected', { tag: ['@ci', '@flaky'] }, async ({ browser, context, page }) => {
// The following test emulates a bad connection with a custom event
// PR #19289 changed the way it's measured, not able to do so with a custom event anymore
2022-06-21 08:22:14 +08:00
const connectionStatus = new ConnectionStatus(browser, context);
await connectionStatus.initModPage(page);
await connectionStatus.linkToSettingsTest();
});
2022-06-30 23:05:47 +08:00
test('Copy stats', async ({ browser, context, page }, testInfo) => {
2022-06-25 01:22:56 +08:00
test.fixme(testInfo.project.use.headless, 'Only works in headed mode');
2022-06-21 08:22:14 +08:00
const connectionStatus = new ConnectionStatus(browser, context);
await connectionStatus.initModPage(page);
await connectionStatus.copyStatsTest(context);
});
2022-01-20 03:50:59 +08:00
});