Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Parameter tests fix #18377

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -276,7 +276,7 @@ class ActionsDropdown extends PureComponent {
label: intl.formatMessage(intlMessages.layoutModal),
key: 'layoutModal',
onClick: () => this.setLayoutModalIsOpen(true),
dataTest: 'layoutModal',
dataTest: 'manageLayoutBtn',
});
}

Expand Down
3 changes: 1 addition & 2 deletions bigbluebutton-tests/playwright/core/elements.js
Expand Up @@ -158,7 +158,6 @@ exports.usersList = 'div[data-test="userList"]';
exports.selectCameraQualityId = 'select[id="setQuality"]';
exports.virtualBackgrounds = 'div[data-test="virtualBackground"]';
exports.learningDashboard = 'li[data-test="learningDashboard"]';
exports.layoutModal = 'li[data-test="layoutModal"]';

// Notes
exports.sharedNotes = 'div[data-test="sharedNotes"]';
Expand Down Expand Up @@ -491,7 +490,7 @@ exports.sharedNotesBackground = 'div[data-test="notes"]';
exports.whiteboardOptionsButton = 'button[data-test="whiteboardOptionsButton"]';

// Layout management
exports.layoutSettingsModalButton = 'li[data-test="layoutModal"]';
exports.manageLayoutBtn = 'li[data-test="manageLayoutBtn"]';
exports.focusOnPresentation = 'button[data-test="presentationFocusLayout"]';
exports.focusOnVideo = 'button[data-test="videoFocusLayout"]';
exports.smartLayout = 'button[data-test="smartLayout"]';
Expand Down
10 changes: 5 additions & 5 deletions bigbluebutton-tests/playwright/layouts/layouts.js
Expand Up @@ -5,7 +5,7 @@ const { reopenChatSidebar, checkScreenshots } = require('./util');
class Layouts extends MultiUsers {
async focusOnPresentation() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
await this.modPage.waitAndClick(e.manageLayoutBtn);
await this.modPage.waitAndClick(e.focusOnPresentation);
await this.modPage.waitAndClick(e.updateLayoutBtn);
await this.modPage.waitAndClick(e.toastContainer);
Expand All @@ -16,7 +16,7 @@ class Layouts extends MultiUsers {

async focusOnVideo() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
await this.modPage.waitAndClick(e.manageLayoutBtn);
await this.modPage.waitAndClick(e.focusOnVideo);
await this.modPage.waitAndClick(e.updateLayoutBtn);
await this.modPage.waitAndClick(e.toastContainer);
Expand All @@ -27,7 +27,7 @@ class Layouts extends MultiUsers {

async smartLayout() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
await this.modPage.waitAndClick(e.manageLayoutBtn);
await this.modPage.waitAndClick(e.smartLayout);
await this.modPage.waitAndClick(e.updateLayoutBtn);
await this.modPage.waitAndClick(e.toastContainer);
Expand All @@ -44,7 +44,7 @@ class Layouts extends MultiUsers {

async customLayout() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
await this.modPage.waitAndClick(e.manageLayoutBtn);
await this.modPage.waitAndClick(e.customLayout);
await this.modPage.waitAndClick(e.updateLayoutBtn);
await this.modPage.waitAndClick(e.toastContainer);
Expand Down Expand Up @@ -81,7 +81,7 @@ class Layouts extends MultiUsers {

async updateEveryone() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.layoutSettingsModalButton);
await this.modPage.waitAndClick(e.manageLayoutBtn);
await this.modPage.waitAndClick(e.customLayout);
await this.modPage.waitAndClick(e.updateEveryoneLayoutBtn);
await this.modPage.waitAndClick(e.toastContainer);
Expand Down
195 changes: 0 additions & 195 deletions bigbluebutton-tests/playwright/parameters/customparameters.js
Expand Up @@ -230,201 +230,6 @@ class CustomParameters extends MultiUsers {
expect(await this.modPage.getLocator(e.selectCameraQualityId).inputValue()).toBe('low');
await this.modPage.waitAndClick(e.startSharingWebcam);
}

async breakoutRooms() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.wasRemoved(e.createBreakoutRooms);
}

async speechRecognition() {
await this.modPage.waitForSelector(e.audioModal, ELEMENT_WAIT_LONGER_TIME);
await this.modPage.wasRemoved(e.speechRecognition);
}

async captions() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.wasRemoved(e.writeClosedCaptions);
}

async chat() {
await this.modPage.wasRemoved(e.publicChat);
}

async externalVideos() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.wasRemoved(e.shareExternalVideoBtn);
}

async layouts() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.wasRemoved(e.layoutModal);
}

