From bc0082d9472603f94c0661b90f06ac4e7e0be5fa Mon Sep 17 00:00:00 2001 From: Gabriel Porfirio Date: Thu, 21 Mar 2024 10:06:32 -0300 Subject: [PATCH] changed from createparamter to joinparameter --- .../playwright/options/options.js | 4 +- .../playwright/options/options.spec.js | 2 +- .../playwright/parameters/customparameters.js | 2 - .../playwright/parameters/parameters.spec.js | 6 +- bigbluebutton-tests/playwright/user/status.js | 1 - .../playwright/user/user.spec.js | 6 +- .../playwright/whiteboard/whiteboard.spec.js | 72 +++++++++---------- 7 files changed, 44 insertions(+), 49 deletions(-) diff --git a/bigbluebutton-tests/playwright/options/options.js b/bigbluebutton-tests/playwright/options/options.js index 0f770cb66d..3081419344 100644 --- a/bigbluebutton-tests/playwright/options/options.js +++ b/bigbluebutton-tests/playwright/options/options.js @@ -50,8 +50,7 @@ class Options extends MultiUsers { const langDropdown = await this.modPage.page.$(e.languageSelector); await langDropdown.selectOption({ value: locale }); await this.modPage.waitAndClick(e.modalConfirmButton); - await this.modPage.waitForSelector(e.toastContainer); - + for (const selector in currentValuesBySelector) { await this.modPage.hasText(selector, currentValuesBySelector[selector]); } @@ -72,7 +71,6 @@ class Options extends MultiUsers { maxDiffPixels: 1000, }; - await this.modPage.closeAllToastNotifications(); await expect(modPageLocator).toHaveScreenshot('moderator-page-dark-mode.png', screenshotOptions); await openSettings(this.modPage); diff --git a/bigbluebutton-tests/playwright/options/options.spec.js b/bigbluebutton-tests/playwright/options/options.spec.js index c7e1693d61..6ba62dc1ef 100644 --- a/bigbluebutton-tests/playwright/options/options.spec.js +++ b/bigbluebutton-tests/playwright/options/options.spec.js @@ -12,7 +12,7 @@ test.describe('Options', () => { test.describe.configure({ mode: fullyParallel ? 'parallel' : 'serial' }); test[fullyParallel ? 'beforeEach' : 'beforeAll'](async ({ browser }) => { - await initializePages(options, browser, { createParameter: hidePresentationToast }); + await initializePages(options, browser, { joinParameter: hidePresentationToast }); }); test('Open about modal', async () => { diff --git a/bigbluebutton-tests/playwright/parameters/customparameters.js b/bigbluebutton-tests/playwright/parameters/customparameters.js index 7e641eac03..69e3f5c189 100644 --- a/bigbluebutton-tests/playwright/parameters/customparameters.js +++ b/bigbluebutton-tests/playwright/parameters/customparameters.js @@ -102,7 +102,6 @@ class CustomParameters extends MultiUsers { async skipCheckOnFirstJoin() { await this.modPage.waitAndClick(e.microphoneButton, ELEMENT_WAIT_LONGER_TIME); await this.modPage.hasElement(e.establishingAudioLabel); - await this.modPage.hasElement(e.smallToastMsg); await this.modPage.hasElement(e.isTalking); await this.modPage.leaveAudio(); await this.modPage.waitAndClick(e.joinAudio); @@ -151,7 +150,6 @@ class CustomParameters extends MultiUsers { const { presentationHidden,pollEnabled } = getSettings(); if (!presentationHidden) await this.userPage.waitAndClick(e.minimizePresentation); if (pollEnabled) await util.poll(this.modPage, this.userPage); - await this.userPage.waitForSelector(e.smallToastMsg); await this.userPage.checkElement(e.restorePresentation); } diff --git a/bigbluebutton-tests/playwright/parameters/parameters.spec.js b/bigbluebutton-tests/playwright/parameters/parameters.spec.js index 6079d55f6a..e0bc996741 100644 --- a/bigbluebutton-tests/playwright/parameters/parameters.spec.js +++ b/bigbluebutton-tests/playwright/parameters/parameters.spec.js @@ -454,7 +454,7 @@ test.describe.parallel('Custom Parameters', () => { test('Skip audio check on first join', async ({ browser, context, page }) => { const customParam = new CustomParameters(browser, context); - await customParam.initModPage(page, false, { createParameter: hidePresentationToast, joinParameter: c.skipCheckOnFirstJoin }); + await customParam.initModPage(page, false, { joinParameter: `${hidePresentationToast}&${c.skipCheckOnFirstJoin}` }); await customParam.skipCheckOnFirstJoin(); }); }); @@ -477,8 +477,8 @@ test.describe.parallel('Custom Parameters', () => { test('Force Restore Presentation On New Poll Result', async ({ browser, context, page }) => { const customParam = new CustomParameters(browser, context); - const joinParameter = c.forceRestorePresentationOnNewEvents; - await customParam.initModPage(page, true, { createParameter: hidePresentationToast, joinParameter }); + const joinParameter = `${c.forceRestorePresentationOnNewEvents}&${hidePresentationToast}`; + await customParam.initModPage(page, true, joinParameter ); await customParam.forceRestorePresentationOnNewPollResult(joinParameter); }); }); diff --git a/bigbluebutton-tests/playwright/user/status.js b/bigbluebutton-tests/playwright/user/status.js index 9d737e35c0..0afe895e62 100644 --- a/bigbluebutton-tests/playwright/user/status.js +++ b/bigbluebutton-tests/playwright/user/status.js @@ -13,7 +13,6 @@ class Status extends Page { async changeUserStatus() { const { userStatusEnabled } = getSettings(); - await waitAndClearDefaultPresentationNotification(this); if(!userStatusEnabled) { await this.waitAndClick(e.currentUser); return this.wasRemoved(e.setStatus); diff --git a/bigbluebutton-tests/playwright/user/user.spec.js b/bigbluebutton-tests/playwright/user/user.spec.js index 94020dbccc..29de4983a8 100644 --- a/bigbluebutton-tests/playwright/user/user.spec.js +++ b/bigbluebutton-tests/playwright/user/user.spec.js @@ -39,7 +39,7 @@ test.describe.parallel('User', () => { // https://docs.bigbluebutton.org/2.6/release-tests.html#set-status--raise-hand-automated test('Change user status @ci', async ({ browser, page }) => { const status = new Status(browser, page); - await status.init(true, true, { createParameter: hidePresentationToast }); + await status.init(true, true, { joinParameter: hidePresentationToast }); await status.changeUserStatus(); }); @@ -212,8 +212,8 @@ test.describe.parallel('User', () => { test('Lock see other viewers annotations', async ({ browser, context, page }) => { const lockViewers = new LockViewers(browser, context); - await lockViewers.initModPage(page, true, { createParameter: hidePresentationToast }); - await lockViewers.initUserPage(true, context, { createParameter: hidePresentationToast }); + await lockViewers.initModPage(page, true, { joinParameter: hidePresentationToast }); + await lockViewers.initUserPage(true, context, { joinParameter: hidePresentationToast }); await lockViewers.lockSeeOtherViewersAnnotations(); }); diff --git a/bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js b/bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js index 9efe98fbb3..5dc529984d 100644 --- a/bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js +++ b/bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js @@ -44,127 +44,127 @@ test.describe.parallel('Whiteboard tools - visual regression', () => { test('Draw rectangle', async ({ browser, context, page }) => { const drawRectangle = new DrawRectangle(browser, context); - await drawRectangle.initModPage(page, true, { customMeetingId: 'draw_rectangle_meeting', createParameter: hidePresentationToast }); - await drawRectangle.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawRectangle.initModPage(page, true, { customMeetingId: 'draw_rectangle_meeting', joinParameter: hidePresentationToast }); + await drawRectangle.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawRectangle.test(); }); test('Draw ellipse', async ({ browser, context, page }) => { const drawEllipse = new DrawEllipse(browser, context); - await drawEllipse.initModPage(page, true, { customMeetingId: 'draw_ellipse_meeting', createParameter: hidePresentationToast }); - await drawEllipse.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawEllipse.initModPage(page, true, { customMeetingId: 'draw_ellipse_meeting', joinParameter: hidePresentationToast }); + await drawEllipse.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawEllipse.test(); }); test('Draw triangle', async ({ browser, context, page }) => { const drawTriangle = new DrawTriangle(browser, context); - await drawTriangle.initModPage(page, true, { customMeetingId: 'draw_triangle_meeting', createParameter: hidePresentationToast }); - await drawTriangle.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawTriangle.initModPage(page, true, { customMeetingId: 'draw_triangle_meeting', joinParameter: hidePresentationToast }); + await drawTriangle.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawTriangle.test(); }); test('Draw line', async ({ browser, context, page }) => { const drawLine = new DrawLine(browser, context); - await drawLine.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await drawLine.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawLine.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await drawLine.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawLine.test(); }); test('Draw with pencil', async ({ browser, context, page }) => { const drawPencil = new DrawPencil(browser, context); - await drawPencil.initModPage(page, true, { customMeetingId: 'draw_pencil_meeting', createParameter: hidePresentationToast }); - await drawPencil.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawPencil.initModPage(page, true, { customMeetingId: 'draw_pencil_meeting', joinParameter: hidePresentationToast }); + await drawPencil.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawPencil.test(); }); test('Type text', async ({ browser, context, page }) => { const drawText = new DrawText(browser, context); - await drawText.initModPage(page, true, { customMeetingId: 'draw_text_meeting', createParameter: hidePresentationToast }); - await drawText.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawText.initModPage(page, true, { customMeetingId: 'draw_text_meeting', joinParameter: hidePresentationToast }); + await drawText.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawText.test(); }); test('Create sticky note', async ({ browser, context, page }) => { const drawStickyNote = new DrawStickyNote(browser, context); - await drawStickyNote.initModPage(page, true, { customMeetingId: 'draw_sticky_meeting', createParameter: hidePresentationToast }); - await drawStickyNote.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawStickyNote.initModPage(page, true, { customMeetingId: 'draw_sticky_meeting', joinParameter: hidePresentationToast }); + await drawStickyNote.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawStickyNote.test(); }); test('Pan', async ({ browser, context, page }) => { const pan = new Pan(browser, context); - await pan.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await pan.initUserPage(true, context, { createParameter: hidePresentationToast }); + await pan.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await pan.initUserPage(true, context, { joinParameter: hidePresentationToast }); await pan.test(); }); test('Eraser', async ({ browser, context, page }) => { const eraser = new Eraser(browser, context); - await eraser.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await eraser.initUserPage(true, context, { createParameter: hidePresentationToast }); + await eraser.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await eraser.initUserPage(true, context, { joinParameter: hidePresentationToast }); await eraser.test(); }); test('Draw arrow', async ({ browser, context, page }) => { const drawArrow = new DrawArrow(browser, context); - await drawArrow.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await drawArrow.initUserPage(true, context, { createParameter: hidePresentationToast }); + await drawArrow.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await drawArrow.initUserPage(true, context, { joinParameter: hidePresentationToast }); await drawArrow.test(); }); test('Delete drawing', async ({ browser, context, page }) => { const deleteDrawing = new DeleteDrawing(browser, context); - await deleteDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await deleteDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await deleteDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await deleteDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await deleteDrawing.test(); }); test('Undo drawing', async ({ browser, context, page }) => { const undoDrawing = new UndoDrawing(browser, context); - await undoDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await undoDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await undoDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await undoDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await undoDrawing.test(); }); test('Redo drawing', async ({ browser, context, page }) => { const redoDrawing = new RedoDrawing(browser, context); - await redoDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await redoDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await redoDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await redoDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await redoDrawing.test(); }); test('Change color', async ({ browser, context, page }) => { const changeColor = new ChangeStyles(browser, context); - await changeColor.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await changeColor.initUserPage(true, context, { createParameter: hidePresentationToast }); + await changeColor.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await changeColor.initUserPage(true, context, { joinParameter: hidePresentationToast }); await changeColor.changingColor(); }); test('Fill drawing', async ({ browser, context, page }) => { const fillDrawing = new ChangeStyles(browser, context); - await fillDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await fillDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await fillDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await fillDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await fillDrawing.fillDrawing(); }); test('Dash drawing', async ({ browser, context, page }) => { const dashDrawing = new ChangeStyles(browser, context); - await dashDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await dashDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await dashDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await dashDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await dashDrawing.dashDrawing(); }); test('Size drawing', async ({ browser, context, page }) => { const sizeDrawing = new ChangeStyles(browser, context); - await sizeDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await sizeDrawing.initUserPage(true, context, { createParameter: hidePresentationToast }); + await sizeDrawing.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await sizeDrawing.initUserPage(true, context, { joinParameter: hidePresentationToast }); await sizeDrawing.sizeDrawing(); }); test('Real time text typing', async ({ browser, context, page }) => { const realTimeText = new RealTimeText(browser, context); - await realTimeText.initModPage(page, true, { customMeetingId: 'draw_line_meeting', createParameter: hidePresentationToast }); - await realTimeText.initUserPage(true, context, { createParameter: hidePresentationToast }); + await realTimeText.initModPage(page, true, { customMeetingId: 'draw_line_meeting', joinParameter: hidePresentationToast }); + await realTimeText.initUserPage(true, context, { joinParameter: hidePresentationToast }); await realTimeText.realTimeTextTyping(); });