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

92 lines
2.8 KiB
JavaScript
Raw Permalink Normal View History

const { test } = require('../fixtures');
const { fullyParallel } = require('../playwright.config');
const { linkIssue, initializePages } = require('../core/helpers');
2022-01-20 03:50:59 +08:00
const { Chat } = require('./chat');
test.describe('Chat', () => {
2023-04-27 20:36:19 +08:00
const chat = new Chat();
test.describe.configure({ mode: fullyParallel ? 'parallel' : 'serial' });
test[fullyParallel ? 'beforeEach' : 'beforeAll'](async ({ browser }) => {
await initializePages(chat, browser, { isMultiUser: true });
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
2024-07-08 21:42:57 +08:00
test('Send public message', { tag: '@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
2024-07-08 21:42:57 +08:00
test('Send private message', { tag: '@ci' }, async () => {
2023-04-27 20:36:19 +08:00
await chat.sendPrivateMessage();
2022-01-20 04:02:54 +08:00
});
2024-07-08 21:42:57 +08:00
test('Clear chat', { tag: '@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 () => {
await chat.copyChat();
2021-12-01 04:10:38 +08:00
});
2024-07-08 21:42:57 +08:00
test('Save chat', { tag: '@ci' }, async ({}, testInfo) => {
2022-03-21 23:04:43 +08:00
await chat.saveChat(testInfo);
});
2024-07-08 21:42:57 +08:00
test('Verify character limit', { tag: '@ci' }, async () => {
2022-01-20 03:50:59 +08:00
await chat.characterLimit();
2022-01-13 23:11:17 +08:00
});
2022-07-26 03:42:48 +08:00
// https://docs.bigbluebutton.org/2.6/release-tests.html#sending-empty-chat-message-automated
2024-07-08 21:42:57 +08:00
test('Not able to send an empty message', { tag: '@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
})
2024-07-08 21:42:57 +08:00
test('Send emoji on public chat', { tag: '@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();
});
2024-07-08 21:42:57 +08:00
test('Close private chat', { tag: '@ci' }, async () => {
2023-04-27 20:36:19 +08:00
await chat.closePrivateChat();
});
2024-07-08 21:42:57 +08:00
test('Save chat with emoji', { tag: '@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();
});
test('Auto convert emoji save chat', async ({}, 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
});
// failure only reproducible in CI (user leaves but keeps shown in the mod user list)
2024-07-08 21:42:57 +08:00
test('Private chat disabled when user leaves meeting', { tag: ['@ci', '@flaky'] }, async () => {
2023-04-27 20:36:19 +08:00
await chat.chatDisabledUserLeaves();
2022-08-30 20:28:34 +08:00
});
2023-02-14 21:59:46 +08:00
});