Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f7790956
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看板
提交
f7790956
编写于
10月 31, 2022
作者:
Q
quanli
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
quanli1@huawei.com
Signed-off-by:
N
quanli
<
quanli1@huawei.com
>
上级
4665e968
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
94 addition
and
122 deletion
+94
-122
communication/wifi_standard/src/main/js/test/WifiCandidateNetWork.test.js
...fi_standard/src/main/js/test/WifiCandidateNetWork.test.js
+0
-1
communication/wifi_standard/src/main/js/test/WifiStationEvent.test.js
...n/wifi_standard/src/main/js/test/WifiStationEvent.test.js
+92
-121
communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js
...fi_standard/src/main/js/test/WifiStationFunctions.test.js
+2
-0
未找到文件。
communication/wifi_standard/src/main/js/test/WifiCandidateNetWork.test.js
浏览文件 @
f7790956
...
@@ -449,4 +449,3 @@ export default function actsWifiCandidateNetWorkTest() {
...
@@ -449,4 +449,3 @@ export default function actsWifiCandidateNetWorkTest() {
})
})
}
}
communication/wifi_standard/src/main/js/test/WifiStationEvent.test.js
浏览文件 @
f7790956
...
@@ -186,13 +186,11 @@ export default function actsWifiEventTest() {
...
@@ -186,13 +186,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0001 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0001 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] enableHotspot:
"
+
wifiext
.
enableHotspot
())
console
.
info
(
"
[wifi_test] enableHotspot:
"
+
wifiext
.
enableHotspot
())
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0001 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0001 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0001 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0001 end
'
);
...
@@ -212,13 +210,11 @@ export default function actsWifiEventTest() {
...
@@ -212,13 +210,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0002 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0002 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] disableHotspot:
"
+
wifiext
.
disableHotspot
())
console
.
info
(
"
[wifi_test] disableHotspot:
"
+
wifiext
.
disableHotspot
())
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0002 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0002 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0002 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0002 end
'
);
...
@@ -238,16 +234,14 @@ export default function actsWifiEventTest() {
...
@@ -238,16 +234,14 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0003 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0003 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
await
wifiext
.
getSupportedPowerModel
()
await
wifiext
.
getSupportedPowerModel
()
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
info
(
"
[wifi_test]getSupportedPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[wifi_test]getSupportedPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
});
});
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0003 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0003 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0003 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0003 end
'
);
...
@@ -267,8 +261,6 @@ export default function actsWifiEventTest() {
...
@@ -267,8 +261,6 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0004 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0004 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
function
getSupportedPowerModelResult
(){
function
getSupportedPowerModelResult
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wifiext
.
getSupportedPowerModel
(
wifiext
.
getSupportedPowerModel
(
...
@@ -283,10 +275,10 @@ export default function actsWifiEventTest() {
...
@@ -283,10 +275,10 @@ export default function actsWifiEventTest() {
});
});
}
}
await
getSupportedPowerModelResult
();
await
getSupportedPowerModelResult
();
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0004 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0004 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0004 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0004 end
'
);
...
@@ -306,16 +298,14 @@ export default function actsWifiEventTest() {
...
@@ -306,16 +298,14 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0005 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0005 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
await
wifiext
.
getPowerModel
()
await
wifiext
.
getPowerModel
()
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
info
(
"
[wifi_test]getPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[wifi_test]getPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
});
});
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0005 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0005 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0005 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0005 end
'
);
...
@@ -335,8 +325,6 @@ export default function actsWifiEventTest() {
...
@@ -335,8 +325,6 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0006 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0006 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
function
getPowerModelResult
(){
function
getPowerModelResult
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wifiext
.
getPowerModel
(
wifiext
.
getPowerModel
(
...
@@ -351,10 +339,10 @@ export default function actsWifiEventTest() {
...
@@ -351,10 +339,10 @@ export default function actsWifiEventTest() {
});
});
}
}
await
getPowerModelResult
();
await
getPowerModelResult
();
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0006 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0006 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0006 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0006 end
'
);
...
@@ -374,13 +362,11 @@ export default function actsWifiEventTest() {
...
@@ -374,13 +362,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0007 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0007 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] setPowerModel:
"
+
wifiext
.
setPowerModel
(
PowerModel
))
console
.
info
(
"
[wifi_test] setPowerModel:
"
+
wifiext
.
setPowerModel
(
PowerModel
))
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0007 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0007 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0007 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0007 end
'
);
...
@@ -400,13 +386,11 @@ export default function actsWifiEventTest() {
...
@@ -400,13 +386,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0008 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0008 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] enableHotspot:
"
+
wifiManagerExt
.
enableHotspot
())
console
.
info
(
"
[wifi_test] enableHotspot:
"
+
wifiManagerExt
.
enableHotspot
())
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0008 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0008 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0008 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0008 end
'
);
...
@@ -426,13 +410,11 @@ export default function actsWifiEventTest() {
...
@@ -426,13 +410,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0009 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0009 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] disableHotspot:
"
+
wifiManagerExt
.
disableHotspot
())
console
.
info
(
"
[wifi_test] disableHotspot:
"
+
wifiManagerExt
.
disableHotspot
())
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0009 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0009 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0009 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0009 end
'
);
...
@@ -452,16 +434,14 @@ export default function actsWifiEventTest() {
...
@@ -452,16 +434,14 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0010 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0010 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
await
wifiManagerExt
.
getSupportedPowerModel
()
await
wifiManagerExt
.
getSupportedPowerModel
()
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
info
(
"
[wifi_test]getSupportedPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[wifi_test]getSupportedPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
});
});
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0010 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0010 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0010 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0010 end
'
);
...
@@ -481,8 +461,6 @@ export default function actsWifiEventTest() {
...
@@ -481,8 +461,6 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0011 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0011 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
function
getSupportedPowerModelResult
(){
function
getSupportedPowerModelResult
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wifiManagerExt
.
getSupportedPowerModel
(
wifiManagerExt
.
getSupportedPowerModel
(
...
@@ -497,10 +475,10 @@ export default function actsWifiEventTest() {
...
@@ -497,10 +475,10 @@ export default function actsWifiEventTest() {
});
});
}
}
await
getSupportedPowerModelResult
();
await
getSupportedPowerModelResult
();
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0011 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0011 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0011 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0011 end
'
);
...
@@ -520,16 +498,14 @@ export default function actsWifiEventTest() {
...
@@ -520,16 +498,14 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0012 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0012 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
await
wifiManagerExt
.
getPowerModel
()
await
wifiManagerExt
.
getPowerModel
()
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
info
(
"
[wifi_test]getPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
console
.
info
(
"
[wifi_test]getPowerModel promise result ->
"
+
JSON
.
stringify
(
data
));
});
});
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0012 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0012 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0012 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0012 end
'
);
...
@@ -549,8 +525,6 @@ export default function actsWifiEventTest() {
...
@@ -549,8 +525,6 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0013 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0013 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
function
getPowerModelResult
(){
function
getPowerModelResult
(){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
wifiManagerExt
.
getPowerModel
(
wifiManagerExt
.
getPowerModel
(
...
@@ -565,10 +539,10 @@ export default function actsWifiEventTest() {
...
@@ -565,10 +539,10 @@ export default function actsWifiEventTest() {
});
});
}
}
await
getPowerModelResult
();
await
getPowerModelResult
();
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0013 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0013 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0013 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0013 end
'
);
...
@@ -588,13 +562,11 @@ export default function actsWifiEventTest() {
...
@@ -588,13 +562,11 @@ export default function actsWifiEventTest() {
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
var
isAccessToken
=
canIUse
(
"
SystemCapability.Communication.WiFi.AP.Extension
"
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0014 test.syscap.param.001 :
"
+
isAccessToken
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0014 test.syscap.param.001 :
"
+
isAccessToken
);
if
(
isAccessToken
)
{
if
(
isAccessToken
)
{
ret
=
true
;
}
console
.
info
(
"
[wifi_test] setPowerModel:
"
+
wifiManagerExt
.
setPowerModel
(
PowerModel
))
console
.
info
(
"
[wifi_test] setPowerModel:
"
+
wifiManagerExt
.
setPowerModel
(
PowerModel
))
expect
(
isAccessToken
).
assertFalse
();
done
();
done
();
}
expect
(
isAccessToken
).
assertFalse
();
}
catch
(
e
)
{
}
catch
(
e
)
{
expect
(
ret
).
assertFalse
();
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0014 canIUse isAccessToken error:
"
+
e
);
console
.
info
(
"
SUB_Communication_WiFi_SysCaps_Test_0014 canIUse isAccessToken error:
"
+
e
);
}
}
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0014 end
'
);
console
.
info
(
'
SUB_Communication_WiFi_SysCaps_Test_0014 end
'
);
...
@@ -604,4 +576,3 @@ export default function actsWifiEventTest() {
...
@@ -604,4 +576,3 @@ export default function actsWifiEventTest() {
})
})
}
}
communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js
浏览文件 @
f7790956
...
@@ -325,3 +325,5 @@ export default function actsWifiFunctionsTest() {
...
@@ -325,3 +325,5 @@ export default function actsWifiFunctionsTest() {
})
})
}
}
鸿蒙社区
@harmonycommunity
mentioned in commit
4c6475eb
·
11月 09, 2022
mentioned in commit
4c6475eb
mentioned in commit 4c6475eb9a6d7cf4fe5aa34bbf9162b16c6a968a
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录