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