2021-11-26 02:23:58 +08:00
|
|
|
const { test } = require('@playwright/test');
|
|
|
|
const { Polling } = require('./poll');
|
|
|
|
|
|
|
|
test.describe.parallel('Polling', () => {
|
|
|
|
test('Create Poll', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.createPoll();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Create anonymous poll', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.pollAnonymous()
|
|
|
|
});
|
|
|
|
|
2021-12-01 04:10:38 +08:00
|
|
|
test('Create quick poll - from the slide', async ({ browser, context, page }) => {
|
2021-11-26 02:23:58 +08:00
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.quickPoll();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Create poll with user response', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.pollUserResponse();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Stop a poll manually', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.stopPoll();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Poll results in chat message', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.pollResultsOnChat();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Poll results on whiteboard', async ({ browser, page }) => {
|
|
|
|
const test = new Polling(browser);
|
|
|
|
await test.initModPage(page);
|
|
|
|
await test.pollResultsOnWhiteboard();
|
|
|
|
});
|
|
|
|
|
2021-12-01 04:10:38 +08:00
|
|
|
test('Poll results in a different presentation', async ({ browser, page }) => {
|
2021-11-26 02:23:58 +08:00
|
|
|
const test = new Polling(browser);
|
|
|
|
await test.initModPage(page);
|
|
|
|
await test.pollResultsInDifferentPresentation();
|
|
|
|
});
|
|
|
|
|
|
|
|
test('Manage response choices', async ({ browser, context, page }) => {
|
|
|
|
const test = new Polling(browser, context);
|
|
|
|
await test.initPages(page);
|
|
|
|
await test.manageResponseChoices();
|
|
|
|
});
|
|
|
|
});
|