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

61 lines
2.0 KiB
JavaScript
Raw Normal View History

const { test } = require('@playwright/test');
2022-01-20 03:50:59 +08:00
const { Chat } = require('./chat');
2022-01-20 04:02:54 +08:00
const { PrivateChat } = require('./privateChat');
2022-01-20 03:50:59 +08:00
test.describe.parallel('Chat', () => {
test('Send public message', async ({ browser, page }) => {
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.sendPublicMessage();
});
2022-01-20 04:02:54 +08:00
test('Send private message', async ({ browser, context, page }) => {
const privateChat = new PrivateChat(browser, context);
await privateChat.initPages(page);
await privateChat.sendPrivateMessage();
});
test('Clear chat', async ({ browser, page }) => {
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.clearChat();
});
2022-01-13 23:11:17 +08:00
test('Copy chat', async ({ browser, context, page }, testInfo) => {
2022-03-21 23:04:43 +08:00
test.fixme(testInfo.project.use.headless, 'Only works in headed mode');
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.copyChat(context);
2021-12-01 04:10:38 +08:00
});
2022-03-21 23:04:43 +08:00
test('Save chat', async ({ browser, page }, testInfo) => {
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
2022-03-21 23:04:43 +08:00
await chat.saveChat(testInfo);
});
2022-01-13 23:11:17 +08:00
2022-03-29 21:53:07 +08:00
test('Verify character limit', async ({ browser, page }) => {
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.characterLimit();
2022-01-13 23:11:17 +08:00
});
test('Not able to send an empty message', async ({ browser, page }) => {
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.emptyMessage();
2022-01-13 23:11:17 +08:00
});
2022-02-05 03:26:35 +08:00
test('Close private chat', async ({ browser, context, page }) => {
const privateChat = new PrivateChat(browser, context);
await privateChat.initPages(page);
await privateChat.closeChat();
});
test('Private chat disabled when user leaves meeting', async ({ browser, context, page }) => {
const privateChat = new PrivateChat(browser, context);
await privateChat.initPages(page);
await privateChat.chatDisabledUserLeaves();
});
2021-11-03 06:50:20 +08:00
});