bigbluebutton-Github/bigbluebutton-tests/playwright/core/elements.js

270 lines
14 KiB
JavaScript
Raw Normal View History

2021-11-26 02:23:58 +08:00
// Common
2022-01-13 23:11:17 +08:00
exports.actions = 'button[data-test="actionsButton"]';
2021-11-26 02:23:58 +08:00
exports.pollMenuButton = 'div[data-test="pollMenuButton"]';
2021-12-23 03:06:42 +08:00
exports.optionsButton = 'button[data-test="optionsButton"]';
2021-11-30 21:42:57 +08:00
exports.settings = 'li[data-test="settings"]';
exports.modalConfirmButton = 'button[data-test="modalConfirmButton"]';
exports.screenshareConnecting = 'div[data-test="screenshareConnecting"]';
exports.screenShareVideo = 'video[id="screenshareVideo"]';
2022-01-20 21:03:18 +08:00
exports.modalDismissButton = 'button[data-test="modalDismissButton"]';
exports.closeModal = 'button[data-test="closeModal"]';
2021-12-01 01:14:03 +08:00
exports.isSharingScreen = 'div[data-test="isSharingScreen"]';
2021-12-01 13:36:20 +08:00
exports.pdfFileName = '100PagesFile.pdf';
exports.raiseHandBtn = 'button[data-test="raiseHandLabel"]';
exports.lowerHandBtn = 'button[data-test="lowerHandLabel"]';
2021-12-15 01:10:44 +08:00
exports.meetingEndedModal = 'div[data-test="meetingEndedModal"]';
exports.logout = 'li[data-test="logout"]';
exports.rating = 'div[data-test="rating"]';
2021-12-10 21:30:29 +08:00
// Accesskey
2022-01-20 21:03:18 +08:00
exports.chatButtonKey = 'div[accesskey="P"]';
exports.userListButton = 'button[accesskey="U"]';
2021-11-26 02:23:58 +08:00
// Audio
2021-11-30 21:42:57 +08:00
exports.joinAudio = 'button[data-test="joinAudio"]';
2022-01-20 21:03:18 +08:00
exports.audioModal = 'div[data-test="audioModal"]';
exports.listenOnlyButton = 'button[data-test="listenOnlyBtn"]';
2021-12-15 01:10:44 +08:00
exports.connecting = 'span[data-test="connecting"]';
2021-11-23 01:06:59 +08:00
exports.leaveAudio = 'button[data-test="leaveAudio"]';
2022-01-20 21:03:18 +08:00
exports.microphoneButton = 'button[data-test="microphoneBtn"]';
exports.echoYesButton = 'button[data-test="echoYesBtn"]';
2021-12-15 01:10:44 +08:00
exports.connectingToEchoTest = 'span[data-test="connectingToEchoTest"]';
2022-01-20 21:03:18 +08:00
exports.isTalking = 'button[data-test="isTalking"]';
exports.talkingIndicator = 'div[data-test="talkingIndicator"]';
2022-01-29 03:52:22 +08:00
exports.toggleMicrophoneButton = 'button[data-test="toggleMicrophoneButton"]';
2021-11-30 21:42:57 +08:00
// Breakout
exports.createBreakoutRooms = 'li[data-test="createBreakoutRooms"]';
2022-01-20 21:03:18 +08:00
exports.randomlyAssign = 'button[data-test="randomlyAssign"]';
exports.breakoutRoomsItem = 'div[data-test="breakoutRoomsItem"]';
exports.alreadyConnected = 'span[data-test="alreadyConnected"]';
exports.askJoinRoom1 = 'button[data-test="askToJoinRoom1"]';
exports.joinRoom1 = 'button[data-test="joinRoom1"]';
2021-12-01 22:16:37 +08:00
exports.allowChoiceRoom = 'input[id="freeJoinCheckbox"]';
exports.labelGeneratingURL = 'span[data-test="labelGeneratingURL"]';
exports.endBreakoutRoomsButton = 'button[data-test="endBreakoutRoomsButton"]';
// Chat
2022-01-20 21:03:18 +08:00
exports.chatBox = 'textarea[id="message-input"]';
2021-11-26 02:23:58 +08:00
exports.chatButton = 'div[data-test="chatButton"]';
exports.sendButton = 'button[data-test="sendMessageButton"]';
2021-11-26 02:23:58 +08:00
exports.chatPollMessageText = 'p[data-test="chatPollMessageText"]';
exports.chatMessages = 'div[data-test="chatMessages"]';
exports.chatOptions = 'button[data-test="chatOptionsMenu"]';
exports.chatClear = 'li[data-test="chatClear"]';
exports.chatSave = 'li[data-test="chatSave"]';
2021-12-01 04:10:38 +08:00
exports.chatCopy = 'li[data-test="chatCopy"]';
2021-12-01 13:36:20 +08:00
exports.chatTitle = 'div[data-test="chatTitle"]';
2022-01-20 21:03:18 +08:00
exports.startPrivateChat = 'li[data-test="startPrivateChat"]';
exports.publicChat = 'div[data-test="publicChat"]';
2022-01-20 04:02:54 +08:00
exports.privateChat = 'div[data-test="privateChat"]';
2022-01-20 21:03:18 +08:00
exports.hidePrivateChat = 'button[data-test="hidePrivateChat"]';
2022-02-05 03:26:35 +08:00
exports.closePrivateChat = 'button[data-test="closePrivateChat"]';
2022-01-13 23:11:17 +08:00
exports.typingIndicator = 'span[data-test="typingIndicator"]';
2022-01-20 03:50:59 +08:00
exports.chatUserMessageText = 'p[data-test="chatUserMessageText"]';
exports.chatClearMessageText = 'p[data-test="chatClearMessageText"]';
2021-12-01 13:36:20 +08:00
// Messages
exports.message = 'Hello World!';
2022-01-29 03:52:22 +08:00
exports.testMessage = 'Just a test';
2021-12-01 13:36:20 +08:00
exports.message1 = 'Hello User2';
exports.message2 = 'Hello User1';
exports.publicMessage1 = 'This is a Public Message from User1';
exports.publicMessage2 = 'This is a Public Message from User2';
2022-01-13 23:11:17 +08:00
exports.longMessage5000 = '01234567890123456789012345678901234567890123456789'.repeat(100);
exports.longMessage5001 = '01234567890123456789012345678901234567890123456789'.repeat(100) + '0';
2021-12-15 01:10:44 +08:00
// CustomParameters
2022-01-20 21:03:18 +08:00
exports.audioOptionsButtons = 'span[data-test="audioModalOptions"] > button';
2021-12-15 01:10:44 +08:00
exports.userListContent = 'div[data-test="userListContent"]';
2022-01-20 21:03:18 +08:00
exports.brandingAreaLogo = 'div[data-test="brandingArea"]';
exports.multiUsersWhiteboardOn = 'button[data-test="turnMultiUsersWhiteboardOn"]';
exports.multiUsersWhiteboardOff = 'button[data-test="turnMultiUsersWhiteboardOff"]';
exports.toolbarToolsList = 'div[data-test="toolbarToolsList"]';
exports.notificationBannerBar = 'div[data-test="notificationBannerBar"]';
exports.zoomInBtn = 'button[data-test="zoomInBtn"]';
exports.recordingIndicator = 'div[data-test="recordingIndicator"]';
2021-12-15 01:10:44 +08:00
exports.webcamMirroredVideoContainer = 'video[data-test="mirroredVideoContainer"]';
2022-01-20 21:03:18 +08:00
exports.userslist = 'div[data-test="userList"]';
2021-11-30 02:39:52 +08:00
// Notes
exports.sharedNotes = 'div[data-test="sharedNotes"]';
exports.hideNoteLabel = 'button[data-test="hideNoteLabel"]';
2022-01-29 03:52:22 +08:00
exports.etherpadFrame = 'iframe[title="etherpad"]';
exports.etherpadOuter = 'iframe[title="Ether"]';
exports.etherpadInner = 'iframe[title="pad"]';
exports.etherpadEditable = 'body[id="innerdocbody"]';
2021-11-30 02:39:52 +08:00
2021-11-27 03:04:28 +08:00
// Notifications
exports.smallToastMsg = 'div[data-test="toastSmallMsg"]';
2021-12-01 13:36:20 +08:00
exports.notificationsTab = 'span[id="notificationTab"]';
2022-01-20 21:03:18 +08:00
exports.chatPopupAlertsBtn = 'input[data-test="chatPopupAlertsBtn"]';
2021-12-01 13:36:20 +08:00
exports.hasUnreadMessages = 'button[data-test="hasUnreadMessages"]';
2022-01-20 21:03:18 +08:00
exports.userJoinPushAlerts = 'input[data-test="userJoinPopupAlerts"]';
exports.toastContainer = 'div[data-test="toastContainer"]';
// Toasts
exports.savedSettingsToast = 'Settings have been saved';
2021-12-01 13:36:20 +08:00
exports.publicChatToast = 'New Public Chat message';
exports.privateChatToast = 'New Private Chat message';
exports.joinAudioToast = 'You have joined the audio conference';
exports.pollPublishedToast = 'Poll results were published';
exports.startScreenshareToast = 'Screenshare has started';
exports.endScreenshareToast = 'Screenshare has ended';
2022-01-20 03:50:59 +08:00
exports.joiningMessageToast = 'You have joined the audio conference';
exports.attendeeJoinedToast = 'Attendee joined the session';
exports.raisingHandToast = 'You have raised your hand';
exports.loweringHandToast = 'You have lowered your hand';
// Icons
const baseBbbIcon = 'i.icon-bbb-';
exports.unmuteIcon = `${baseBbbIcon}unmute`;
exports.listenOnlyIcon = `${baseBbbIcon}listen`;
2021-11-27 03:04:28 +08:00
2021-11-26 02:23:58 +08:00
// Polling
2022-01-20 21:03:18 +08:00
exports.pollQuestion = 'Are we good ?';
exports.answerMessage = 'All good!';
exports.questionSlideFileName = 'mockPollSlide.pdf';
2021-11-26 02:23:58 +08:00
exports.polling = 'li[data-test="polling"]';
exports.startPoll = 'button[data-test="startPoll"]';
exports.restartPoll = 'button[data-test="restartPoll"]';
exports.hidePollDesc = 'button[data-test="hidePollDesc"]';
exports.pollingContainer = 'div[data-test="pollingContainer"]';
2022-01-20 21:03:18 +08:00
exports.pollLetterAlternatives = 'button[data-test="pollLetterAlternatives"]';
2021-11-26 02:23:58 +08:00
exports.pollOptionItem = 'input[data-test="pollOptionItem"]';
2022-01-20 21:03:18 +08:00
exports.anonymousPoll = 'input[data-test="anonymousPollBtn"]';
2021-11-26 02:23:58 +08:00
exports.publishPollingLabel = 'button[data-test="publishPollingLabel"]';
exports.pollAnswerOptionBtn = 'button[data-test="pollAnswerOption"]';
exports.receivedAnswer = 'td[data-test="receivedAnswer"]';
2022-01-20 21:03:18 +08:00
exports.quickPoll = 'button[data-test="quickPollBtn"]';
2021-11-26 02:23:58 +08:00
exports.pollQuestionArea = 'textarea[data-test="pollQuestionArea"]';
2022-01-20 21:03:18 +08:00
exports.userResponseBtn = 'button[data-test="userResponseBtn"]';
2021-11-26 02:23:58 +08:00
exports.pollAnswerOptionInput = 'input[data-test="pollAnswerOption"]';
exports.pollSubmitAnswer = 'button[data-test="submitAnswer"]';
exports.pollResults = 'g[data-test="pollResultAria"]';
2022-01-20 21:03:18 +08:00
exports.closePollingMenu = 'button[data-test="data-test="closePolling""]';
2021-11-26 02:23:58 +08:00
exports.addPollItem = 'button[data-test="addPollItem"]';
exports.deletePollOption = 'button[data-test="deletePollOption"]';
exports.cancelPollBtn = 'button[data-test="cancelPollLabel"]';
2022-01-20 21:03:18 +08:00
exports.pollYesNoAbstentionBtn = 'button[data-test="pollYesNoAbstentionBtn"]';
2021-11-26 02:23:58 +08:00
// Presentation
2022-01-20 21:03:18 +08:00
exports.uploadPresentationFileName = 'uploadTest.png';
exports.presentationPlaceholderLabel = 'Waiting for a presentation to be uploaded';
2021-11-30 21:42:57 +08:00
exports.startScreenSharing = 'button[data-test="startScreenShare"]';
2021-12-01 13:36:20 +08:00
exports.stopScreenSharing = 'button[data-test="stopScreenShare"]';
2022-01-20 21:03:18 +08:00
exports.managePresentations = 'li[data-test="managePresentations"]';
2021-11-26 02:23:58 +08:00
exports.fileUpload = 'input[type="file"]';
2022-01-20 21:03:18 +08:00
exports.presentationToolbarWrapper = 'div[id="presentationToolbarWrapper"]';
exports.nextSlide = 'button[data-test="nextSlide"]';
exports.prevSlide = 'button[data-test="prevSlide"]';
exports.skipSlide = 'select[data-test="skipSlide"]';
2021-11-27 03:04:28 +08:00
exports.allowPresentationDownload = 'button[data-test="allowPresentationDownload"]';
exports.disallowPresentationDownload = 'button[data-test="disallowPresentationDownload"]';
exports.confirmManagePresentation = 'button[data-test="confirmManagePresentation"]';
exports.toastDownload = 'a[data-test="toastDownload"]';
exports.presentationDownloadBtn = 'button[data-test="presentationDownload"]';
exports.removePresentation = 'button[data-test="removePresentation"]';
exports.presentationPlaceholder = 'div[data-test="presentationPlaceholder"]';
exports.presentationContainer = 'div[class^="presentationContainer--"]';
2022-01-20 21:03:18 +08:00
exports.minimizePresentation = 'button[data-test="minimizePresentation"]';
exports.restorePresentation = 'button[data-test="restorePresentation"]';
exports.shareExternalVideoBtn = 'li[data-test="shareExternalVideo"]';
2021-11-27 03:04:28 +08:00
exports.externalVideoModalHeader = 'header[data-test="videoModalHeader"]';
exports.videoModalInput = 'input[id="video-modal-input"]';
2022-01-20 21:03:18 +08:00
exports.startShareVideoBtn = 'button[data-test="startNewVideo"]';
2021-11-27 03:04:28 +08:00
exports.videoPlayer = 'div[data-test="videoPlayer"]';
2022-01-20 21:03:18 +08:00
exports.presentationTitle = 'h1[data-test="presentationTitle"]';
2021-11-27 03:04:28 +08:00
// YouTube frame
exports.youtubeLink = 'https://www.youtube.com/watch?v=Hso8yLzkqj8&ab_channel=BigBlueButton';
exports.youtubeFrame = 'iframe[title^="YouTube"]';
exports.ytFrameTitle = 'a[class^="ytp-title-link"]';
2022-01-20 21:03:18 +08:00
// Toasts
exports.statingUploadPresentationToast = 'To be uploaded ...';
exports.convertingPresentationFileToast = 'Converting file';
exports.presentationUploadedToast = 'Current presentation';
2021-11-26 02:23:58 +08:00
// Settings
exports.languageSelector = 'select[id="langSelector"]';
// User
2021-11-23 01:06:59 +08:00
exports.userAvatar = 'div[data-test="userAvatar"]';
2022-02-08 02:01:47 +08:00
exports.moderatorAvatar = 'div[data-test="moderatorAvatar"]';
exports.viewerAvatar = 'div[data-test="viewerAvatar"]';
exports.applauseIcon = `${this.userAvatar} > div > i[class="icon-bbb-applause"]`;
exports.awayIcon = `${this.userAvatar} > div > i[class="icon-bbb-time"]`;
exports.setStatus = 'li[data-test="setStatus"]';
2022-01-20 21:03:18 +08:00
exports.away = 'li[data-test="away"]';
exports.applaud = 'li[data-test="applause"]';
exports.userListItem = 'div[data-test="userListItem"]';
2022-01-20 21:03:18 +08:00
exports.firstUser = 'div[data-test="userListItemCurrent"]';
2021-11-23 05:51:16 +08:00
exports.multiWhiteboardTool = 'span[data-test="multiWhiteboardTool"]';
2021-11-30 21:42:57 +08:00
exports.manageUsers = 'button[data-test="manageUsers"]';
2021-12-01 22:16:37 +08:00
exports.presenterClassName = 'presenter--';
2022-01-20 21:03:18 +08:00
exports.anyUser = 'div[data-test="userListItem"]';
exports.userList = 'button[data-test="toggleUserList"]';
2021-12-10 21:30:29 +08:00
exports.mobileUser = 'span[data-test="mobileUser"]';
exports.connectionStatusBtn = 'button[data-test="connectionStatusButton"]';
2022-01-20 21:03:18 +08:00
exports.connectionStatusModal = 'div[data-test="connectionStatusModal"]';
2021-12-10 21:30:29 +08:00
exports.dataSavingScreenshare = 'input[data-test="dataSavingScreenshare"]';
2022-01-20 21:03:18 +08:00
exports.screenshareLocked = 'button[data-test="screenshareLocked"]';
2021-12-10 21:30:29 +08:00
exports.connectionStatusItemEmpty = 'div[data-test="connectionStatusItemEmpty"]';
exports.connectionStatusItemUser = 'div[data-test="connectionStatusItemUser"]';
exports.dataSavingWebcams = 'input[data-test="dataSavingWebcams"]';
exports.connectionStatusOfflineUser = 'div[data-test="offlineUser"]';
2022-01-20 21:03:18 +08:00
exports.connectionDataContainer = 'div[data-test="networkDataContainer"]';
2021-12-10 21:30:29 +08:00
exports.avatarsWrapperAvatar = 'div[data-test="avatarsWrapperAvatar"]';
exports.guestPolicyLabel = 'li[data-test="guestPolicyLabel"]';
exports.waitingUsersBtn = 'div[data-test="waitingUsersBtn"]';
exports.joinMeetingDemoPage = 'div[class^="join-meeting"]';
exports.askModerator = 'button[data-test="askModerator"]';
exports.alwaysAccept = 'button[data-test="alwaysAccept"]';
exports.alwaysDeny = 'button[data-test="alwaysDeny"]';
exports.selectRandomUser = 'li[data-test="selectRandomUser"]';
exports.noViewersSelectedMessage = 'div[data-test="noViewersSelectedMessage"]';
exports.selectedUserName = 'div[data-test="selectedUserName"]';
exports.selectAgainRadomUser = 'button[data-test="selectAgainRadomUser"]';
2022-02-08 02:01:47 +08:00
exports.promoteToModerator = 'li[data-test="promoteToModerator"]';
exports.demoteToViewer = 'li[data-test="demoteToViewer"]';
2022-02-08 02:45:42 +08:00
exports.makePresenter = 'li[data-test="makePresenter"]';
exports.takePresenter = 'li[data-test="takePresenter"]';
2022-01-29 03:52:22 +08:00
// Lock Viewers
exports.lockViewersButton = 'li[data-test="lockViewersButton"]';
2022-02-03 08:45:23 +08:00
exports.unlockUserButton = 'li[data-test="unlockUserButton"]';
2022-01-29 03:52:22 +08:00
exports.applyLockSettings ='button[data-test="applyLockSettings"]';
exports.lockShareWebcam = 'input[data-test="lockShareWebcam"]';
exports.lockSeeOtherViewersWebcam = 'input[data-test="lockSeeOtherViewersWebcam"]';
exports.lockShareMicrophone = 'input[data-test="lockShareMicrophone"]';
exports.lockPublicChat = 'input[data-test="lockPublicChat"]';
exports.lockPrivateChat = 'input[data-test="lockPrivateChat"]';
exports.lockEditSharedNotes = 'input[data-test="lockEditSharedNotes"]';
exports.lockUserList = 'input[data-test="lockUserList"]';
// Locales
exports.locales = ['af', 'ar', 'az', 'bg-BG', 'bn', 'ca', 'cs-CZ', 'da', 'de',
'dv', 'el-GR', 'en', 'eo', 'es', 'es-419', 'es-ES', 'es-MX', 'et', 'eu',
'fa-IR', 'fi', 'fr', 'gl', 'he', 'hi-IN', 'hr', 'hu-HU', 'hy', 'id', 'it-IT',
'ja', 'ka', 'km', 'kn', 'ko-KR', 'lo-LA', 'lt-LT', 'lv', 'ml', 'mn-MN',
'nb-NO', 'nl', 'oc', 'pl-PL', 'pt', 'pt-BR', 'ro-RO', 'ru', 'sk-SK', 'sl',
'sr', 'sv-SE', 'ta', 'te', 'th', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN', 'zh-TW'
];
2021-11-23 01:06:59 +08:00
2021-11-27 04:01:41 +08:00
// Webcam
exports.joinVideo = 'button[data-test="joinVideo"]';
exports.leaveVideo = 'button[data-test="leaveVideo"]';
exports.videoPreview = 'video[data-test="videoPreview"]';
exports.startSharingWebcam = 'button[data-test="startSharingWebcam"]';
exports.webcamConnecting = 'div[data-test="webcamConnecting"]';
exports.webcamContainer = 'video[data-test="videoContainer"]';
exports.webcamVideoItem = 'div[data-test="webcamVideoItem"]';
2021-11-27 04:01:41 +08:00
exports.webcamItemTalkingUser = 'div[data-test="webcamItemTalkingUser"]';
2022-01-20 21:03:18 +08:00
exports.webcamSettingsModal = 'div[data-test="webcamSettingsModal"]';
2022-01-29 03:52:22 +08:00
exports.dropdownWebcamButton = 'div[data-test="dropdownWebcamButton"]';
2021-12-15 01:10:44 +08:00
exports.webcamMirroredVideoPreview = 'video[data-test="mirroredVideoPreview"]';
2021-11-27 04:01:41 +08:00
2021-11-23 01:06:59 +08:00
// Whiteboard
2021-11-23 05:51:16 +08:00
exports.whiteboard = 'svg[data-test="whiteboard"]';
2022-01-20 21:03:18 +08:00
exports.toolsButton = 'button[data-test="toolsBtn"]';
exports.rectangle = 'button[data-test="rectangleTool"]';
2021-11-23 05:51:16 +08:00
exports.drawnRectangle = 'svg g[clip-path] > g:nth-child(2) rect[data-test="drawnRectangle"]';
exports.whiteboardViewBox = 'svg g[clip-path="url(#viewBox)"]';
2021-12-04 01:01:36 +08:00
exports.changeWhiteboardAccess = 'li[data-test="changeWhiteboardAccess"]';
2022-01-20 21:03:18 +08:00
exports.pencil = 'button[data-test="pencilTool"]';