Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
61b3082a
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
61b3082a
编写于
8月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9629 【XTS】【communication】【beta2】wifi覆盖率上库
Merge pull request !9629 from 权力/myfeature3
上级
497ac09c
5e63a0c5
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
378 addition
and
300 deletion
+378
-300
communication/wifi_standard/src/main/js/test/WifiManagerCandidateNetWork.test.js
...dard/src/main/js/test/WifiManagerCandidateNetWork.test.js
+75
-37
communication/wifi_standard/src/main/js/test/WifiManagerStationFunctions.test.js
...dard/src/main/js/test/WifiManagerStationFunctions.test.js
+303
-263
未找到文件。
communication/wifi_standard/src/main/js/test/WifiManagerCandidateNetWork.test.js
浏览文件 @
61b3082a
...
@@ -138,6 +138,44 @@ export default function actsWifiManagerCandidateNetWorkTest() {
...
@@ -138,6 +138,44 @@ export default function actsWifiManagerCandidateNetWorkTest() {
* @tc.level Level 2
* @tc.level Level 2
*/
*/
it
(
'
SUB_Communication_WiFi_XTS_CandidateNetWork_0002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_Communication_WiFi_XTS_CandidateNetWork_0002
'
,
0
,
async
function
(
done
)
{
let
EapMethod
=
{
"
EAP_NONE
"
:
0
,
"
EAP_PEAP
"
:
1
,
"
EAP_TLS
"
:
2
,
"
EAP_TTLS
"
:
3
,
"
EAP_PWD
"
:
4
,
"
EAP_SIM
"
:
5
,
"
EAP_AKA
"
:
6
,
"
EAP_AKA_PRIME
"
:
7
,
"
EAP_UNAUTH_TLS
"
:
8
,
};
let
Phase2Method
=
{
"
PHASE2_NONE
"
:
0
,
"
PHASE2_PAP
"
:
1
,
"
PHASE2_MSCHAP
"
:
2
,
"
PHASE2_MSCHAPV2
"
:
3
,
"
PHASE2_GTC
"
:
4
,
"
PHASE2_SIM
"
:
5
,
"
PHASE2_AKA
"
:
6
,
"
PHASE2_AKA_PRIME
"
:
7
,
};
let
WifiEapConfig
=
{
"
eapMethod
"
:
wifiMg
.
EapMethod
.
EAP_NONE
,
"
phase2Method
"
:
wifiMg
.
Phase2Method
.
PHASE2_NONE
,
"
identity
"
:
"
aaa
"
,
"
anonymousIdentity
"
:
"
bbb
"
,
"
password
"
:
"
12345678
"
,
"
caCertAliases
"
:
"
ddd
"
,
"
caPath
"
:
"
eee
"
,
"
clientCertAliases
"
:
"
fff
"
,
"
certEntry
"
:
new
Uint8Array
(),
"
certPassword
"
:
"
12345678
"
,
"
altSubjectMatch
"
:
"
ggg
"
,
"
domainSuffixMatch
"
:
"
hhh
"
,
"
realm
"
:
"
iii
"
,
"
plmn
"
:
"
jjj
"
,
"
eapSubId
"
:
"
kkk
"
,
};
let
wifiDeviceConfig
=
{
let
wifiDeviceConfig
=
{
"
ssid
"
:
"
TEST_PSK
"
,
"
ssid
"
:
"
TEST_PSK
"
,
"
bssid
"
:
"
22:9b:e6:48:1f:5c
"
,
"
bssid
"
:
"
22:9b:e6:48:1f:5c
"
,
...
@@ -151,6 +189,7 @@ export default function actsWifiManagerCandidateNetWorkTest() {
...
@@ -151,6 +189,7 @@ export default function actsWifiManagerCandidateNetWorkTest() {
"
randomMacType
"
:
0
,
"
randomMacType
"
:
0
,
"
randomMacAddr
"
:
"
11:22:33:44:55:66
"
,
"
randomMacAddr
"
:
"
11:22:33:44:55:66
"
,
"
staticIp
"
:
{
"
ipAddress
"
:
1284752956
,
"
gateway
"
:
1284752936
},
"
staticIp
"
:
{
"
ipAddress
"
:
1284752956
,
"
gateway
"
:
1284752936
},
"
eapConfig
"
:
wifiMg
.
WifiEapConfig
,
};
};
await
wifiMg
.
addCandidateConfig
(
wifiDeviceConfig
)
await
wifiMg
.
addCandidateConfig
(
wifiDeviceConfig
)
.
then
(
netWorkId
=>
{
.
then
(
netWorkId
=>
{
...
@@ -381,4 +420,3 @@ export default function actsWifiManagerCandidateNetWorkTest() {
...
@@ -381,4 +420,3 @@ export default function actsWifiManagerCandidateNetWorkTest() {
})
})
})
})
}
}
communication/wifi_standard/src/main/js/test/WifiManagerStationFunctions.test.js
浏览文件 @
61b3082a
...
@@ -308,7 +308,7 @@ export default function actsWifiManagerFunctionsTest() {
...
@@ -308,7 +308,7 @@ export default function actsWifiManagerFunctionsTest() {
it
(
'
SUB_Communication_WiFi_XTS_Sta_0034
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_Communication_WiFi_XTS_Sta_0034
'
,
0
,
async
function
(
done
)
{
let
scanResult
=
wifiMg
.
scan
();
let
scanResult
=
wifiMg
.
scan
();
await
sleep
(
3000
);
await
sleep
(
3000
);
let
getScanInfoListResult
=
wifiMg
.
getScanInfoList
();
let
getScanInfoListResult
=
wifiMg
.
getScanResultsSync
();
console
.
info
(
"
[wifi_test]wifi getScanInfoList result :
"
+
JSON
.
stringify
(
getScanInfoListResult
));
console
.
info
(
"
[wifi_test]wifi getScanInfoList result :
"
+
JSON
.
stringify
(
getScanInfoListResult
));
let
clen
=
Object
.
keys
(
getScanInfoListResult
).
length
;
let
clen
=
Object
.
keys
(
getScanInfoListResult
).
length
;
console
.
info
(
"
[wifi_test]wifi getScanInfoList length result :
"
+
JSON
.
stringify
(
clen
));
console
.
info
(
"
[wifi_test]wifi getScanInfoList length result :
"
+
JSON
.
stringify
(
clen
));
...
@@ -358,7 +358,47 @@ export default function actsWifiManagerFunctionsTest() {
...
@@ -358,7 +358,47 @@ export default function actsWifiManagerFunctionsTest() {
expect
(
typeof
(
isBandTypeSupported4
)).
assertEqual
(
'
boolean
'
);
expect
(
typeof
(
isBandTypeSupported4
)).
assertEqual
(
'
boolean
'
);
done
();
done
();
})
})
/**
* @tc.number SUB_Communication_WiFi_XTS_Sta_0036
* @tc.name testgetScanResults
* @tc.desc Test getScanResults promise and callback API functionality.
* @tc.type Function
* @tc.level Level 0
*/
it
(
'
SUB_Communication_WiFi_XTS_Sta_0036
'
,
0
,
async
function
(
done
)
{
await
wifiMg
.
getScanResults
()
.
then
(
result
=>
{
let
clen
=
Object
.
keys
(
result
).
length
;
expect
(
true
).
assertEqual
(
clen
>=
0
);
console
.
info
(
"
[wifi_test]getScanResults promise result:
"
+
JSON
.
stringify
(
result
));
});
function
getScan
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wifiMg
.
getScanResults
(
(
err
,
result
)
=>
{
if
(
err
)
{
console
.
log
(
"
[wifi_test] wifi getScanResults failed:
"
+
err
);
}
let
clen
=
Object
.
keys
(
result
).
length
;
if
(
!
(
clen
==
0
))
{
expect
(
clen
).
assertLarger
(
0
);
console
.
info
(
"
[wifi_test] getScanResults callback result:
"
+
JSON
.
stringify
(
result
));
for
(
let
j
=
0
;
j
<
clen
;
++
j
)
{
console
.
info
(
"
ssid:
"
+
result
[
j
].
ssid
+
"
bssid:
"
+
result
[
j
].
bssid
+
"
securityType:
"
+
result
[
j
].
securityType
+
"
rssi:
"
+
result
[
j
].
rssi
+
"
band:
"
+
result
[
j
].
band
+
"
frequency:
"
+
result
[
j
].
frequency
+
"
channelWidth:
"
+
result
[
j
].
channelWidth
+
"
timestamp
"
+
result
[
j
].
timestamp
+
"
capabilities
"
+
result
[
j
].
capabilities
);
}
}
resolve
();
});
});
}
await
getScan
();
done
();
})
console
.
log
(
"
*************[wifi_test] start wifi js unit test end*************
"
);
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录