2024-03-06 22:26:03 +08:00
|
|
|
const { test } = require('../fixtures');
|
2021-12-01 13:36:20 +08:00
|
|
|
const { Notifications } = require('./notifications');
|
2022-01-20 03:50:59 +08:00
|
|
|
const { ChatNotifications } = require('./chatNotifications');
|
|
|
|
const { PresenterNotifications } = require('./presenterNotifications');
|
2022-08-03 07:37:16 +08:00
|
|
|
const { RecordingNotifications } = require('./recordingNotifications');
|
2023-07-08 01:05:06 +08:00
|
|
|
const c = require('../parameters/constants');
|
2021-12-01 13:36:20 +08:00
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test.describe.parallel('Notifications', { tag: '@ci' }, () => {
|
|
|
|
test('Save settings notification', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const notifications = new Notifications(browser, context);
|
|
|
|
await notifications.initModPage(page);
|
|
|
|
await notifications.saveSettingsNotification();
|
2021-12-01 13:36:20 +08:00
|
|
|
});
|
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test('Audio notifications', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const notifications = new Notifications(browser, context);
|
|
|
|
await notifications.initModPage(page);
|
|
|
|
await notifications.audioNotification();
|
2021-12-01 13:36:20 +08:00
|
|
|
});
|
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test('User join notification', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const notifications = new Notifications(browser, context);
|
|
|
|
await notifications.initModPage(page);
|
|
|
|
await notifications.getUserJoinPopupResponse();
|
|
|
|
});
|
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test('Raise and lower hand notification', async ({ browser, context, page }) => {
|
2022-01-20 03:57:13 +08:00
|
|
|
const notifications = new Notifications(browser, context);
|
|
|
|
await notifications.initModPage(page);
|
|
|
|
await notifications.raiseAndLowerHandNotification();
|
|
|
|
});
|
|
|
|
|
2024-08-24 01:32:58 +08:00
|
|
|
test.describe.parallel('Chat', { tag: '@ci' }, () => {
|
2024-01-20 00:42:01 +08:00
|
|
|
// both tests are flaky due to missing refactor to get data from GraphQL
|
2024-08-24 01:32:58 +08:00
|
|
|
test('Public Chat notification', { tag: '@flaky' }, async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const chatNotifications = new ChatNotifications(browser, context);
|
2022-06-24 09:38:49 +08:00
|
|
|
await chatNotifications.initPages(page, true);
|
2022-01-20 03:50:59 +08:00
|
|
|
await chatNotifications.publicChatNotification();
|
|
|
|
});
|
|
|
|
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Private Chat notification', { tag: '@flaky' }, async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const chatNotifications = new ChatNotifications(browser, context);
|
2022-06-24 09:38:49 +08:00
|
|
|
await chatNotifications.initPages(page, true);
|
2022-01-20 03:50:59 +08:00
|
|
|
await chatNotifications.privateChatNotification();
|
|
|
|
});
|
2022-08-03 07:37:16 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
test.describe.parallel('Recording', () => {
|
|
|
|
test('Notification appearing when user is not in audio', async ({ browser, page }) => {
|
|
|
|
const recordingNotifications = new RecordingNotifications(browser, page);
|
2023-08-23 04:25:50 +08:00
|
|
|
await recordingNotifications.init(true, true, { createParameter: c.recordMeeting });
|
2022-08-03 07:37:16 +08:00
|
|
|
await recordingNotifications.notificationNoAudio();
|
|
|
|
});
|
|
|
|
test('Notification appearing when user is in listen only', async ({ browser, page }) => {
|
|
|
|
const recordingNotifications = new RecordingNotifications(browser, page);
|
2023-08-23 04:25:50 +08:00
|
|
|
await recordingNotifications.init(true, true, { createParameter: c.recordMeeting });
|
2022-08-03 07:37:16 +08:00
|
|
|
await recordingNotifications.notificationListenOnly();
|
|
|
|
});
|
|
|
|
test('No notification appearing when user is in audio', async ({ browser, page }) => {
|
|
|
|
const recordingNotifications = new RecordingNotifications(browser, page);
|
2023-08-23 04:25:50 +08:00
|
|
|
await recordingNotifications.init(true, true, { createParameter: c.recordMeeting });
|
2022-08-03 07:37:16 +08:00
|
|
|
await recordingNotifications.noNotificationInAudio();
|
|
|
|
});
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Modal appearing when user wants to start recording', { tag: '@ci' }, async ({ browser, page }) => {
|
2022-08-03 07:37:16 +08:00
|
|
|
const recordingNotifications = new RecordingNotifications(browser, page);
|
2023-08-23 04:25:50 +08:00
|
|
|
await recordingNotifications.init(true, true, { createParameter: c.recordMeeting });
|
2022-08-03 07:37:16 +08:00
|
|
|
await recordingNotifications.modalStartRecording();
|
|
|
|
});
|
2022-01-20 03:50:59 +08:00
|
|
|
});
|
|
|
|
|
2024-07-08 21:42:57 +08:00
|
|
|
test.describe.parallel('Presenter', { tag: '@ci' }, () => {
|
2024-02-28 22:34:23 +08:00
|
|
|
test('Poll results notification', async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presenterNotifications = new PresenterNotifications(browser, context);
|
2024-03-04 22:00:28 +08:00
|
|
|
await presenterNotifications.initPages(page, true);
|
2022-01-20 03:50:59 +08:00
|
|
|
await presenterNotifications.publishPollResults();
|
|
|
|
});
|
|
|
|
|
2024-07-08 21:42:57 +08:00
|
|
|
test('Presentation upload notification', { tag: '@flaky' }, async ({ browser, context, page }) => {
|
2022-01-20 03:50:59 +08:00
|
|
|
const presenterNotifications = new PresenterNotifications(browser, context);
|
2022-06-24 09:38:49 +08:00
|
|
|
await presenterNotifications.initPages(page, true);
|
2022-01-20 03:50:59 +08:00
|
|
|
await presenterNotifications.fileUploaderNotification();
|
|
|
|
});
|
|
|
|
|
2022-08-23 04:46:23 +08:00
|
|
|
test('Screenshare notification', async ({ browser, browserName, context, page }) => {
|
|
|
|
test.skip(browserName === 'firefox' && process.env.DISPLAY === undefined,
|
2022-11-26 03:54:32 +08:00
|
|
|
"Screenshare tests not able in Firefox browser without desktop");
|
2022-01-20 03:50:59 +08:00
|
|
|
const presenterNotifications = new PresenterNotifications(browser, context);
|
|
|
|
await presenterNotifications.initModPage(page);
|
|
|
|
await presenterNotifications.screenshareToast();
|
|
|
|
});
|
2021-12-01 13:36:20 +08:00
|
|
|
});
|
2021-12-04 01:01:36 +08:00
|
|
|
});
|