2022-01-20 03:50:59 +08:00
|
|
|
const { MultiUsers } = require("./multiusers");
|
|
|
|
const e = require('../core/elements');
|
|
|
|
const { sleep } = require('../core/helpers');
|
2022-02-04 04:10:26 +08:00
|
|
|
const { setGuestPolicyOption } = require("./util");
|
2022-01-20 03:50:59 +08:00
|
|
|
|
|
|
|
class GuestPolicy extends MultiUsers {
|
|
|
|
constructor(browser, context) {
|
|
|
|
super(browser, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
async askModerator() {
|
2022-02-04 04:10:26 +08:00
|
|
|
await setGuestPolicyOption(this.modPage, e.askModerator);
|
|
|
|
await sleep(500);
|
2022-01-20 03:50:59 +08:00
|
|
|
await this.initUserPage(false);
|
|
|
|
await this.modPage.hasElement(e.waitingUsersBtn);
|
|
|
|
}
|
|
|
|
|
|
|
|
async alwaysAccept() {
|
2022-02-04 04:10:26 +08:00
|
|
|
await setGuestPolicyOption(this.modPage, e.askModerator);
|
|
|
|
await setGuestPolicyOption(this.modPage, e.alwaysAccept);
|
|
|
|
await sleep(500);
|
2022-01-20 03:50:59 +08:00
|
|
|
await this.initUserPage(false);
|
|
|
|
await this.userPage.hasElement(e.audioModal);
|
|
|
|
}
|
|
|
|
|
|
|
|
async alwaysDeny() {
|
2022-02-04 04:10:26 +08:00
|
|
|
await setGuestPolicyOption(this.modPage, e.alwaysDeny);
|
2022-01-20 03:50:59 +08:00
|
|
|
await sleep(1500);
|
|
|
|
await this.initUserPage(false);
|
|
|
|
await this.userPage.hasElement(e.joinMeetingDemoPage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.GuestPolicy = GuestPolicy;
|