bigbluebutton-Github/bigbluebutton-tests/puppeteer/sharednotes/util.js

19 lines
592 B
JavaScript
Raw Normal View History

const { ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
const e = require('../core/elements');
2021-08-21 04:33:57 +08:00
const { getElementLength } = require('../core/util');
2020-03-25 02:13:51 +08:00
async function startSharedNotes(test) {
2021-08-20 04:22:31 +08:00
try {
await test.waitAndClick(e.sharedNotes);
await test.waitForSelector(e.hideNoteLabel, ELEMENT_WAIT_LONGER_TIME);
const resp = await test.page.evaluate(getElementLength, e.etherpad) >= 1;
await test.waitForSelector(e.etherpad);
2021-08-20 04:22:31 +08:00
return resp === true;
} catch (err) {
await test.logger(err);
2021-08-20 04:22:31 +08:00
return false;
}
2020-03-25 02:13:51 +08:00
}
exports.startSharedNotes = startSharedNotes;