bigbluebutton-Github/bigbluebutton-tests/puppeteer/polling/poll.js
2021-09-22 16:22:47 -03:00

26 lines
643 B
JavaScript

const Page = require('../core/page');
const e = require('../core/elements');
const util = require('../notifications/util');
const { checkElementLengthEqualTo } = require('../core/util');
class Polling extends Page {
constructor() {
super();
}
async test(testName) {
try {
await util.startPoll(this);
await this.screenshot(`${testName}`, `01-before-chat-message-send-[${this.meetingId}]`);
const resp = this.page.evaluate(checkElementLengthEqualTo, e.pollMenuButton, 1);
return resp;
} catch (err) {
await this.logger(err);
return false;
}
}
}
module.exports = exports = Polling;