2021-12-02 12:12:14 +08:00
|
|
|
const { MultiUsers } = require('../user/multiusers');
|
2021-11-30 21:42:57 +08:00
|
|
|
const e = require('../core/elements');
|
|
|
|
const { ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
|
|
|
|
|
2021-12-02 12:12:14 +08:00
|
|
|
class Create extends MultiUsers {
|
2021-11-30 21:42:57 +08:00
|
|
|
constructor(browser, context) {
|
2021-12-02 12:12:14 +08:00
|
|
|
super(browser, context);
|
2021-11-30 21:42:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Create Breakoutrooms
|
|
|
|
async create() {
|
2021-12-02 12:12:14 +08:00
|
|
|
await this.modPage.waitAndClick(e.manageUsers);
|
|
|
|
await this.modPage.waitAndClick(e.createBreakoutRooms);
|
|
|
|
|
2022-09-10 00:54:50 +08:00
|
|
|
//Change number of rooms
|
|
|
|
//await this.modPage.waitAndClick(e.selectNumberOfRooms);
|
|
|
|
await this.modPage.getLocator(e.selectNumberOfRooms).selectOption('7');
|
|
|
|
await this.modPage.hasText(e.selectNumberOfRooms, '7');
|
|
|
|
|
|
|
|
//Decrease and Increase breakout time
|
|
|
|
await this.modPage.waitAndClick(e.increaseBreakoutTime);
|
|
|
|
await this.modPage.hasElement(e.numberDurationTime);
|
|
|
|
await this.modPage.waitAndClick(e.decreaseBreakoutTime);
|
|
|
|
await this.modPage.hasElement(e.numberDurationTime15);
|
|
|
|
|
|
|
|
//Reset assignments
|
|
|
|
await this.modPage.waitAndClick(e.randomlyAssign);
|
|
|
|
await this.modPage.waitAndClick(e.resetAssignments);
|
|
|
|
|
|
|
|
//Remove specific assignment
|
2022-09-17 04:21:47 +08:00
|
|
|
await this.modPage.waitAndClick(e.randomlyAssign);
|
|
|
|
await this.modPage.dragDropSelector(e.removeUser, e.breakoutBox0);
|
|
|
|
await this.modPage.hasText(e.breakoutBox0, /Attendee/);
|
2022-09-10 00:54:50 +08:00
|
|
|
|
2022-09-16 02:31:10 +08:00
|
|
|
//Drag and drop a user in a room
|
2022-09-17 04:21:47 +08:00
|
|
|
await this.modPage.dragDropSelector(e.userTest, e.breakoutBox1);
|
|
|
|
await this.modPage.hasText(e.breakoutBox1, /Attendee/);
|
|
|
|
await this.modPage.waitAndClick(e.resetAssignments);
|
2022-09-16 02:31:10 +08:00
|
|
|
|
2022-09-10 00:54:50 +08:00
|
|
|
//Change room's name
|
2022-09-17 04:21:47 +08:00
|
|
|
await this.modPage.type(e.roomName, 'Test');
|
2022-09-10 00:54:50 +08:00
|
|
|
await this.modPage.hasElement(e.roomNameTest);
|
2022-09-16 02:31:10 +08:00
|
|
|
|
|
|
|
//Randomly assignment
|
2021-12-02 12:12:14 +08:00
|
|
|
await this.modPage.waitAndClick(e.randomlyAssign);
|
|
|
|
await this.modPage.waitAndClick(e.modalConfirmButton, ELEMENT_WAIT_LONGER_TIME);
|
2021-11-30 21:42:57 +08:00
|
|
|
|
2021-12-02 12:12:14 +08:00
|
|
|
await this.userPage.hasElement(e.modalConfirmButton);
|
2022-01-20 21:03:18 +08:00
|
|
|
await this.userPage.waitAndClick(e.modalDismissButton);
|
2021-12-02 12:12:14 +08:00
|
|
|
await this.modPage.hasElement(e.breakoutRoomsItem);
|
2021-11-30 21:42:57 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-04 01:01:36 +08:00
|
|
|
exports.Create = Create;
|