2021-09-22 11:51:29 +08:00
|
|
|
const e = require('../core/elements');
|
2018-11-23 20:55:16 +08:00
|
|
|
|
|
|
|
async function setStatus(test, status) {
|
2021-09-22 21:11:56 +08:00
|
|
|
await test.waitAndClick(e.firstUser);
|
|
|
|
await test.waitAndClick(e.setStatus);
|
|
|
|
await test.waitAndClick(status);
|
2018-11-23 20:55:16 +08:00
|
|
|
}
|
|
|
|
|
2021-03-31 21:10:57 +08:00
|
|
|
async function connectionStatus(test) {
|
2021-09-22 21:11:56 +08:00
|
|
|
await test.waitAndClick(e.connectionStatusBtn);
|
|
|
|
await test.waitForSelector(e.connectionStatusModal);
|
2021-03-31 21:10:57 +08:00
|
|
|
}
|
|
|
|
|
2021-10-05 01:57:12 +08:00
|
|
|
function checkNetworkStatus(dataContainer, networdData) {
|
|
|
|
const values = Array.from(document.querySelectorAll(`${dataContainer} > ${networdData}`));
|
|
|
|
values.splice(4, values.length - 4);
|
|
|
|
const check = values.filter(e => e.textContent.includes(' 0 k'))[0];
|
|
|
|
|
|
|
|
if (!check) return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-11-23 20:55:16 +08:00
|
|
|
exports.setStatus = setStatus;
|
2021-03-31 21:10:57 +08:00
|
|
|
exports.connectionStatus = connectionStatus;
|
2021-10-05 01:57:12 +08:00
|
|
|
exports.checkNetworkStatus = checkNetworkStatus;
|