async learningDashboard() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.wasRemoved(e.learningDashboard);
}

async polls() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.wasRemoved(e.polling);
}

async screenshare() {
await this.modPage.wasRemoved(e.startScreenSharing);
}

async sharedNotes() {
await this.modPage.wasRemoved(e.sharedNotes);
}

async virtualBackgrounds() {
await this.modPage.waitAndClick(e.joinVideo);
await this.modPage.wasRemoved(e.virtualBackgrounds);
}

async downloadPresentationWithAnnotations() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.managePresentations);
await this.modPage.waitAndClick(e.presentationOptionsDownloadBtn);
await this.modPage.wasRemoved(e.sendPresentationInCurrentStateBtn);
}

async importPresentationWithAnnotationsFromBreakoutRooms() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.createBreakoutRooms);
await this.modPage.wasRemoved(e.captureBreakoutWhiteboard);
}

async importSharedNotesFromBreakoutRooms() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.createBreakoutRooms);
await this.modPage.wasRemoved(e.captureBreakoutSharedNotes);
}

async presentation() {
await this.modPage.wasRemoved(e.whiteboard);
await this.modPage.wasRemoved(e.minimizePresentation);
await this.modPage.wasRemoved(e.restorePresentation);
}

async customVirtualBackground() {
await this.modPage.waitAndClick(e.joinVideo);
await this.modPage.waitForSelector(e.webcamSettingsModal);
await this.modPage.wasRemoved(e.inputBackgroundButton);
}

async slideSnapshot() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.whiteboardOptionsButton);
await this.modPage.hasElement(e.presentationFullscreen);
await this.modPage.wasRemoved(e.presentationSnapshot);
}

async cameraAsContent() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.managePresentations);
await this.modPage.wasRemoved(e.shareCameraAsContent);
}

// Disabled Features Exclude
async breakoutRoomsExclude() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.hasElement(e.createBreakoutRooms);
}

async speechRecognitionExclude() {
const { speechRecognitionEnabled } = getSettings();
test.fail(!speechRecognitionEnabled, 'Live Transcription is disabled');
await this.modPage.waitForSelector(e.audioModal, ELEMENT_WAIT_LONGER_TIME);
await this.modPage.hasElement(e.speechRecognition);
}

async captionsExclude() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.hasElement(e.writeClosedCaptions);
}

async chatExclude() {
await this.modPage.hasElement(e.publicChat);
}

async externalVideosExclude() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.shareExternalVideoBtn);
}

async layoutsExclude() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.layoutModal);
}

async learningDashboardExclude() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.hasElement(e.learningDashboard);
}

async pollsExclude() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.polling);
}

async screenshareExclude() {
await this.modPage.hasElement(e.startScreenSharing);
}

async sharedNotesExclude() {
await this.modPage.hasElement(e.sharedNotes);
}

async virtualBackgroundsExclude() {
await this.modPage.waitAndClick(e.joinVideo);
await this.modPage.hasElement(e.virtualBackgrounds);
}

async downloadPresentationWithAnnotationsExclude() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.managePresentations);
await this.modPage.waitAndClick(e.presentationOptionsDownloadBtn);
await this.modPage.hasElement(e.sendPresentationInCurrentStateBtn);
}

async importPresentationWithAnnotationsFromBreakoutRoomsExclude() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.createBreakoutRooms);
await this.modPage.hasElement(e.captureBreakoutWhiteboard);
}

async importSharedNotesFromBreakoutRoomsExclude() {
await this.modPage.waitAndClick(e.manageUsers);
await this.modPage.waitAndClick(e.createBreakoutRooms);
await this.modPage.hasElement(e.captureBreakoutSharedNotes);
}

async presentationExclude() {
await this.modPage.hasElement(e.whiteboard);
await this.modPage.waitAndClick(e.minimizePresentation);
await this.modPage.hasElement(e.restorePresentation);
}

