bigbluebutton-Github/bigbluebutton-tests/playwright/user/status.js

31 lines
916 B
JavaScript
Raw Normal View History

2021-11-18 04:07:14 +08:00
const Page = require('../core/page');
2022-01-20 03:50:59 +08:00
const { setStatus } = require('./util');
const { waitAndClearNotification, waitAndClearDefaultPresentationNotification } = require('../notifications/util');
2021-11-18 04:07:14 +08:00
const e = require('../core/elements');
class Status extends Page {
constructor(browser, page) {
super(browser, page);
}
2022-01-20 03:50:59 +08:00
async changeUserStatus() {
await waitAndClearDefaultPresentationNotification(this);
await setStatus(this, e.applaud);
await this.waitForSelector(e.smallToastMsg);
await this.checkElement(e.applauseIcon);
2021-12-10 21:30:29 +08:00
await waitAndClearNotification(this);
await setStatus(this, e.away);
await this.waitForSelector(e.smallToastMsg);
await this.checkElement(e.awayIcon);
}
2021-12-10 21:30:29 +08:00
async mobileTagName() {
2022-02-08 03:22:48 +08:00
await this.waitAndClick(e.userListToggleBtn);
await this.waitForSelector(e.currentUser);
2021-12-10 21:30:29 +08:00
await this.hasElement(e.mobileUser);
}
}
2021-11-03 06:50:20 +08:00
exports.Status = Status;