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
|
|
|
|
//await this.modPage.waitAndClick(e.randomlyAssign);
|
|
|
|
//await this.modPage.getLocator(e.)
|
|
|
|
|
|
|
|
//Change room's name
|
|
|
|
await this.modPage.type(e.roomName, 'Teste');
|
|
|
|
await this.modPage.press('Tab');
|
|
|
|
await this.modPage.hasElement(e.roomNameTest);
|
|
|
|
|
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;
|