d8c5aa46d9
* updating old tests + collecting more snapshots [WIP] * updates old test suites and collects more visual regressions screenshots * remove snapshots and their collection temporary * run tests from packages.json * update test execution command/export constants from .env to core/constants.js * update tests/puppeteer/README.md file * update LOOP_INTERVAL variable call and assign timeouts to the webcam share spec * redefine waitForSelector func in page.js, update chat test suite specs and add poll chat message test spec * Merge remote-tracking branch 'upstream/develop' into updating-old-tests-visual-with-visual-regressions * update webcam test specs collecting videoPreviewTimeout and use it to wait for videoPreview selector * update custom parameters test suite * update breakout test suite * update webcam layout test suite * update multiusers test suite * update notifications test suite * update presentation test suite * whiteboard test suite * screenshare test suite * update sharednotes test suite * user ELEMENT_WAIT_TIME variable from timeouts constants.js * list TEST CONSTANTS by category * add poll test suite and assigns the right unassigned timeouts * set test pages to headless
20 lines
714 B
JavaScript
20 lines
714 B
JavaScript
const { ELEMENT_WAIT_TIME, ELEMENT_WAIT_LONGER_TIME } = require('../core/constants');
|
|
const se = require('./elements');
|
|
|
|
async function startSharedNotes(test) {
|
|
await test.waitForSelector(se.sharedNotes, ELEMENT_WAIT_TIME);
|
|
await test.click(se.sharedNotes, true);
|
|
await test.waitForSelector(se.hideNoteLabel, ELEMENT_WAIT_LONGER_TIME);
|
|
const resp = await test.page.evaluate(getTestElement, se.etherpad);
|
|
await test.waitForSelector(se.etherpad, ELEMENT_WAIT_TIME);
|
|
return resp;
|
|
}
|
|
|
|
async function getTestElement(element) {
|
|
const response = await document.querySelectorAll(element).length >= 1;
|
|
return response;
|
|
}
|
|
|
|
exports.getTestElement = getTestElement;
|
|
exports.startSharedNotes = startSharedNotes;
|