ef47bb5762
the default presentation notification on the moderator page. Waiting until initPages() is finished to do this is problematic, because it might take long enough to init the user page that the toast has disappeared from the moderator page by the time initPages() finishes. Change all the places in the test suite where initPages() is called right before waitAndClearDefaultPresentationNotification to use the new option instead. In one place (raiseAndLowerHand) I also dropped waiting and clearing the notification on the user page because it was causing problems and doesn't seem to be necessary.
63 lines
2.1 KiB
JavaScript
63 lines
2.1 KiB
JavaScript
const { test } = require('@playwright/test');
|
|
const { Polling } = require('./poll');
|
|
|
|
test.describe.parallel('Polling', () => {
|
|
test.describe.parallel('Manage', () => {
|
|
test('Create Poll @ci', async ({ browser, context, page }) => {
|
|
const polling = new Polling(browser, context);
|
|
await polling.initPages(page, true);
|
|
await polling.createPoll();
|
|
});
|
|
|
|
test('Create anonymous poll @ci', async ({ browser, context, page }) => {
|
|
const polling = new Polling(browser, context);
|
|
await polling.initPages(page);
|
|
await polling.pollAnonymous();
|
|
});
|
|
|
|
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 @ci', async ({ browser, context, page }) => {
|
|
const polling = new Polling(browser, context);
|
|
await polling.initPages(page);
|
|
await polling.pollUserResponse();
|
|
});
|
|
|
|
test('Stop a poll manually @ci', async ({ browser, context, page }) => {
|
|
const polling = new Polling(browser, context);
|
|
await polling.initPages(page);
|
|
await polling.stopPoll();
|
|
});
|
|
|
|
test('Manage response choices @ci', 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 @ci', async ({ browser, context, page }) => {
|
|
const polling = new Polling(browser, context);
|
|
await polling.initPages(page);
|
|
await polling.pollResultsOnChat();
|
|
});
|
|
|
|
test('Poll results on whiteboard @ci', 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();
|
|
});
|
|
});
|
|
});
|