Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2239a816
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看板
提交
2239a816
编写于
8月 29, 2023
作者:
Q
quanli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
quanli1@huawei.com
Signed-off-by:
N
quanli
<
quanli1@huawei.com
>
上级
b0c7d812
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
18 deletion
+23
-18
communication/bluetooth_gatt/src/main/js/test/BtManagerGattAdvertiser.test.js
...oth_gatt/src/main/js/test/BtManagerGattAdvertiser.test.js
+3
-3
communication/bluetooth_gatt/src/main/js/test/BtManagerGattManager.test.js
...etooth_gatt/src/main/js/test/BtManagerGattManager.test.js
+7
-8
communication/btmanager_switchoff/src/main/js/test/btManagerSwitchOff003.test.js
..._switchoff/src/main/js/test/btManagerSwitchOff003.test.js
+1
-1
communication/wifi_ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
...ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
+0
-4
communication/wifi_standard/src/main/js/test/WifiManagerStationEvent.test.js
...standard/src/main/js/test/WifiManagerStationEvent.test.js
+6
-1
communication/wifi_standard/src/main/js/test/WifiStationEvent.test.js
...n/wifi_standard/src/main/js/test/WifiStationEvent.test.js
+6
-1
未找到文件。
communication/bluetooth_gatt/src/main/js/test/BtManagerGattAdvertiser.test.js
浏览文件 @
2239a816
...
...
@@ -144,7 +144,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer
[
2
]
=
7
;
serviceValueBuffer
[
3
]
=
8
;
let
setting
=
{
interval
:
20
,
interval
:
32
,
txPower
:
-
10
,
connectable
:
true
,
}
...
...
@@ -256,7 +256,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer
[
2
]
=
7
;
serviceValueBuffer
[
3
]
=
8
;
let
setting
=
{
interval
:
16
400
,
interval
:
16
384
,
txPower
:
-
10
,
connectable
:
true
,
}
...
...
@@ -312,7 +312,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer
[
2
]
=
7
;
serviceValueBuffer
[
3
]
=
8
;
let
setting
=
{
interval
:
19
,
interval
:
32
,
txPower
:
-
10
,
connectable
:
true
,
}
...
...
communication/bluetooth_gatt/src/main/js/test/BtManagerGattManager.test.js
浏览文件 @
2239a816
...
...
@@ -213,20 +213,19 @@ describe('btManagerGattManagerTest', function() {
it
(
'
SUB_COMMUNICATION_BTMANAGER_GETDEVICENAME_0100
'
,
0
,
async
function
(
done
)
{
try
{
gattClient
.
connect
();
let
deviceName
=
gattClient
.
getDeviceName
().
then
((
data
)
=>
{
await
gattClient
.
getDeviceName
().
then
((
data
)
=>
{
console
.
info
(
'
[bluetooth_js] getDeviceName data info:
'
+
JSON
.
stringify
(
data
));
})
console
.
info
(
'
[bluetooth_js] deviceName:
'
+
deviceName
);
// }).catch(err => {
// console.error('[bluetooth_js] bluetooth getDeviceName has error: '+ JSON.stringify(err));
// expect(err.code).assertEqual(2900099);
// done();
// });
done
();
}
catch
(
error
)
{
console
.
error
(
`[bluetooth_js]GetDeviceName_0100 failed, code is
${
error
.
code
}
,message is
${
error
.
message
}
`
);
expect
(
error
.
code
).
assertEqual
(
'
2900099
'
);
if
(
error
.
code
==
'
2900099
'
)
{
expect
(
error
.
code
).
assertEqual
(
'
2900099
'
);
}
else
{
expect
(
error
.
code
).
assertEqual
(
2900099
);
}
}
gattClient
.
disconnect
();
done
();
})
...
...
communication/btmanager_switchoff/src/main/js/test/btManagerSwitchOff003.test.js
浏览文件 @
2239a816
...
...
@@ -545,7 +545,7 @@ describe('btManagerError003Test', function() {
serviceValueBuffer
[
2
]
=
7
;
serviceValueBuffer
[
3
]
=
8
;
let
setting
=
{
interval
:
20
,
interval
:
32
,
txPower
:
-
10
,
connectable
:
true
,
}
...
...
communication/wifi_ErrorCode201/src/main/js/test/ActWifiErrorCode201.test.js
浏览文件 @
2239a816
...
...
@@ -49,9 +49,6 @@ function sleep(delay) {
return
new
Promise
(
resovle
=>
setTimeout
(
resovle
,
delay
))
}
function
checkWifiPowerOn
(){
console
.
info
(
"
[wifi_test]wifi status:
"
+
wifiMg
.
isWifiActive
());
}
function
resolveIP
(
ip
)
{
return
(
ip
>>
24
&
0xFF
)
+
"
.
"
+
(
ip
>>
16
&
0xFF
)
+
"
.
"
+
(
ip
>>
8
&
0xFF
)
+
"
.
"
+
(
ip
&
0xFF
);
}
...
...
@@ -65,7 +62,6 @@ export default function actsWifiErrorCode201Test() {
})
beforeEach
(
function
()
{
checkWifiPowerOn
();
})
afterEach
(
function
()
{
})
...
...
communication/wifi_standard/src/main/js/test/WifiManagerStationEvent.test.js
浏览文件 @
2239a816
...
...
@@ -116,7 +116,12 @@ export default function actsWifiManagerEventTest() {
console
.
info
(
"
[wifi_test]wifiScanStateChange callback, result:
"
+
JSON
.
stringify
(
result
));
}
wifiMg
.
on
(
wifiScanState
,
wifiScanStateChangeCallback
);
let
scanResult
=
wifiMg
.
scan
();
try
{
let
scanResult
=
wifiMg
.
scan
();
}
catch
(
error
)
{
console
.
error
(
`scan failed, code is
${
error
.
code
}
, message is
${
error
.
message
}
`
);
expect
(
true
).
assertEqual
(
error
!=
null
);
}
await
sleep
(
3000
);
wifiMg
.
off
(
wifiScanState
,
wifiScanStateChangeCallback
);
done
();
...
...
communication/wifi_standard/src/main/js/test/WifiStationEvent.test.js
浏览文件 @
2239a816
...
...
@@ -117,7 +117,12 @@ export default function actsWifiEventTest() {
console
.
info
(
"
[wifi_test]wifiScanStateChange callback, result:
"
+
JSON
.
stringify
(
result
));
}
wifi
.
on
(
wifiScanState
,
wifiScanStateChangeCallback
);
let
scanResult
=
wifi
.
scan
();
try
{
let
scanResult
=
wifi
.
scan
();
}
catch
(
error
)
{
console
.
error
(
`scan failed, code is
${
error
.
code
}
, message is
${
error
.
message
}
`
);
expect
(
true
).
assertEqual
(
error
!=
null
);
}
await
sleep
(
3000
);
wifi
.
off
(
wifiScanState
,
wifiScanStateChangeCallback
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录