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

32 lines
816 B
JavaScript
Raw Normal View History

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