2021-12-01 13:36:20 +08:00
|
|
|
const { test } = require('@playwright/test');
|
|
|
|
const { Notifications } = require('./notifications');
|
2022-01-20 03:50:59 +08:00
|
|
|
const { ChatNotifications } = require('./chatNotifications');
|
|
|
|
const { PresenterNotifications } = require('./presenterNotifications');
|
2021-12-01 13:36:20 +08:00
|
|
|
|
|
|
|
test.describe.parallel('Notifications', () => {
|
2022-06-08 02:52:22 +08:00
|
|
|
test('Save settings notification @ci', 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
|
|
|
});
|
|
|
|
|
2022-06-08 02:52:22 +08:00
|
|
|
test('Audio notifications @ci', 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
|
|
|
});
|
|
|
|
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
|
2022-06-08 02:52:22 +08:00
|
|
|
test('Raise and lower hand notification @ci', 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();
|
|
|
|
});
|
|
|
|
|
2022-01-20 03:50:59 +08:00
|
|
|
test.describe.parallel('Chat', () => {
|
|
|
|
test('Public Chat notification', async ({ browser, context, page }) => {
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Private Chat notification', async ({ browser, context, page }) => {
|
|
|
|
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-06-08 02:52:22 +08:00
|
|
|
test.describe.parallel('Presenter @ci', () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
test('Poll results notification', async ({ browser, context, page }) => {
|
2022-07-16 04:22:47 +08:00
|
|
|
test.fixme(true, 'Different behaviors in the development and production environment');
|
2022-01-20 03:50:59 +08:00
|
|
|
const presenterNotifications = new PresenterNotifications(browser, context);
|
|
|
|
await presenterNotifications.initModPage(page);
|
|
|
|
await presenterNotifications.publishPollResults();
|
|
|
|
});
|
|
|
|
|
2022-07-14 04:04:36 +08:00
|
|
|
test('Presentation upload notification', 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();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Screenshare notification', async ({ browser, context, page }) => {
|
|
|
|
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
|
|
|
});
|