Merge pull request #18358 from antonbsa/breakout-tests
test: Breakout tests update
This commit is contained in:
commit
90ef5ab591
@ -1028,7 +1028,7 @@ class BreakoutRoom extends PureComponent {
|
||||
data-test="durationTime"
|
||||
/>
|
||||
</Styled.DurationArea>
|
||||
<Styled.SpanWarn valid={durationIsValid}>
|
||||
<Styled.SpanWarn data-test="minimumDurationWarnBreakout" valid={durationIsValid}>
|
||||
{
|
||||
intl.formatMessage(
|
||||
intlMessages.minimumDurationWarnBreakout,
|
||||
|
@ -13,7 +13,7 @@ class ToastContainer extends React.Component {
|
||||
|
||||
return (
|
||||
<Styled.ToastifyContainer
|
||||
closeButton={(<Styled.CloseIcon iconName="close" animations={animations} />)}
|
||||
closeButton={(<Styled.CloseIcon data-test="closeToastBtn" iconName="close" animations={animations} />)}
|
||||
autoClose={5000}
|
||||
toastClassName="toastClass"
|
||||
bodyClassName="toastBodyClass"
|
||||
|
@ -54,19 +54,23 @@ class Create extends MultiUsers {
|
||||
await this.modPage.waitAndClick(e.createBreakoutRooms);
|
||||
await this.modPage.waitAndClick(e.randomlyAssign);
|
||||
|
||||
const createButtonLocator = this.modPage.getLocator(e.modalConfirmButton);
|
||||
|
||||
//test minimum 5 minutes
|
||||
await this.modPage.getLocator(e.durationTime).press('Backspace');
|
||||
await this.modPage.getLocator(e.durationTime).press('Backspace');
|
||||
await this.modPage.type(e.durationTime, '5');
|
||||
await this.modPage.waitAndClick(e.decreaseBreakoutTime);
|
||||
await this.modPage.hasValue(e.durationTime, '5');
|
||||
await expect(createButtonLocator).toBeEnabled();
|
||||
|
||||
await this.modPage.getLocator(e.durationTime).press('Backspace');
|
||||
await this.modPage.type(e.durationTime, '15');
|
||||
await this.modPage.waitAndClick(e.increaseBreakoutTime);
|
||||
await this.modPage.page.fill(e.durationTime, '4');
|
||||
await expect(createButtonLocator).toBeDisabled();
|
||||
await this.modPage.hasElement(e.minimumDurationWarnBreakout);
|
||||
|
||||
// await this.modPage.getLocator(e.durationTime).press('Backspace');
|
||||
await this.modPage.page.fill(e.durationTime, '15');
|
||||
await this.modPage.waitAndClick(e.modalConfirmButton, ELEMENT_WAIT_LONGER_TIME);
|
||||
await this.modPage.waitAndClick(e.breakoutRoomsItem);
|
||||
await this.modPage.hasText(e.breakoutRemainingTime, /15:[0-5][0-9]/, ELEMENT_WAIT_LONGER_TIME);
|
||||
await this.modPage.hasText(e.breakoutRemainingTime, /14:[0-5][0-9]/, ELEMENT_WAIT_LONGER_TIME);
|
||||
}
|
||||
|
||||
async changeRoomsName() {
|
||||
@ -101,15 +105,14 @@ class Create extends MultiUsers {
|
||||
await this.modPage.waitAndClick(e.createBreakoutRooms);
|
||||
|
||||
//testing no user assigned
|
||||
await this.modPage.waitAndClick(e.modalConfirmButton);
|
||||
await this.modPage.hasElement(e.warningNoUserAssigned);
|
||||
|
||||
//await this.modPage.hasElementDisabled(e.modalConfirmButton);
|
||||
const modalConfirmButton = this.modPage.getLocator(e.modalConfirmButton);
|
||||
await expect(modalConfirmButton, 'Getting error when trying to create a breakout room without designating any user.').toBeDisabled();
|
||||
await this.modPage.hasElement(e.warningNoUserAssigned);
|
||||
|
||||
await this.modPage.dragDropSelector(e.userTest, e.breakoutBox1);
|
||||
await this.modPage.hasText(e.breakoutBox1, /Attendee/);
|
||||
await expect(modalConfirmButton).toBeEnabled();
|
||||
await this.modPage.wasRemoved(e.warningNoUserAssigned);
|
||||
await this.modPage.waitAndClick(e.modalConfirmButton, ELEMENT_WAIT_LONGER_TIME);
|
||||
await this.userPage.waitAndClick(e.modalConfirmButton);
|
||||
|
||||
|
@ -157,6 +157,10 @@ class Join extends Create {
|
||||
|
||||
await this.modPage.waitAndClick(e.breakoutRoomsItem);
|
||||
await this.modPage.waitAndClick(e.breakoutOptionsMenu);
|
||||
// close all notifications displayed before ending rooms
|
||||
for (const closeButton of await this.modPage.getLocator(e.closeToastBtn).all()) {
|
||||
await closeButton.click();
|
||||
}
|
||||
await this.modPage.waitAndClick(e.endAllBreakouts);
|
||||
|
||||
await this.modPage.hasElement(e.presentationUploadProgressToast);
|
||||
@ -164,7 +168,7 @@ class Join extends Create {
|
||||
const shareNotesPDF = await this.modPage.getLocatorByIndex(e.actionsItem, 1);
|
||||
await expect(shareNotesPDF).toHaveText(/Notes/, { timeout: 30000 });
|
||||
await expect(this.modPage.getLocatorByIndex(e.actionsItem, 2)).toHaveText("Upload/Manage presentations"); //This checks if no other content was exported.
|
||||
await this.modPage.checkElementCount(e.actionsItem, 10);
|
||||
await this.modPage.checkElementCount(e.actionsItem, 9);
|
||||
await shareNotesPDF.click();
|
||||
|
||||
const wbBox = await this.modPage.getLocator(e.whiteboard);
|
||||
@ -196,6 +200,10 @@ class Join extends Create {
|
||||
|
||||
await this.modPage.waitAndClick(e.breakoutRoomsItem);
|
||||
await this.modPage.waitAndClick(e.breakoutOptionsMenu);
|
||||
// close all notifications displayed before ending rooms
|
||||
for (const closeButton of await this.modPage.getLocator(e.closeToastBtn).all()) {
|
||||
await closeButton.click();
|
||||
}
|
||||
await this.modPage.waitAndClick(e.endAllBreakouts);
|
||||
|
||||
await this.modPage.waitForSelector(e.presentationUploadProgressToast, ELEMENT_WAIT_LONGER_TIME);
|
||||
@ -203,15 +211,17 @@ class Join extends Create {
|
||||
const whiteboardPDF = await this.modPage.getLocatorByIndex(e.actionsItem, 1);
|
||||
await expect(whiteboardPDF).toHaveText(/Whiteboard/, { timeout: 30000 });
|
||||
await expect(this.modPage.getLocatorByIndex(e.actionsItem, 2)).toHaveText("Upload/Manage presentations"); //This checks if no other content was exported.
|
||||
await this.modPage.checkElementCount(e.actionsItem, 10);
|
||||
await this.modPage.checkElementCount(e.actionsItem, 9);
|
||||
await whiteboardPDF.click();
|
||||
await this.modPage.waitAndClick('i[type="info"]');
|
||||
await this.modPage.waitAndClick(e.currentPresentationToast);
|
||||
|
||||
const wbBox = await this.modPage.getLocator(e.whiteboard);
|
||||
await expect(wbBox).toHaveScreenshot('capture-breakout-whiteboard.png', {
|
||||
maxDiffPixels: 1000,
|
||||
});
|
||||
//! below lines commented due to https://github.com/bigbluebutton/bigbluebutton/issues/18233
|
||||
//! once it's fixed, re-add lines to the code
|
||||
// const wbBox = await this.modPage.getLocator(e.whiteboard);
|
||||
// await expect(wbBox).toHaveScreenshot('capture-breakout-whiteboard.png', {
|
||||
// maxDiffPixels: 1000,
|
||||
// });
|
||||
}
|
||||
|
||||
async userCanChooseRoom() {
|
||||
|
@ -64,8 +64,7 @@ exports.allowChoiceRoom = 'input[id="freeJoinCheckbox"]';
|
||||
exports.labelGeneratingURL = 'span[data-test="labelGeneratingURL"]';
|
||||
exports.endBreakoutRoomsButton = 'button[data-test="endBreakoutRoomsButton"]';
|
||||
exports.durationTime = 'input[data-test="durationTime"]';
|
||||
exports.decreaseBreakoutTime = 'button[data-test="decreaseBreakoutTime"]';
|
||||
exports.increaseBreakoutTime = 'button[data-test="increaseBreakoutTime"]';
|
||||
exports.minimumDurationWarnBreakout = 'span[data-test="minimumDurationWarnBreakout"]';
|
||||
exports.selectNumberOfRooms = 'select[id="numberOfRooms"]';
|
||||
exports.roomGrid = 'div[data-test="roomGrid"] >> input';
|
||||
exports.breakoutBox0 = 'div[id="breakoutBox-0"]';
|
||||
@ -182,6 +181,7 @@ exports.exporthtml = 'span[id="exporthtml"]';
|
||||
|
||||
// Notifications
|
||||
exports.smallToastMsg = 'div[data-test="toastSmallMsg"]';
|
||||
exports.closeToastBtn = 'i[data-test="closeToastBtn"]';
|
||||
const currentPresentationToast = 'div[data-test="currentPresentationToast"]';
|
||||
exports.currentPresentationToast = currentPresentationToast
|
||||
exports.notificationsTab = 'span[id="notificationTab"]';
|
||||
|
Loading…
Reference in New Issue
Block a user