2021-11-23 01:06:59 +08:00
|
|
|
const { test } = require('@playwright/test');
|
2023-05-16 20:51:25 +08:00
|
|
|
const { testSpeakerButton } = require('../core/elements');
|
2021-12-02 12:12:14 +08:00
|
|
|
const { Audio } = require('./audio');
|
2021-11-23 01:06:59 +08:00
|
|
|
|
2023-05-23 21:43:41 +08:00
|
|
|
test.describe.serial('Audio', () => {
|
2023-05-16 20:51:25 +08:00
|
|
|
const audio = new Audio();
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
|
|
const context = await browser.newContext();
|
|
|
|
const page = await context.newPage();
|
2023-05-23 21:43:08 +08:00
|
|
|
await audio.initModPage(page, true);
|
|
|
|
await audio.initUserPage(true, context);
|
2023-05-16 20:51:25 +08:00
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#listen-only-mode-automated
|
2023-05-16 20:51:25 +08:00
|
|
|
test('Join audio with Listen Only @ci', async () => {
|
2021-11-23 01:06:59 +08:00
|
|
|
await audio.joinAudio();
|
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#join-audio-automated
|
2023-05-16 20:51:25 +08:00
|
|
|
test('Join audio with Microphone @ci', async () => {
|
2021-11-23 01:06:59 +08:00
|
|
|
await audio.joinMicrophone();
|
|
|
|
});
|
2022-07-16 04:54:16 +08:00
|
|
|
|
2023-06-15 09:36:18 +08:00
|
|
|
test('Change audio input and keep it connected', async () => {
|
|
|
|
await audio.changeAudioInput();
|
|
|
|
});
|
|
|
|
|
2022-07-26 01:38:33 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#muteunmute
|
2023-05-16 20:51:25 +08:00
|
|
|
test('Mute yourself by clicking the mute button', async () => {
|
2022-07-16 04:54:16 +08:00
|
|
|
await audio.muteYourselfByButton();
|
|
|
|
});
|
|
|
|
|
2023-05-19 22:22:51 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#choosing-different-sources
|
2023-05-18 20:39:06 +08:00
|
|
|
test('Keep the last mute state after rejoining audio @ci', async () => {
|
|
|
|
await audio.keepMuteStateOnRejoin();
|
2022-07-16 04:54:16 +08:00
|
|
|
});
|
|
|
|
|
2023-05-19 22:22:51 +08:00
|
|
|
// Talking Indicator
|
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#talking-indicator
|
2023-05-18 20:39:06 +08:00
|
|
|
test('Mute yourself by clicking the talking indicator', async () => {
|
2023-05-19 22:22:51 +08:00
|
|
|
await audio.muteYourselfByTalkingIndicator();
|
2023-05-18 20:39:06 +08:00
|
|
|
});
|
|
|
|
|
2023-05-19 22:22:51 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#talking-indicator
|
|
|
|
test('Mute another user by clicking the talking indicator', async () => {
|
|
|
|
await audio.muteAnotherUser();
|
2022-07-16 04:54:16 +08:00
|
|
|
});
|
2021-12-04 01:01:36 +08:00
|
|
|
});
|