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

36 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-07-17 22:32:52 +08:00
const { default: test } = require('@playwright/test');
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');
2023-07-17 22:32:52 +08:00
const { getSettings } = require('../core/settings');
class Status extends Page {
constructor(browser, page) {
super(browser, page);
}
2022-01-20 03:50:59 +08:00
async changeUserStatus() {
2023-07-17 22:32:52 +08:00
const { userStatusEnabled } = getSettings();
test.fail(!userStatusEnabled, 'Shared notes is disabled');
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;