2023-06-22 20:21:10 +08:00
const { MultiUsers } = require ( '../user/multiusers' ) ;
const e = require ( '../core/elements' ) ;
2023-07-31 22:24:25 +08:00
const { ELEMENT _WAIT _LONGER _TIME } = require ( '../core/constants' ) ;
2023-06-22 20:21:10 +08:00
const { getSettings } = require ( '../core/settings' ) ;
class DisabledFeatures extends MultiUsers {
constructor ( browser , context ) {
super ( browser , context ) ;
}
async breakoutRooms ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . createBreakoutRooms , 'should not display the option to create breakout rooms on the manage users' ) ;
2023-06-22 20:21:10 +08:00
}
async speechRecognition ( ) {
2023-07-01 04:16:22 +08:00
const { speechRecognitionEnabled } = getSettings ( ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . audioModal , 'should display the audio modal' , ELEMENT _WAIT _LONGER _TIME ) ;
2023-07-01 04:16:22 +08:00
2024-06-19 23:00:24 +08:00
if ( speechRecognitionEnabled ) {
2023-07-01 04:16:22 +08:00
await this . modPage . wasRemoved ( e . speechRecognition ) ;
} else {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . speechRecognitionUnsupported , 'should not display the speech recognition message saying that is unsupported' ) ;
2023-07-01 04:16:22 +08:00
}
2023-06-22 20:21:10 +08:00
}
async captions ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . writeClosedCaptions , 'should not display the write closed captions' ) ;
2023-06-22 20:21:10 +08:00
}
async chat ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . hidePublicChat , 'should not display the hide public chat button and the whole chat' ) ;
2023-06-22 20:21:10 +08:00
}
async externalVideos ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . shareExternalVideoBtn , 'should not display the share external video option when opening the actions button' ) ;
2023-06-22 20:21:10 +08:00
}
async layouts ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . manageLayoutBtn , 'should not display manage layout option when the actions is open' ) ;
2023-06-22 20:21:10 +08:00
}
async learningDashboard ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . learningDashboard , 'should not display the learning dashboard on the manage users' ) ;
2023-06-22 20:21:10 +08:00
}
async polls ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . polling , 'should not display the polling on the actions button' ) ;
2023-06-22 20:21:10 +08:00
}
async screenshare ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . startScreenSharing , 'should not display the screenshare button' ) ;
2023-06-22 20:21:10 +08:00
}
async sharedNotes ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . sharedNotes , 'should not display the shared notes on the side bar' ) ;
2023-06-22 20:21:10 +08:00
}
async virtualBackgrounds ( ) {
await this . modPage . waitAndClick ( e . joinVideo ) ;
2024-06-19 23:00:24 +08:00
await this . modPage . wasRemoved ( e . backgroundSettingsTitle ) ;
2023-06-22 20:21:10 +08:00
}
async downloadPresentationWithAnnotations ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
await this . modPage . waitAndClick ( e . managePresentations ) ;
2023-07-31 22:24:25 +08:00
await this . modPage . waitAndClick ( e . presentationOptionsDownloadBtn ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . sendPresentationInCurrentStateBtn , 'should not display the option send presentation with annotations on the manage presentations' ) ;
2023-06-22 20:21:10 +08:00
}
async importPresentationWithAnnotationsFromBreakoutRooms ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
await this . modPage . waitAndClick ( e . createBreakoutRooms ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . captureBreakoutWhiteboard , 'should not display the option to capture the breakout room whiteboard when the create breakout rooms modal is opened' ) ;
2023-06-22 20:21:10 +08:00
}
async importSharedNotesFromBreakoutRooms ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
await this . modPage . waitAndClick ( e . createBreakoutRooms ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . captureBreakoutSharedNotes , 'should not display the option to capture the breakout room shared notes when the create breakout room modal is opened' ) ;
2023-06-22 20:21:10 +08:00
}
async presentation ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . whiteboard , 'should not display the whiteboard' ) ;
await this . modPage . wasRemoved ( e . minimizePresentation , 'should not display the minimize presentation button' ) ;
await this . modPage . wasRemoved ( e . restorePresentation , 'should not display the restore presentation button' ) ;
2023-06-22 20:21:10 +08:00
}
async customVirtualBackground ( ) {
2024-06-19 23:00:24 +08:00
await this . modPage . waitAndClick ( e . joinVideo ) ;
await this . modPage . waitAndClick ( e . backgroundSettingsTitle ) ;
2023-06-22 20:21:10 +08:00
await this . modPage . wasRemoved ( e . inputBackgroundButton ) ;
}
2023-07-31 22:24:25 +08:00
async slideSnapshot ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . whiteboard , 'should display the whiteboard' ) ;
2023-07-31 22:24:25 +08:00
await this . modPage . waitAndClick ( e . whiteboardOptionsButton ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . presentationFullscreen , 'should display the presentation fullscreen on the whiteboard options' ) ;
await this . modPage . wasRemoved ( e . presentationSnapshot , 'should not display the presentation snapshot on the whiteboard options' ) ;
2023-07-31 22:24:25 +08:00
}
async cameraAsContent ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . whiteboard , 'should display the whiteboard' ) ;
2023-07-31 22:24:25 +08:00
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . managePresentations , 'should display the manage presentations option' ) ;
await this . modPage . wasRemoved ( e . shareCameraAsContent , 'should not display the share camera as content option on the actions' ) ;
2023-07-31 22:24:25 +08:00
}
2023-06-22 20:21:10 +08:00
// Disabled Features Exclude
async breakoutRoomsExclude ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . createBreakoutRooms , 'should display the create breakout rooms option on the manage users' ) ;
2023-06-22 20:21:10 +08:00
}
async speechRecognitionExclude ( ) {
const { speechRecognitionEnabled } = getSettings ( ) ;
2023-07-01 04:16:22 +08:00
2023-06-22 20:21:10 +08:00
await this . modPage . waitForSelector ( e . audioModal , ELEMENT _WAIT _LONGER _TIME ) ;
2023-07-01 04:16:22 +08:00
2024-06-19 23:00:24 +08:00
if ( speechRecognitionEnabled ) {
2023-07-01 04:16:22 +08:00
await this . modPage . wasRemoved ( e . speechRecognition ) ;
} else {
2024-07-31 06:49:02 +08:00
await this . modPage . wasRemoved ( e . speechRecognitionUnsupported , 'should not display the speech recognition unsupported message' ) ;
2023-07-01 04:16:22 +08:00
}
2023-06-22 20:21:10 +08:00
}
async captionsExclude ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . writeClosedCaptions , 'should display the write closed captions' ) ;
2023-06-22 20:21:10 +08:00
}
async chatExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . hidePublicChat , 'should display the hide public chat option when the public chat is open' ) ;
2023-06-22 20:21:10 +08:00
}
async externalVideosExclude ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . shareExternalVideoBtn , 'should display the share external video button' ) ;
2023-06-22 20:21:10 +08:00
}
async layoutsExclude ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . manageLayoutBtn , 'should display the manage layout button' ) ;
2023-06-22 20:21:10 +08:00
}
async learningDashboardExclude ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . learningDashboard , 'should display the learning dashboard on the manage users' ) ;
2023-06-22 20:21:10 +08:00
}
async pollsExclude ( ) {
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . polling , 'should display the polling option on the actions' ) ;
2023-06-22 20:21:10 +08:00
}
async screenshareExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . startScreenSharing , 'should display the start screenshare option' ) ;
2023-06-22 20:21:10 +08:00
}
async sharedNotesExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . sharedNotes , 'should display the shared notes' ) ;
2023-06-22 20:21:10 +08:00
}
async virtualBackgroundsExclude ( ) {
await this . modPage . waitAndClick ( e . joinVideo ) ;
2024-06-19 23:00:24 +08:00
await this . modPage . waitAndClick ( e . backgroundSettingsTitle ) ;
2023-06-22 20:21:10 +08:00
await this . modPage . hasElement ( e . virtualBackgrounds ) ;
}
async downloadPresentationWithAnnotationsExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . whiteboard , 'should display the whiteboard' ) ;
2023-06-22 20:21:10 +08:00
await this . modPage . waitAndClick ( e . actions ) ;
await this . modPage . waitAndClick ( e . managePresentations ) ;
2023-07-31 22:24:25 +08:00
await this . modPage . waitAndClick ( e . presentationOptionsDownloadBtn ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . sendPresentationInCurrentStateBtn , 'should display the option to send the presentation in current state so de user can download the presentation with the annotations' ) ;
2023-06-22 20:21:10 +08:00
}
async importPresentationWithAnnotationsFromBreakoutRoomsExclude ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
await this . modPage . waitAndClick ( e . createBreakoutRooms ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . captureBreakoutWhiteboard , 'should display the option to capture the breakout whiteboard on the create breakout rooms modal' ) ;
2023-06-22 20:21:10 +08:00
}
async importSharedNotesFromBreakoutRoomsExclude ( ) {
await this . modPage . waitAndClick ( e . manageUsers ) ;
await this . modPage . waitAndClick ( e . createBreakoutRooms ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . captureBreakoutSharedNotes , 'should display the option to capture the shared notes whiteboard on the create breakout rooms modal' ) ;
2023-06-22 20:21:10 +08:00
}
async presentationExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . whiteboard , 'should display the whiteboard' ) ;
2023-06-22 20:21:10 +08:00
await this . modPage . waitAndClick ( e . minimizePresentation ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . restorePresentation , 'should display the restore presentation option' ) ;
2023-06-22 20:21:10 +08:00
}
async customVirtualBackgroundExclude ( ) {
2024-06-19 23:00:24 +08:00
await this . modPage . waitAndClick ( e . joinVideo ) ;
await this . modPage . waitAndClick ( e . backgroundSettingsTitle ) ;
2023-06-22 20:21:10 +08:00
await this . modPage . hasElement ( e . inputBackgroundButton ) ;
}
2023-07-31 22:24:25 +08:00
async slideSnapshotExclude ( ) {
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . whiteboard , 'should display the whiteboard' ) ;
2023-07-31 22:24:25 +08:00
await this . modPage . waitAndClick ( e . whiteboardOptionsButton ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . presentationSnapshot , 'should display the presentation snapshot on the whiteboard options' ) ;
2023-07-31 22:24:25 +08:00
}
async cameraAsContentExclude ( ) {
await this . modPage . waitForSelector ( e . whiteboard ) ;
await this . modPage . waitAndClick ( e . actions ) ;
2024-07-31 06:49:02 +08:00
await this . modPage . hasElement ( e . shareCameraAsContent , 'should display the share camera as content on the action options.' ) ;
2023-07-31 22:24:25 +08:00
}
2023-06-22 20:21:10 +08:00
}
exports . DisabledFeatures = DisabledFeatures ;