Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
04b99c0d
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看板
提交
04b99c0d
编写于
8月 04, 2022
作者:
Q
quanli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
quanli1@huawei.com
Signed-off-by:
N
quanli
<
quanli1@huawei.com
>
上级
3e03a27d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
27 addition
and
25 deletion
+27
-25
communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js
...ication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js
+3
-5
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
...on/wifi_standard/src/main/js/default/test/WifiSta.test.js
+24
-20
未找到文件。
communication/wifi_p2p/src/main/js/default/test/WifiP2P.test.js
浏览文件 @
04b99c0d
...
...
@@ -25,7 +25,7 @@ function sleep(delay) {
}
function
checkWifiPowerOn
(){
console
.
info
(
"
W
ifi_test/wifi status:
"
+
wifi
.
isWifiActive
());
console
.
info
(
"
w
ifi_test/wifi status:
"
+
wifi
.
isWifiActive
());
}
let
GroupOwnerBand
=
{
...
...
@@ -34,7 +34,7 @@ let GroupOwnerBand = {
GO_BAND_5GHZ
:
2
,
}
describe
(
'
A
CTS_
WifiTest
'
,
function
()
{
describe
(
'
A
cts
WifiTest
'
,
function
()
{
beforeEach
(
function
()
{
console
.
info
(
"
beforeEach start
"
);
checkWifiPowerOn
();
...
...
@@ -101,7 +101,6 @@ describe('ACTS_WifiTest', function () {
if
(
err
)
{
console
.
error
(
'
wifi_test / failed to get getCurrentGroup:
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
return
;
}
else
{
console
.
info
(
"
[wifi_test] getCurrentGroup [callback] ->
"
+
JSON
.
stringify
(
result
));
let
removeConfig
=
wifi
.
removeGroup
();
...
...
@@ -215,8 +214,6 @@ describe('ACTS_WifiTest', function () {
expect
(
true
).
assertEqual
(
resultLength
!=
0
);
done
()
});
done
();
})
/**
...
...
@@ -506,3 +503,4 @@ describe('ACTS_WifiTest', function () {
console
.
log
(
"
*************[wifi_test] start wifi js unit test end*************
"
);
})
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
浏览文件 @
04b99c0d
...
...
@@ -25,11 +25,11 @@ function sleep(delay) {
}
function
checkWifiPowerOn
(){
console
.
info
(
"
W
ifi_test/wifi status:
"
+
wifi
.
isWifiActive
());
console
.
info
(
"
w
ifi_test/wifi status:
"
+
wifi
.
isWifiActive
());
}
function
resolve
(
ip
)
{
return
(
ip
>>
24
&
0xFF
)
+
"
.
"
+
(
ip
>>
16
&
0xFF
)
+
(
ip
>>
8
&
0xFF
)
+
(
ip
&
0xFF
);
function
resolve
IP
(
ip
)
{
return
(
ip
>>
24
&
0xFF
)
+
"
.
"
+
(
ip
>>
16
&
0xFF
)
+
"
.
"
+
(
ip
>>
8
&
0xFF
)
+
"
.
"
+
(
ip
&
0xFF
);
}
...
...
@@ -65,11 +65,11 @@ let WifiChannelWidth = {
WIDTH_40MHZ
:
1
,
WIDTH_80MHZ
:
2
,
WIDTH_160MHZ
:
3
,
WIDTH_
2
80MHZ_PLUS
:
4
,
WIDTH_INVALID
WIDTH_80MHZ_PLUS
:
4
,
WIDTH_INVALID
:
null
,
}
describe
(
'
A
CTS_
WifiTest
'
,
function
()
{
describe
(
'
A
cts
WifiTest
'
,
function
()
{
beforeEach
(
function
()
{
checkWifiPowerOn
();
...
...
@@ -123,8 +123,10 @@ describe('ACTS_WifiTest', function() {
"
rssi:
"
+
result
[
j
].
rssi
+
"
band:
"
+
result
[
j
].
band
+
"
frequency:
"
+
result
[
j
].
frequency
+
"
timestamp
"
+
result
[
j
].
timestamp
+
"
capabilities
"
+
result
[
j
].
capabilities
+
"
channelWidth:
"
+
result
[
j
].
channelWidth
+
"
centerFrequency0
"
+
result
[
j
].
centerFrequency0
+
"
centerFrequency1
"
+
result
[
j
].
centerFrequency1
+
"
infoElems
"
+
result
[
j
].
infoElems
+
"
channelWidth:
"
+
result
[
j
].
channelWidth
+
"
centerFrequency0
"
+
result
[
j
].
centerFrequency0
+
"
centerFrequency1
"
+
result
[
j
].
centerFrequency1
+
"
infoElems
"
+
result
[
j
].
infoElems
);
}
}
...
...
@@ -194,8 +196,9 @@ describe('ACTS_WifiTest', function() {
expect
(
wifi
.
isWifiActive
()).
assertTrue
();
let
countryCode
=
wifi
.
getCountryCode
();
console
.
info
(
"
[wifi_test] getCountryCode ->
"
+
JSON
.
stringify
(
countryCode
));
console
.
info
(
"
[wifi_test] getCountryCode.length ->
"
+
JSON
.
stringify
(
countryCode
.
length
));
expect
(
true
).
assertEqual
(
countryCode
.
length
==
2
);
let
countrylen
=
countryCode
.
length
;
console
.
info
(
"
[wifi_test] getCountryCode.length ->
"
+
JSON
.
stringify
(
countrylen
));
expect
(
true
).
assertEqual
(
countrylen
==
2
);
})
/**
...
...
@@ -285,32 +288,32 @@ describe('ACTS_WifiTest', function() {
"
linkSpeed:
"
+
result
.
linkSpeed
+
"
frequency:
"
+
result
.
frequency
+
"
snr:
"
+
result
.
snr
+
"
macAddress:
"
+
result
.
macAddress
+
"
ipAddress:
"
+
result
.
ipAddress
+
"
suppState
"
+
result
.
suppState
+
"
connState:
"
+
result
.
connState
+
"
suppState
:
"
+
result
.
suppState
+
"
connState:
"
+
result
.
connState
+
"
macType:
"
+
result
.
macType
);
let
state
=
wifi
.
getLinkedInfo
().
connState
;
if
(
state
==
c
onnState
.
SCANNING
){
if
(
state
==
C
onnState
.
SCANNING
){
expect
(
true
).
assertEqual
(
state
==
0
);
}
if
(
state
==
c
onnState
.
CONNECTING
){
if
(
state
==
C
onnState
.
CONNECTING
){
expect
(
true
).
assertEqual
(
state
==
1
);
}
if
(
state
==
c
onnState
.
AUTHENTICATING
){
if
(
state
==
C
onnState
.
AUTHENTICATING
){
expect
(
true
).
assertEqual
(
state
==
2
);
}
if
(
state
==
c
onnState
.
OBTAINING_IPADDR
){
if
(
state
==
C
onnState
.
OBTAINING_IPADDR
){
expect
(
true
).
assertEqual
(
state
==
3
);
}
if
(
state
==
c
onnState
.
CONNECTED
){
if
(
state
==
C
onnState
.
CONNECTED
){
expect
(
true
).
assertEqual
(
state
==
4
);
}
if
(
state
==
c
onnState
.
DISCONNECTING
){
if
(
state
==
C
onnState
.
DISCONNECTING
){
expect
(
true
).
assertEqual
(
state
==
5
);
}
if
(
state
==
c
onnState
.
DISCONNECTED
){
if
(
state
==
C
onnState
.
DISCONNECTED
){
expect
(
true
).
assertEqual
(
state
==
6
);
}
if
(
state
==
c
onnState
.
UNKNOWN
){
if
(
state
==
C
onnState
.
UNKNOWN
){
expect
(
true
).
assertEqual
(
state
==
7
);
}
done
();
...
...
@@ -465,11 +468,11 @@ describe('ACTS_WifiTest', function() {
* @tc.level Level 3
*/
it
(
'
SUB_Communication_WiFi_Hotspot_Off_0002
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
[wifi_test] hotspotStateChange off test
"
);
try
{
await
wifi
.
off
(
'
hotspotStateChange
'
,
(
data
)
=>
{
console
.
info
(
"
[wifi_test] hotspotStateChange Off ->
"
+
data
);
expect
(
true
).
assertEqual
(
data
!=
null
);
console
.
info
(
"
[wifi_test] wifiRssiChange unregister end
"
);
});
}
catch
(
e
)
{
...
...
@@ -480,3 +483,4 @@ 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录