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

44 lines
1.3 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 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();
});
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
});
2021-11-03 06:50:20 +08:00
});
2022-01-13 23:11:17 +08:00