未验证 提交 5a95d59e 编写于 作者: O openharmony_ci 提交者: Gitee

!4134 修改issue:【OpenHarmony】【xts_acts】【communication】修改WiFi模块需要手动开启的问题

Merge pull request !4134 from 王闻天/master
......@@ -22,6 +22,15 @@ function sleep(delay) {
}
function checkWifiPowerOn(){
let enable = wifi.enableWifi();
console.info("enableWifi result0000123:" + enable);
wifi.on('wifiStateChange', state => {
console.info("wifiStateLisener state:" +state)
if (state === 1) { // 1: wifi is enable, 0:wifi is disable
wifi.scan()
wifi.getLinkedInfo()
}
})
console.info("wifi_test/wifi status:" + wifi.isWifiActive());
expect(wifi.isWifiActive()).assertTrue();
}
......@@ -34,6 +43,7 @@ let GroupOwnerBand = {
describe('ACTS_WifiTest', function () {
beforeEach(function () {
checkWifiPowerOn();
})
afterEach(function () {
......
......@@ -31,6 +31,15 @@ let WifiSecurityType = {
}
function checkWifiPowerOn(){
let enable = wifi.enableWifi();
console.info("enableWifi result0000123:" + enable);
wifi.on('wifiStateChange', state => {
console.info("wifiStateLisener state:" +state)
if (state === 1) { // 1: wifi is enable, 0:wifi is disable
wifi.scan()
wifi.getLinkedInfo()
}
})
console.info("wifi_test/wifi status:" + wifi.isWifiActive());
expect(wifi.isWifiActive()).assertTrue();
}
......@@ -53,12 +62,14 @@ let ConnState = {
}
describe('ACTS_WifiTest', function() {
beforeEach(function() {
checkWifiPowerOn();
})
afterEach(function() {})
/**
* @tc.number open_0001
* @tc.name SUB_Communication_WiFi_Sta_Open_0001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册