提交 5105a087 编写于 作者: Q q00313334 提交者: 权力

fixed 6a66245e from https://gitee.com/q00313334/xts_acts/pulls/1155

wifijs testcase modified
Signed-off-by: Nq00313334 <quanli1@huawei.com>
上级 99165ff6
...@@ -37,8 +37,9 @@ export default { ...@@ -37,8 +37,9 @@ export default {
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this)
this.timeout = 600000 this.timeout = 600000
configService.setConfig(this)
require('../../test/List.test') require('../../test/List.test')
core.execute() core.execute()
}, },
......
...@@ -70,7 +70,7 @@ describe('ACTS_WifiTest', function () { ...@@ -70,7 +70,7 @@ describe('ACTS_WifiTest', function () {
expect(enable).assertTrue(); expect(enable).assertTrue();
} }
sleep(300000); sleep(30000);
}) })
/** /**
...@@ -159,9 +159,8 @@ describe('ACTS_WifiTest', function () { ...@@ -159,9 +159,8 @@ describe('ACTS_WifiTest', function () {
console.log("[wifi_test] wifi active result: " + active); console.log("[wifi_test] wifi active result: " + active);
if(!active){ if(!active){
var enable = wifi.enableWifi(); var enable = wifi.enableWifi();
sleep(3000); sleep(30000);
except(enable).assertTrue(); except(enable).assertTrue();
} }
wifi.addDeviceConfig(wifiConfig, wifi.addDeviceConfig(wifiConfig,
(result) => { (result) => {
...@@ -169,7 +168,7 @@ describe('ACTS_WifiTest', function () { ...@@ -169,7 +168,7 @@ describe('ACTS_WifiTest', function () {
console.info("[wifi_test] test_007 wifi addDeviceconfig callback: " +JSON.stringify(result)); console.info("[wifi_test] test_007 wifi addDeviceconfig callback: " +JSON.stringify(result));
var conn = wifi.connectToNetwork(result); var conn = wifi.connectToNetwork(result);
expect(conn).assertTrue(); expect(conn).assertTrue();
sleep(5000); sleep(50000);
console.info("[wifi_test] test_007 wifi addDeviceconfig callback: " + result); console.info("[wifi_test] test_007 wifi addDeviceconfig callback: " + result);
for (var j = 0; j < JSON.stringify(result).length; ++j) { for (var j = 0; j < JSON.stringify(result).length; ++j) {
console.info("ssid: " + result[j].ssid); console.info("ssid: " + result[j].ssid);
...@@ -187,7 +186,7 @@ describe('ACTS_WifiTest', function () { ...@@ -187,7 +186,7 @@ describe('ACTS_WifiTest', function () {
} }
var discon = wifi.disconnect(); var discon = wifi.disconnect();
except(discon).assertTrue(); except(discon).assertTrue();
sleep(3000); sleep(30000);
var disable = wifi.disableWifi(); var disable = wifi.disableWifi();
except(disable).assertTrue(); except(disable).assertTrue();
}); });
...@@ -205,7 +204,7 @@ describe('ACTS_WifiTest', function () { ...@@ -205,7 +204,7 @@ describe('ACTS_WifiTest', function () {
if(!active){ if(!active){
var enable = wifi.enableWifi(); var enable = wifi.enableWifi();
except(enable).assertTrue(); except(enable).assertTrue();
sleep(3000); sleep(30000);
} }
wifi.addDeviceConfig(wifiConfig) wifi.addDeviceConfig(wifiConfig)
.then(result => { .then(result => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册