未验证 提交 77cb2ee1 编写于 作者: O openharmony_ci 提交者: Gitee

!4761 【communication】修改WIFI JS L2测试用例1+新框架适配

Merge pull request !4761 from 权力/myfeature
......@@ -14,7 +14,7 @@
*/
//require('./WifiSta.test.js')
//require('./WifiSoftAP.test.js')
import ACTS_WifiTest from './WifiP2P.test.js'
import ActsWifiTest from './WifiP2P.test.js'
export default function testsuite() {
ACTS_WifiTest()
ActsWifiTest()
}
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
import wifi from '@ohos.wifi'
......@@ -33,8 +33,8 @@ let GroupOwnerBand = {
GO_BAND_2GHZ : 1,
GO_BAND_5GHZ : 2,
}
describe('ACTS_WifiTest', function () {
export default function ActsWifiTest() {
describe('ActsWifiTest', function () {
beforeEach(function () {
console.info("beforeEach start");
checkWifiPowerOn();
......@@ -506,3 +506,4 @@ describe('ACTS_WifiTest', function () {
console.log("*************[wifi_test] start wifi js unit test end*************");
})
}
......@@ -14,7 +14,7 @@
*/
require('./WifiSta.test.js')
//require('./WifiSoftAP.test.js')
import ACTS_WifiTest from './WifiSta.test.js'
import ActsWifiTest from './WifiSta.test.js'
export default function testsuite() {
ACTS_WifiTest()
ActsWifiTest()
}
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
import wifi from '@ohos.wifi'
......@@ -66,10 +66,11 @@ let WifiChannelWidth = {
WIDTH_80MHZ : 2,
WIDTH_160MHZ : 3,
WIDTH_280MHZ_PLUS : 4,
WIDTH_INVALID
WIDTH_INVALID : null,
}
describe('ACTS_WifiTest', function() {
export default function ActsWifiTest() {
describe('ActsWifiTest', function() {
beforeEach(function() {
checkWifiPowerOn();
......@@ -289,28 +290,28 @@ describe('ACTS_WifiTest', function() {
"macType: " + result.macType);
let state = wifi.getLinkedInfo().connState;
if(state == connState.SCANNING){
if(state == ConnState.SCANNING){
expect(true).assertEqual(state == 0);
}
if(state == connState.CONNECTING){
if(state == ConnState.CONNECTING){
expect(true).assertEqual(state == 1);
}
if(state == connState.AUTHENTICATING){
if(state == ConnState.AUTHENTICATING){
expect(true).assertEqual(state == 2);
}
if(state == connState.OBTAINING_IPADDR){
if(state == ConnState.OBTAINING_IPADDR){
expect(true).assertEqual(state == 3);
}
if(state == connState.CONNECTED){
if(state == ConnState.CONNECTED){
expect(true).assertEqual(state == 4);
}
if(state == connState.DISCONNECTING){
if(state == ConnState.DISCONNECTING){
expect(true).assertEqual(state == 5);
}
if(state == connState.DISCONNECTED){
if(state == ConnState.DISCONNECTED){
expect(true).assertEqual(state == 6);
}
if(state == connState.UNKNOWN){
if(state == ConnState.UNKNOWN){
expect(true).assertEqual(state == 7);
}
done();
......@@ -479,4 +480,5 @@ describe('ACTS_WifiTest', function() {
})
console.log("*************[wifi_test] start wifi js unit test end*************");
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册