bigbluebutton-Github/bigbluebutton-tests/playwright/breakout/create.js

49 lines
1.7 KiB
JavaScript
Raw Normal View History

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');
class Create extends MultiUsers {
2021-11-30 21:42:57 +08:00
constructor(browser, context) {
super(browser, context);
2021-11-30 21:42:57 +08:00
}
// Create Breakoutrooms
async create() {
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);
await this.modPage.waitAndClick(e.randomlyAssign);
await this.modPage.waitAndClick(e.modalConfirmButton, ELEMENT_WAIT_LONGER_TIME);
2021-11-30 21:42:57 +08:00
await this.userPage.hasElement(e.modalConfirmButton);
2022-01-20 21:03:18 +08:00
await this.userPage.waitAndClick(e.modalDismissButton);
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;