fix guest policy tests
This commit is contained in:
parent
88277f587b
commit
19070895ee
@ -1,6 +1,7 @@
|
||||
const { MultiUsers } = require("./multiusers");
|
||||
const e = require('../core/elements');
|
||||
const { sleep } = require('../core/helpers');
|
||||
const { setGuestPolicyOption } = require("./util");
|
||||
|
||||
class GuestPolicy extends MultiUsers {
|
||||
constructor(browser, context) {
|
||||
@ -8,25 +9,22 @@ class GuestPolicy extends MultiUsers {
|
||||
}
|
||||
|
||||
async askModerator() {
|
||||
await this.modPage.waitAndClick(e.manageUsers);
|
||||
await this.modPage.waitAndClick(e.guestPolicyLabel);
|
||||
await this.modPage.waitAndClick(e.askModerator);
|
||||
await setGuestPolicyOption(this.modPage, e.askModerator);
|
||||
await sleep(500);
|
||||
await this.initUserPage(false);
|
||||
await this.modPage.hasElement(e.waitingUsersBtn);
|
||||
}
|
||||
|
||||
async alwaysAccept() {
|
||||
await this.modPage.waitAndClick(e.manageUsers);
|
||||
await this.modPage.waitAndClick(e.guestPolicyLabel);
|
||||
await this.modPage.waitAndClick(e.alwaysAccept);
|
||||
await setGuestPolicyOption(this.modPage, e.askModerator);
|
||||
await setGuestPolicyOption(this.modPage, e.alwaysAccept);
|
||||
await sleep(500);
|
||||
await this.initUserPage(false);
|
||||
await this.userPage.hasElement(e.audioModal);
|
||||
}
|
||||
|
||||
async alwaysDeny() {
|
||||
await this.modPage.waitAndClick(e.manageUsers);
|
||||
await this.modPage.waitAndClick(e.guestPolicyLabel);
|
||||
await this.modPage.waitAndClick(e.alwaysDeny);
|
||||
await setGuestPolicyOption(this.modPage, e.alwaysDeny);
|
||||
await sleep(1500);
|
||||
await this.initUserPage(false);
|
||||
await this.userPage.hasElement(e.joinMeetingDemoPage);
|
||||
|
@ -11,5 +11,12 @@ async function openLockViewers(test) {
|
||||
await test.waitAndClick(e.lockViewersButton);
|
||||
}
|
||||
|
||||
async function setGuestPolicyOption(test, option) {
|
||||
await test.waitAndClick(e.manageUsers);
|
||||
await test.waitAndClick(e.guestPolicyLabel);
|
||||
await test.waitAndClick(option);
|
||||
}
|
||||
|
||||
exports.setStatus = setStatus;
|
||||
exports.openLockViewers = openLockViewers;
|
||||
exports.setGuestPolicyOption = setGuestPolicyOption;
|
||||
|
Loading…
Reference in New Issue
Block a user