Skip to content

Commit

Permalink
test: re-enable and update fixed flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbsa committed Dec 13, 2024
1 parent cdaa6c9 commit 18220c6
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const RaiseHandButton = (props) => {

return (
<Styled.RaiseHandButton
data-test="raiseHandBtn"
data-test={raiseHand ? 'lowerHandBtn' : 'raiseHandBtn'}
icon="hand"
label={intl.formatMessage(label)}
description="Reactions"
Expand Down
2 changes: 1 addition & 1 deletion bigbluebutton-tests/playwright/core/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports.isSharingScreen = 'div[data-test="isSharingScreen"]';
exports.pdfFileName = '100PagesFile.pdf';
exports.reactionsButton = 'button[data-test="reactionsButton"]';
exports.raiseHandBtn = 'button[data-test="raiseHandBtn"]';
exports.lowerHandBtn = 'div[data-test="lowerHandBtn"]';
exports.lowerHandBtn = 'button[data-test="lowerHandBtn"]';
exports.raiseHandRejection = 'button[data-test="raiseHandRejection"]';
exports.meetingEndedModal = 'div[data-test="meetingEndedModal"]';
exports.leaveMeetingDropdown = 'button[data-test="leaveMeetingDropdown"]';
Expand Down
2 changes: 1 addition & 1 deletion bigbluebutton-tests/playwright/core/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class Page {

async checkElementCount(selector, count, description) {
const locator = await this.page.locator(selector);
await expect(locator, description).toHaveCount(count, { timeout: ELEMENT_WAIT_LONGER_TIME });
await expect(locator, description).toHaveCount(count, { timeout: ELEMENT_WAIT_TIME });
}

async hasValue(selector, value, description) {
Expand Down
19 changes: 6 additions & 13 deletions bigbluebutton-tests/playwright/notifications/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,15 @@ class Notifications extends MultiUsers {
}

async raiseAndLowerHandNotification() {
const { reactionsButton } = getSettings();
if (!reactionsButton) {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.hasElement(e.joinAudio);
return this.modPage.wasRemoved(e.reactionsButton);
}

await this.modPage.waitAndClick(e.reactionsButton);
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.raiseHandBtn);
await sleep(1000);
await this.modPage.waitAndClick(e.reactionsButton);
await this.modPage.waitAndClick(e.lowerHandBtn);
await this.modPage.wasRemoved(e.raiseHandRejection, 'should the raise hand be rejected');
await this.modPage.hasElement(e.raiseHandRejection, 'should display raise hand rejection button on toast notification');
await util.checkNotificationText(this.modPage, e.raisingHandToast);
await this.modPage.hasText(`${e.smallToastMsg}>>nth=0`, e.raisingHandToast);
await this.modPage.hasText(`${e.smallToastMsg}>>nth=1`, e.loweringHandToast);
await this.modPage.closeAllToastNotifications();
await this.modPage.waitAndClick(e.lowerHandBtn);
await this.modPage.wasRemoved(e.raiseHandRejection, 'should remove the toast notification with the raise hand rejection button');
await util.checkNotificationText(this.modPage, e.loweringHandToast);
}

async userJoinNotification(page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ test.describe.parallel('Notifications', { tag: '@ci' }, () => {

test('Presentation upload notification', { tag: '@flaky' }, async ({ browser, context, page }) => {
// uploader notification not displayed sometimes
// see https://github.com/bigbluebutton/bigbluebutton/issues/21321#issuecomment-2390301906
linkIssue(21321);
linkIssue(21813);
const presenterNotifications = new PresenterNotifications(browser, context);
await presenterNotifications.initPages(page);
await presenterNotifications.modPage.closeAllToastNotifications();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class Presentation extends MultiUsers {
await this.modPage.waitAndClick(e.resetZoomButton);
await expect(resetZoomButtonLocator, 'should the reset zoom button to contain the text 100%').toContainText(/100%/);
await expect(zoomOutButtonLocator, 'should the zoom out button to be disabled').toBeDisabled();
await expect(wbBox).toHaveScreenshot('moderator1-zoom100.png');
await expect(wbBox).toHaveScreenshot('moderator1-no-zoom.png');
}

async selectSlide() {
Expand Down
11 changes: 6 additions & 5 deletions bigbluebutton-tests/playwright/presentation/presentation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ test.describe.parallel('Presentation', { tag: '@ci' }, () => {
// https://docs.bigbluebutton.org/2.6/release-tests.html#uploading-a-presentation-automated
test('Upload single presentation', { tag: '@flaky' }, async ({ browser, context, page }) => {
// current presentation toast not being displayed sometimes
linkIssue(21576);
linkIssue(21813);
const presentation = new Presentation(browser, context);
await presentation.initPages(page, true);
await presentation.uploadSinglePresentationTest();
});

test('Upload Other Presentations Format', { tag: '@flaky' }, async ({ browser, context, page }) => {
// file with wrong (not expected) ideogram conversion pushed, which is used for assertions
// see issue below
linkIssue(18971);
const presentation = new Presentation(browser, context);
await presentation.initPages(page, true);
Expand All @@ -100,7 +99,7 @@ test.describe.parallel('Presentation', { tag: '@ci' }, () => {
// https://docs.bigbluebutton.org/2.6/release-tests.html#uploading-multiple-presentations-automated
test('Upload multiple presentations', { tag: '@flaky' }, async ({ browser, context, page }) => {
// current presentation toast not being displayed sometimes
linkIssue(21576);
linkIssue(21813);
const presentation = new Presentation(browser, context);
await presentation.initPages(page, true);
await presentation.uploadMultiplePresentationsTest();
Expand Down Expand Up @@ -128,14 +127,16 @@ test.describe.parallel('Presentation', { tag: '@ci' }, () => {
test('Upload and remove all presentations', { tag: '@flaky' }, async ({ browser, context, page }) => {
// sometimes the uploaded presentation is not displayed in the manage presentations modal
linkIssue(21624);
// current presentation toast not being displayed sometimes
linkIssue(21813);
const presentation = new Presentation(browser, context);
await presentation.initPages(page);
await presentation.uploadAndRemoveAllPresentations();
});

test('Remove previous presentation from previous presenter', { tag: '@flaky' }, async ({ browser, context, page }) => {
// missing the uploader presentation toast notification in some CI runs
linkIssue(21576)
// current presentation toast not being displayed sometimes
linkIssue(21813);
const presentation = new Presentation(browser, context);
await presentation.initModPage(page, true);
await presentation.initUserPage(true, context);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion bigbluebutton-tests/playwright/presentation/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function uploadSinglePresentation(test, fileName, uploadTimeout = UPLOAD_P
await test.hasText('body', e.statingUploadPresentationToast, 'should display the toast message uploading the presentation');

await test.waitAndClick(e.confirmManagePresentation);
await test.hasElement(e.presentationUploadProgressToast, 'should display the toast presentation upload progress after confirming the presentation to be uploaded', ELEMENT_WAIT_EXTRA_LONG_TIME);
await test.hasElement(e.presentationUploadProgressToast, 'should display the toast presentation upload progress after confirming the presentation to be uploaded');
await test.page.waitForFunction(([selector, firstSlideSrc]) => {
const currentSrc = document.querySelector(selector)
?.style?.backgroundImage?.split('"')[1];
Expand Down
4 changes: 3 additions & 1 deletion bigbluebutton-tests/playwright/user/lockViewers.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ class LockViewers extends MultiUsers {
await this.modPage.checkElementCount(e.whiteboardCursorIndicator, 1, 'should contain one whiteboard cursor indicator for the moderator');

await this.initUserPage2(true);
await this.userPage2.checkElementCount(e.whiteboardCursorIndicator, 0, 'should contain no whiteboard cursor indicator for the second attendee when locking viewers cursor');
await this.userPage2.checkElementCount(e.whiteboardCursorIndicator, 0,
'should contain no whiteboard cursor indicator for the second attendee when joining a meeting with the setting locked'
);

// Unlock user2
await this.modPage.waitAndClick(`${e.userListItem}>>nth=1`);
Expand Down
3 changes: 1 addition & 2 deletions bigbluebutton-tests/playwright/user/user.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ test.describe.parallel('User', { tag: '@ci' }, () => {
await lockViewers.lockSeeOtherViewersAnnotations();
});

test('Lock see other viewers cursor', { tag: '@flaky' }, async ({ browser, context, page }) => {
// Unlocking specific user not working, see https://github.com/bigbluebutton/bigbluebutton/issues/21297
test('Lock see other viewers cursor', async ({ browser, context, page }) => {
const lockViewers = new LockViewers(browser, context);
await lockViewers.initPages(page);
await lockViewers.lockSeeOtherViewersCursor();
Expand Down

0 comments on commit 18220c6

Please sign in to comment.