Merge pull request #19573 from gabriellpr/fix-presentation-polling-test
test: Fix a few flaky tests
@ -22,6 +22,8 @@ exports.rating = 'div[data-test="rating"]';
|
||||
exports.errorScreenMessage = 'h1[data-test="errorScreenMessage"]';
|
||||
exports.errorMessageLabel = 'span[id="error-message"]';
|
||||
exports.shareCameraAsContent = 'li[data-test="shareCameraAsContent"]';
|
||||
exports.closePopup = 'button[data-test="closePopup"]';
|
||||
exports.restoreWelcomeMessages = 'li[data-test="restoreWelcomeMessages"]';
|
||||
|
||||
// Accesskey
|
||||
exports.chatButtonKey = 'div[accesskey="P"]';
|
||||
|
@ -59,13 +59,15 @@ class Options extends MultiUsers {
|
||||
}
|
||||
|
||||
async darkMode() {
|
||||
await this.modPage.waitForSelector(e.whiteboard);
|
||||
await this.modPage.waitAndClick(e.closePopup);
|
||||
await openSettings(this.modPage);
|
||||
|
||||
await this.modPage.waitAndClickElement(e.darkModeToggleBtn);
|
||||
await this.modPage.waitAndClick(e.modalConfirmButton);
|
||||
|
||||
const modPageLocator = this.modPage.getLocator('body');
|
||||
await this.modPage.page.setViewportSize({ width: 1924, height: 1080 });
|
||||
await this.modPage.page.setViewportSize({ width: 1366, height: 768 });
|
||||
const screenshotOptions = {
|
||||
maxDiffPixels: 1000,
|
||||
};
|
||||
@ -76,9 +78,14 @@ class Options extends MultiUsers {
|
||||
await openSettings(this.modPage);
|
||||
await this.modPage.waitAndClickElement(e.darkModeToggleBtn);
|
||||
await this.modPage.waitAndClick(e.modalConfirmButton);
|
||||
|
||||
await this.modPage.waitAndClick(e.chatOptions);
|
||||
await this.modPage.waitAndClick(e.restoreWelcomeMessages);
|
||||
}
|
||||
|
||||
async fontSizeTest() {
|
||||
await this.modPage.waitForSelector(e.whiteboard);
|
||||
await this.modPage.waitAndClick(e.closePopup);
|
||||
// Increasing font size
|
||||
await openSettings(this.modPage);
|
||||
await this.modPage.waitAndClick(e.increaseFontSize);
|
||||
@ -86,7 +93,7 @@ class Options extends MultiUsers {
|
||||
|
||||
const modPageLocator = this.modPage.getLocator('body');
|
||||
|
||||
await this.modPage.page.setViewportSize({ width: 1924, height: 1080 });
|
||||
await this.modPage.page.setViewportSize({ width: 1366, height: 768 });
|
||||
const screenshotOptions = {
|
||||
maxDiffPixels: 1000,
|
||||
};
|
||||
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 123 KiB |
@ -424,7 +424,7 @@ test.describe.parallel('Custom Parameters', () => {
|
||||
|
||||
test.describe.parallel('Audio', () => {
|
||||
// see https://github.com/bigbluebutton/bigbluebutton/issues/19427
|
||||
test('Auto join @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Auto join @ci', async ({ browser, context, page }) => {
|
||||
const customParam = new CustomParameters(browser, context);
|
||||
await customParam.initModPage(page, false, { joinParameter: c.autoJoin });
|
||||
await customParam.autoJoin();
|
||||
@ -437,7 +437,7 @@ test.describe.parallel('Custom Parameters', () => {
|
||||
});
|
||||
|
||||
// see https://github.com/bigbluebutton/bigbluebutton/issues/19428
|
||||
test('Force Listen Only @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Force Listen Only @ci', async ({ browser, context, page }) => {
|
||||
const customParam = new CustomParameters(browser, context);
|
||||
await customParam.initUserPage(false, context, { useModMeetingId: false, joinParameter: c.forceListenOnly });
|
||||
await customParam.forceListenOnly(page);
|
||||
@ -458,7 +458,7 @@ test.describe.parallel('Custom Parameters', () => {
|
||||
|
||||
test.describe.parallel('Presentation', () => {
|
||||
// see https://github.com/bigbluebutton/bigbluebutton/issues/19456
|
||||
test('Hide Presentation on join @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Hide Presentation on join @ci', async ({ browser, context, page }) => {
|
||||
const customParam = new CustomParameters(browser, context);
|
||||
await customParam.initModPage(page, true, { joinParameter: c.hidePresentationOnJoin });
|
||||
await customParam.initUserPage(true, context, { useModMeetingId: true, joinParameter: c.hidePresentationOnJoin });
|
||||
|
@ -63,7 +63,7 @@ class Polling extends MultiUsers {
|
||||
await this.modPage.waitAndClick(e.publishPollingLabel);
|
||||
await this.modPage.waitForSelector(e.restartPoll);
|
||||
|
||||
await this.modPage.hasElement(e.wbDrawnRectangle);
|
||||
await this.modPage.hasElement(e.wbDrawnRectangle, ELEMENT_WAIT_LONGER_TIME);
|
||||
await this.userPage.hasElement(e.wbDrawnRectangle);
|
||||
|
||||
await this.modPage.waitAndClick(e.closePollingBtn);
|
||||
@ -130,7 +130,7 @@ class Polling extends MultiUsers {
|
||||
}
|
||||
|
||||
async customInput() {
|
||||
await uploadSinglePresentation(this.modPage, e.questionSlideFileName);
|
||||
await uploadSinglePresentation(this.modPage, e.uploadPresentationFileName);
|
||||
|
||||
await this.modPage.waitAndClick(e.actions);
|
||||
await this.modPage.waitAndClick(e.polling);
|
||||
@ -139,6 +139,8 @@ class Polling extends MultiUsers {
|
||||
await this.modPage.type(e.pollQuestionArea, 'Test');
|
||||
await this.modPage.waitAndClick(e.addPollItem);
|
||||
await this.modPage.type(e.pollOptionItem, 'test1');
|
||||
await this.modPage.waitAndClick(e.addPollItem);
|
||||
await this.modPage.type(e.pollOptionItem2, 'test2');
|
||||
await this.modPage.waitAndClick(e.startPoll);
|
||||
|
||||
await this.userPage.hasElement(e.pollingContainer);
|
||||
|
@ -20,7 +20,7 @@ test.describe('Polling', async () => {
|
||||
await polling.pollAnonymous();
|
||||
});
|
||||
|
||||
test('Create quick poll - from the slide @ci @flaky', async () => {
|
||||
test('Create quick poll - from the slide @ci', async () => {
|
||||
await polling.quickPoll();
|
||||
});
|
||||
|
||||
@ -40,7 +40,7 @@ test.describe('Polling', async () => {
|
||||
await polling.notAbleStartNewPollWithoutPresentation();
|
||||
});
|
||||
|
||||
test('Custom input @ci @flaky', async () => {
|
||||
test('Custom input @ci', async () => {
|
||||
await polling.customInput();
|
||||
});
|
||||
|
||||
|
@ -91,11 +91,17 @@ class Presentation extends MultiUsers {
|
||||
await this.userPage.wasRemoved(e.presentationStatusInfo);
|
||||
await this.userPage.wasRemoved(e.smallToastMsg);
|
||||
|
||||
await this.modPage.reloadPage();
|
||||
await this.modPage.closeAudioModal();
|
||||
await this.modPage.closeAllToastNotifications();
|
||||
const modWhiteboardLocator = this.modPage.getLocator(e.whiteboard);
|
||||
await expect(modWhiteboardLocator).toHaveScreenshot('moderator-new-presentation-screenshot.png', {
|
||||
maxDiffPixels: 1000,
|
||||
});
|
||||
|
||||
await this.userPage.reloadPage();
|
||||
await this.userPage.closeAudioModal();
|
||||
await this.userPage.closeAllToastNotifications();
|
||||
const userWhiteboardLocator = this.userPage.getLocator(e.whiteboard);
|
||||
await expect(userWhiteboardLocator).toHaveScreenshot('viewer-new-presentation-screenshot.png', {
|
||||
maxDiffPixels: 1000,
|
||||
|
@ -59,7 +59,7 @@ test.describe.parallel('Presentation', () => {
|
||||
await presentation.hidePresentationToolbar();
|
||||
});
|
||||
|
||||
test('Zoom In, Zoom Out, Reset Zoom @ci @flaky', async ({ browser, context, page }) => {
|
||||
test('Zoom In, Zoom Out, Reset Zoom @ci', async ({ browser, context, page }) => {
|
||||
const presentation = new Presentation(browser, context);
|
||||
await presentation.initPages(page);
|
||||
await presentation.zoom();
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 29 KiB |