Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
41331d8a
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
41331d8a
编写于
3月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2262 【communication】add WIF、BT JS L2 testcase
Merge pull request !2262 from 权力/cherry-pick-1646724011
上级
df008208
1dabc618
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
14 deletion
+28
-14
communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
...bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
+0
-1
communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js
...tooth_standard/src/main/js/default/test/Bluetooth.test.js
+21
-5
communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
.../wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
+7
-7
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
...on/wifi_standard/src/main/js/default/test/WifiSta.test.js
+0
-1
未找到文件。
communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
浏览文件 @
41331d8a
...
@@ -121,7 +121,6 @@ describe('bluetoothhostTest', function() {
...
@@ -121,7 +121,6 @@ describe('bluetoothhostTest', function() {
});
});
console
.
info
(
'
[bluetooth_js] discovery end
'
);
console
.
info
(
'
[bluetooth_js] discovery end
'
);
done
();
done
();
await
sleep
(
2000
);
})
})
...
...
communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js
浏览文件 @
41331d8a
...
@@ -820,6 +820,7 @@ describe('bluetoothhostTest', function() {
...
@@ -820,6 +820,7 @@ describe('bluetoothhostTest', function() {
console
.
info
(
'
[bluetooth_js] setLocalName end
'
);
console
.
info
(
'
[bluetooth_js] setLocalName end
'
);
})
})
/**
/**
* @tc.number SUB_COMMUNACATION_bluetooth_DEVICE_JS_SET_LOCAL_NAME_00014
* @tc.number SUB_COMMUNACATION_bluetooth_DEVICE_JS_SET_LOCAL_NAME_00014
* @tc.name testsetLocalName
* @tc.name testsetLocalName
...
@@ -829,7 +830,7 @@ describe('bluetoothhostTest', function() {
...
@@ -829,7 +830,7 @@ describe('bluetoothhostTest', function() {
* @tc.type Function
* @tc.type Function
* @tc.level Level 2
* @tc.level Level 2
*/
*/
it
(
'
bluetooth_classic_set_local_name14
'
,
0
,
async
function
(
done
)
{
it
(
'
bluetooth_classic_set_local_name14
'
,
0
,
function
(
)
{
console
.
info
(
'
[bluetooth_js] set localname start
'
);
console
.
info
(
'
[bluetooth_js] set localname start
'
);
var
name
=
bluetooth
.
setLocalName
(
'
0123456789012345678901234567890123456789012345678901
'
var
name
=
bluetooth
.
setLocalName
(
'
0123456789012345678901234567890123456789012345678901
'
+
'
23456789012345678901234567890123456789012345678901234567890123456789012345678012
'
+
'
23456789012345678901234567890123456789012345678901234567890123456789012345678012
'
...
@@ -838,14 +839,29 @@ describe('bluetoothhostTest', function() {
...
@@ -838,14 +839,29 @@ describe('bluetoothhostTest', function() {
expect
(
name
).
assertTrue
();
expect
(
name
).
assertTrue
();
var
localName
=
bluetooth
.
getLocalName
();
var
localName
=
bluetooth
.
getLocalName
();
console
.
info
(
'
[bluetooth_js] getLocalName result14 =
'
+
JSON
.
stringify
(
localName
));
console
.
info
(
'
[bluetooth_js] getLocalName result14 =
'
+
JSON
.
stringify
(
localName
));
console
.
info
(
'
[bluetooth_js] setLocalName end
'
);
})
/**
* @tc.number SUB_COMMUNACATION_bluetooth_DEVICE_JS_DISABLE_0001
* @tc.name testdisablebluetooth
* @tc.desc Test disablebluetooth api.
* @tc.author zhangyujie zwx1079266
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
bluetooth_classic_disable_bluetooth
'
,
0
,
function
()
{
console
.
info
(
'
[bluetooth_js] disable test start
'
);
let
disable
=
bluetooth
.
disableBluetooth
();
let
disable
=
bluetooth
.
disableBluetooth
();
console
.
info
(
'
[bluetooth_js] disable:
'
+
JSON
.
stringify
(
disable
));
console
.
info
(
'
[bluetooth_js] disable:
'
+
JSON
.
stringify
(
disable
));
expect
(
disable
).
assertTrue
();
expect
(
disable
).
assertTrue
();
await
sleep
(
2000
);
var
state
=
bluetooth
.
getState
(
);
console
.
info
(
'
[bluetooth_js]
setLocalName end
'
);
console
.
info
(
'
[bluetooth_js]
bt state:
'
+
JSON
.
stringify
(
state
)
);
done
(
);
console
.
info
(
'
[bluetooth_js] disable end
'
);
})
})
})
})
communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
浏览文件 @
41331d8a
...
@@ -296,7 +296,7 @@ describe('ACTS_WifiTest', function() {
...
@@ -296,7 +296,7 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
=
wifi
.
getHotspotConfig
();
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
preSharedKey
:
"
+
config
.
ssid
);
console
.
info
(
"
ssid
:
"
+
config
.
ssid
);
expect
(
config
.
ssid
.
length
).
assertEqual
(
32
);
expect
(
config
.
ssid
.
length
).
assertEqual
(
32
);
done
();
done
();
...
@@ -355,7 +355,7 @@ describe('ACTS_WifiTest', function() {
...
@@ -355,7 +355,7 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
=
wifi
.
getHotspotConfig
();
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
preSharedKey
:
"
+
config
.
ssid
);
console
.
info
(
"
ssid
:
"
+
config
.
ssid
);
expect
(
true
).
assertEqual
(
config
.
ssid
==
HotspotConfigC
.
ssid
);
expect
(
true
).
assertEqual
(
config
.
ssid
==
HotspotConfigC
.
ssid
);
})
})
...
@@ -440,8 +440,8 @@ describe('ACTS_WifiTest', function() {
...
@@ -440,8 +440,8 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
=
wifi
.
getHotspotConfig
();
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
preSharedKey
:
"
+
config
.
ssid
);
console
.
info
(
"
ssid
:
"
+
config
.
ssid
);
expect
(
config
.
preSharedKey
).
assertEqual
(
3
);
expect
(
config
.
securityType
).
assertEqual
(
3
);
console
.
log
(
"
[wifi_test] check the state of Hotspot
"
);
console
.
log
(
"
[wifi_test] check the state of Hotspot
"
);
var
isHotspotActive
=
wifi
.
isHotspotActive
();
var
isHotspotActive
=
wifi
.
isHotspotActive
();
console
.
info
(
"
[wifi_test] isHotspotActive ->
"
+
isHotspotActive
);
console
.
info
(
"
[wifi_test] isHotspotActive ->
"
+
isHotspotActive
);
...
@@ -478,8 +478,8 @@ describe('ACTS_WifiTest', function() {
...
@@ -478,8 +478,8 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
=
wifi
.
getHotspotConfig
();
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
preSharedKey
:
"
+
config
.
ssid
);
console
.
info
(
"
ssid
:
"
+
config
.
ssid
);
expect
(
config
.
preSharedKey
).
assertEqual
(
1
);
expect
(
config
.
securityType
).
assertEqual
(
1
);
done
();
done
();
})
})
...
@@ -513,7 +513,7 @@ describe('ACTS_WifiTest', function() {
...
@@ -513,7 +513,7 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config maxConn is 8
"
);
console
.
log
(
"
[wifi_test] check current hotspot config maxConn is 8
"
);
var
config
=
wifi
.
getHotspotConfig
();
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
ssid
:
"
+
config
.
maxConn
);
console
.
info
(
"
maxConn
:
"
+
config
.
maxConn
);
expect
(
config
.
maxConn
).
assertEqual
(
8
);
expect
(
config
.
maxConn
).
assertEqual
(
8
);
console
.
log
(
"
[wifi_test] set more maxConn invalid hotspot config
"
);
console
.
log
(
"
[wifi_test] set more maxConn invalid hotspot config
"
);
...
...
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
浏览文件 @
41331d8a
...
@@ -753,7 +753,6 @@ describe('ACTS_WifiTest', function() {
...
@@ -753,7 +753,6 @@ describe('ACTS_WifiTest', function() {
"
staticIp
"
:
{
"
ipAddress
"
:
1284752956
,
"
gateway
"
:
1284752936
},
"
staticIp
"
:
{
"
ipAddress
"
:
1284752956
,
"
gateway
"
:
1284752936
},
};
};
var
result1
=
wifi
.
connectToDevice
(
wifiDeviceConfigIp
);
var
result1
=
wifi
.
connectToDevice
(
wifiDeviceConfigIp
);
await
sleep
(
2000
);
console
.
log
(
"
[wifi_test] wifi connectToDevice result:
"
+
result1
);
console
.
log
(
"
[wifi_test] wifi connectToDevice result:
"
+
result1
);
expect
(
result1
).
assertTrue
();
expect
(
result1
).
assertTrue
();
console
.
info
(
"
[wifi_test] check isconnected wifi
"
);
console
.
info
(
"
[wifi_test] check isconnected wifi
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录