2021-11-03 00:45:52 +08:00
|
|
|
const { test } = require('@playwright/test');
|
2023-09-01 04:21:48 +08:00
|
|
|
const { fullyParallel } = require('../playwright.config');
|
2024-01-20 00:42:01 +08:00
|
|
|
const { linkIssue, initializePages } = require('../core/helpers');
|
2022-01-20 03:50:59 +08:00
|
|
|
const { Chat } = require('./chat');
|
2021-11-03 00:45:52 +08:00
|
|
|
|
2023-09-01 04:21:48 +08:00
|
|
|
test.describe('Chat', () => {
|
2023-04-27 20:36:19 +08:00
|
|
|
const chat = new Chat();
|
|
|
|
let context;
|
2024-01-20 00:42:01 +08:00
|
|
|
|
|
|
|
test.describe.configure({ mode: fullyParallel ? 'parallel' : 'serial' });
|
|
|
|
test[fullyParallel ? 'beforeEach' : 'beforeAll'](async ({ browser }) => {
|
|
|
|
const { context: innerContext } = await initializePages(chat, browser, { isMultiUser: true });
|
|
|
|
context = innerContext;
|
2023-04-27 20:36:19 +08:00
|
|
|
});
|
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#public-message-automated
|
2023-04-27 20:36:19 +08:00
|
|
|
test('Send public message @ci', async () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
await chat.sendPublicMessage();
|
2021-11-03 00:45:52 +08:00
|
|
|
});
|
2022-01-20 04:02:54 +08:00
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#private-message-automated
|
2023-04-27 20:36:19 +08:00
|
|
|
test('Send private message @ci', async () => {
|
|
|
|
await chat.sendPrivateMessage();
|
2022-01-20 04:02:54 +08:00
|
|
|
});
|
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Clear chat @ci', async () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
await chat.clearChat();
|
2021-11-03 00:45:52 +08:00
|
|
|
});
|
|
|
|
|
2023-04-27 20:36:19 +08:00
|
|
|
test.skip('Copy chat', async () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
await chat.copyChat(context);
|
2021-12-01 04:10:38 +08:00
|
|
|
});
|
|
|
|
|
2023-06-08 10:16:50 +08:00
|
|
|
test('Save chat @ci', async ({}, testInfo) => {
|
2022-03-21 23:04:43 +08:00
|
|
|
await chat.saveChat(testInfo);
|
2021-11-03 00:45:52 +08:00
|
|
|
});
|
2023-06-09 01:27:18 +08:00
|
|
|
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Verify character limit', async () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
await chat.characterLimit();
|
2022-01-13 23:11:17 +08:00
|
|
|
});
|
2023-06-09 01:27:18 +08:00
|
|
|
|
2022-07-26 03:42:48 +08:00
|
|
|
// https://docs.bigbluebutton.org/2.6/release-tests.html#sending-empty-chat-message-automated
|
2023-05-19 21:11:24 +08:00
|
|
|
test('Not able to send an empty message @ci', async () => {
|
2022-01-20 03:50:59 +08:00
|
|
|
await chat.emptyMessage();
|
2022-01-13 23:11:17 +08:00
|
|
|
});
|
2022-02-05 03:26:35 +08:00
|
|
|
|
2023-04-27 20:36:19 +08:00
|
|
|
test('Copy and paste public message', async () => {
|
2022-12-01 23:06:30 +08:00
|
|
|
linkIssue('15948');
|
2022-12-01 19:19:03 +08:00
|
|
|
await chat.copyPastePublicMessage();
|
2023-04-27 20:36:19 +08:00
|
|
|
})
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Send emoji on public chat @ci', async () => {
|
2023-04-27 20:36:19 +08:00
|
|
|
await chat.sendEmoji();
|
|
|
|
});
|
|
|
|
|
|
|
|
test.skip('Copy chat with emoji', async () => {
|
|
|
|
// Only works in headed mode
|
|
|
|
await chat.emojiCopyChat();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Close private chat @ci', async () => {
|
|
|
|
await chat.closePrivateChat();
|
|
|
|
});
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Save chat with emoji @ci', async ({}, testInfo) => {
|
2023-11-01 20:26:35 +08:00
|
|
|
await chat.emojiSaveChat(testInfo);
|
2023-04-27 20:36:19 +08:00
|
|
|
});
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Send emoji on private chat', async () => {
|
2023-04-27 20:36:19 +08:00
|
|
|
await chat.emojiSendPrivateChat();
|
|
|
|
});
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Send auto converted emoji on public chat', async () => {
|
2023-04-27 20:36:19 +08:00
|
|
|
await chat.autoConvertEmojiPublicChat();
|
|
|
|
});
|
|
|
|
|
|
|
|
test.skip('Copy chat with auto converted emoji', async () => {
|
|
|
|
await chat.autoConvertEmojiCopyChat();
|
|
|
|
});
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Auto convert emoji save chat', async ({ context }, testInfo) => {
|
2023-04-27 20:36:19 +08:00
|
|
|
await chat.autoConvertEmojiSaveChat(testInfo);
|
|
|
|
});
|
|
|
|
|
2023-11-01 22:28:38 +08:00
|
|
|
test('Send auto converted emoji on private chat', async () => {
|
2023-04-27 20:36:19 +08:00
|
|
|
await chat.autoConvertEmojiSendPrivateChat();
|
2022-12-01 19:19:03 +08:00
|
|
|
});
|
|
|
|
|
2023-04-27 20:36:19 +08:00
|
|
|
test('Private chat disabled when user leaves meeting @ci', async () => {
|
|
|
|
await chat.chatDisabledUserLeaves();
|
2022-08-30 20:28:34 +08:00
|
|
|
});
|
2023-02-14 21:59:46 +08:00
|
|
|
});
|