2021-11-18 04:07:14 +08:00
|
|
|
const e = require('../core/elements');
|
2021-11-03 00:45:52 +08:00
|
|
|
|
|
|
|
async function setStatus(page, status) {
|
2021-12-04 05:44:55 +08:00
|
|
|
await page.waitAndClick(e.firstUser);
|
|
|
|
await page.waitAndClick(e.setStatus);
|
|
|
|
await page.waitAndClick(status);
|
2021-11-03 00:45:52 +08:00
|
|
|
}
|
|
|
|
|
2022-01-29 03:52:22 +08:00
|
|
|
async function openLockViewers(test) {
|
|
|
|
await test.waitAndClick(e.manageUsers);
|
|
|
|
await test.waitAndClick(e.lockViewersButton);
|
|
|
|
}
|
|
|
|
|
2022-02-04 04:10:26 +08:00
|
|
|
async function setGuestPolicyOption(test, option) {
|
|
|
|
await test.waitAndClick(e.manageUsers);
|
|
|
|
await test.waitAndClick(e.guestPolicyLabel);
|
|
|
|
await test.waitAndClick(option);
|
|
|
|
}
|
|
|
|
|
2022-02-08 02:01:47 +08:00
|
|
|
async function checkAvatarIcon(test, checkModIcon = true) {
|
|
|
|
await test.hasElement(`${e.firstUser} ${checkModIcon ? e.moderatorAvatar : e.viewerAvatar}`);
|
|
|
|
}
|
|
|
|
|
2021-12-04 01:01:36 +08:00
|
|
|
exports.setStatus = setStatus;
|
2022-01-29 03:52:22 +08:00
|
|
|
exports.openLockViewers = openLockViewers;
|
2022-02-04 04:10:26 +08:00
|
|
|
exports.setGuestPolicyOption = setGuestPolicyOption;
|
2022-02-08 02:01:47 +08:00
|
|
|
exports.checkAvatarIcon = checkAvatarIcon;
|