async customVirtualBackgroundExclude() {
await this.modPage.waitAndClick (e.joinVideo);
await this.modPage.waitForSelector(e.webcamSettingsModal);
await this.modPage.hasElement(e.inputBackgroundButton);
}

async slideSnapshotExclude() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.whiteboardOptionsButton);
await this.modPage.hasElement(e.presentationSnapshot);
}

async cameraAsContentExclude() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.shareCameraAsContent);
}
}

exports.CustomParameters = CustomParameters;
45 changes: 34 additions & 11 deletions bigbluebutton-tests/playwright/parameters/disabledFeatures.js
@@ -1,11 +1,7 @@
const { expect, default: test } = require('@playwright/test');
const { MultiUsers } = require('../user/multiusers');
const e = require('../core/elements');
const c = require('./constants');
const { VIDEO_LOADING_WAIT_TIME, ELEMENT_WAIT_LONGER_TIME, ELEMENT_WAIT_EXTRA_LONG_TIME } = require('../core/constants');
const util = require('./util');
const { ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
const { getSettings } = require('../core/settings');
const { waitAndClearDefaultPresentationNotification } = require('../notifications/util');

class DisabledFeatures extends MultiUsers {
constructor(browser, context) {
Expand Down Expand Up @@ -45,8 +41,7 @@ class DisabledFeatures extends MultiUsers {

async layouts() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.wasRemoved(e.propagateLayout);
await this.modPage.wasRemoved(e.layoutModal);
await this.modPage.wasRemoved(e.manageLayoutBtn);
}

async learningDashboard() {
Expand Down Expand Up @@ -75,7 +70,8 @@ class DisabledFeatures extends MultiUsers {
async downloadPresentationWithAnnotations() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.managePresentations);
await this.modPage.wasRemoved(e.exportPresentationToPublicChat);
await this.modPage.waitAndClick(e.presentationOptionsDownloadBtn);
await this.modPage.wasRemoved(e.sendPresentationInCurrentStateBtn);
}

async importPresentationWithAnnotationsFromBreakoutRooms() {
Expand All @@ -102,6 +98,20 @@ class DisabledFeatures extends MultiUsers {
await this.modPage.wasRemoved(e.inputBackgroundButton);
}

async slideSnapshot() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.whiteboardOptionsButton);
await this.modPage.hasElement(e.presentationFullscreen);
await this.modPage.wasRemoved(e.presentationSnapshot);
}

async cameraAsContent() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.managePresentations);
await this.modPage.wasRemoved(e.shareCameraAsContent);
}

// Disabled Features Exclude
async breakoutRoomsExclude() {
await this.modPage.waitAndClick(e.manageUsers);
Expand Down Expand Up @@ -136,8 +146,7 @@ class DisabledFeatures extends MultiUsers {

async layoutsExclude() {
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.propagateLayout);
await this.modPage.hasElement(e.layoutModal);
await this.modPage.hasElement(e.manageLayoutBtn);
}

async learningDashboardExclude() {
Expand All @@ -164,9 +173,11 @@ class DisabledFeatures extends MultiUsers {
}

async downloadPresentationWithAnnotationsExclude() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.actions);
await this.modPage.waitAndClick(e.managePresentations);
await this.modPage.hasElement(e.exportPresentationToPublicChat);
await this.modPage.waitAndClick(e.presentationOptionsDownloadBtn);
await this.modPage.hasElement(e.sendPresentationInCurrentStateBtn);
}

async importPresentationWithAnnotationsFromBreakoutRoomsExclude() {
Expand All @@ -192,6 +203,18 @@ class DisabledFeatures extends MultiUsers {
await this.modPage.waitForSelector(e.webcamSettingsModal);
await this.modPage.hasElement(e.inputBackgroundButton);
}

async slideSnapshotExclude() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.whiteboardOptionsButton);
await this.modPage.hasElement(e.presentationSnapshot);
}

async cameraAsContentExclude() {
await this.modPage.waitForSelector(e.whiteboard);
await this.modPage.waitAndClick(e.actions);
await this.modPage.hasElement(e.shareCameraAsContent);
}
}

exports.DisabledFeatures = DisabledFeatures;