bigbluebutton-Github/bigbluebutton-tests/puppeteer/chat/save.js

30 lines
783 B
JavaScript
Raw Normal View History

2018-11-23 20:55:16 +08:00
const Page = require('../core/page');
const e = require('../core/elements');
const util = require('./util');
class Save extends Page {
constructor() {
2021-09-23 03:22:47 +08:00
super();
}
async test(testName) {
try {
await util.openChat(this);
await this.screenshot(`${testName}`, `01-before-chat-options-click-[${this.meetingId}]`);
await this.waitAndClick(e.chatOptions);
await this.screenshot(`${testName}`, `02-chat-options-clicked-[${this.meetingId}]`);
await this.waitAndClick(e.chatSave);
let clicked = '';
clicked = await this.page.addListener('click', () => document.addEventListener('click'));
return clicked !== '';
2021-08-26 22:13:18 +08:00
} catch (err) {
await this.logger(err);
return false;
}
}
}
2020-07-21 05:12:04 +08:00
module.exports = exports = Save;