2021-02-17 04:57:10 +08:00
|
|
|
const { ELEMENT_WAIT_TIME } = require('../core/constants');
|
2018-11-23 20:55:16 +08:00
|
|
|
const e = require('./elements');
|
|
|
|
|
|
|
|
async function setStatus(test, status) {
|
2021-02-17 04:57:10 +08:00
|
|
|
await test.waitForSelector(e.firstUser, ELEMENT_WAIT_TIME);
|
|
|
|
await test.click(e.firstUser, true);
|
|
|
|
await test.waitForSelector(e.setStatus, ELEMENT_WAIT_TIME);
|
2018-11-23 20:55:16 +08:00
|
|
|
await test.click(e.setStatus, true);
|
2021-02-17 04:57:10 +08:00
|
|
|
await test.waitForSelector(status, ELEMENT_WAIT_TIME);
|
2018-11-23 20:55:16 +08:00
|
|
|
await test.click(status, true);
|
|
|
|
}
|
|
|
|
|
2021-03-31 21:10:57 +08:00
|
|
|
async function connectionStatus(test) {
|
2021-08-20 04:22:31 +08:00
|
|
|
await test.click(e.connectionStatusBtn, true);
|
|
|
|
await test.waitForSelector(e.connectionStatusModal, ELEMENT_WAIT_TIME);
|
2021-03-31 21:10:57 +08:00
|
|
|
}
|
|
|
|
|
2018-11-23 20:55:16 +08:00
|
|
|
exports.setStatus = setStatus;
|
2021-03-31 21:10:57 +08:00
|
|
|
exports.connectionStatus = connectionStatus;
|