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

92 lines
2.5 KiB
JavaScript
Raw Normal View History

const { test } = require('@playwright/test');
2022-12-01 23:06:30 +08:00
const { linkIssue } = require('../core/helpers');
2022-01-20 03:50:59 +08:00
const { Chat } = require('./chat');
2023-04-27 20:36:19 +08:00
test.describe.serial('Chat', () => {
const chat = new Chat();
let context;
test.beforeAll(async ({ browser }) => {
context = await browser.newContext();
const page = await context.newPage();
await chat.initModPage(page, true);
await chat.initUserPage(true, context);
});
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();
});
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
});
test('Clear chat @ci', async () => {
2022-01-20 03:50:59 +08:00
await chat.clearChat();
});
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
});
test('Save chat @ci', async ({}, testInfo) => {
2022-03-21 23:04:43 +08:00
await chat.saveChat(testInfo);
});
2023-04-27 20:36:19 +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-04-27 20:36:19 +08:00
2022-07-26 03:42:48 +08:00
// https://docs.bigbluebutton.org/2.6/release-tests.html#sending-empty-chat-message-automated
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
})
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();
});
test('Save chat with emoji @ci', async () => {
2023-04-27 20:36:19 +08:00
await chat.emojiSaveChat();
});
test('Send emoji on private chat', async () => {
await chat.emojiSendPrivateChat();
});
test('Send auto converted emoji on public chat', async () => {
await chat.autoConvertEmojiPublicChat();
});
test.skip('Copy chat with auto converted emoji', async () => {
await chat.autoConvertEmojiCopyChat();
});
test('Auto convert emoji save chat', async ({ context }, testInfo) => {
await chat.autoConvertEmojiSaveChat(testInfo);
});
test('Send auto converted emoji on private chat', async () => {
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
});