bigbluebutton-Github/bigbluebutton-html5/tests/puppeteer/webcam/webcamlayout.js

22 lines
562 B
JavaScript
Raw Normal View History

2020-09-09 23:51:56 +08:00
const util = require('./util');
const wle = require('./elements');
const Page = require('../core/page');
class WebcamLayout extends Page {
constructor() {
super('webcam-layout-test');
}
async share() {
await this.joinMicrophone(this);
await util.enableWebcam(this);
}
async test() {
await this.page.waitForSelector(wle.webcamConnecting);
await this.page.waitForSelector(wle.webcamVideo);
return await this.page.evaluate(util.countTestElements, wle.webcamItemTalkingUser) !== 0;
}
}
module.exports = exports = WebcamLayout;