bigbluebutton-Github/bigbluebutton-tests/playwright/connectionStatus/util.js

18 lines
568 B
JavaScript
Raw Normal View History

2022-01-20 03:50:59 +08:00
const e = require('../core/elements');
async function openConnectionStatus(test) {
await test.waitAndClick(e.connectionStatusBtn);
await test.waitForSelector(e.connectionStatusModal);
}
2022-01-20 21:03:18 +08:00
function checkNetworkStatus(dataContainer) {
const values = Array.from(document.querySelectorAll(`${dataContainer} > div`));
2022-01-20 03:50:59 +08:00
values.splice(4, values.length - 4);
const check = values.filter(elem => elem.textContent.includes(' 0 k'))[0];
if (!check) return true;
}
exports.openConnectionStatus = openConnectionStatus;
exports.checkNetworkStatus = checkNetworkStatus;