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

62 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) => {
test.fixme(testInfo.config.projects[0].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-01-13 23:11:17 +08:00
test.skip('Save chat', async ({ browser, page }) => {
test.fixme();
2022-01-20 03:50:59 +08:00
const chat = new Chat(browser, page);
await chat.init(true, true);
await chat.saveChat();
});
2022-01-13 23:11:17 +08:00
test('Verify character limit (5000 characters)', 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
});