Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
28aa6075
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看板
未验证
提交
28aa6075
编写于
3月 10, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 10, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2321 【communication】add WIFI testcase1
Merge pull request !2321 from 权力/cherry-pick-1646884903
上级
6b17b167
c1118b18
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
420 addition
and
60 deletion
+420
-60
communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js
...uetooth_ble/src/main/js/default/test/BluetoothBle.test.js
+20
-15
communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
...bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
+21
-16
communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js
...tooth_standard/src/main/js/default/test/Bluetooth.test.js
+20
-3
communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
.../wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
+10
-6
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
...on/wifi_standard/src/main/js/default/test/WifiSta.test.js
+349
-20
未找到文件。
communication/bluetooth_ble/src/main/js/default/test/BluetoothBle.test.js
浏览文件 @
28aa6075
...
...
@@ -80,24 +80,29 @@ describe('bluetoothhostTest', function() {
*/
it
(
'
bluetooth_classic_enable_bluetooth_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
[bluetooth_js] enable start
'
);
var
enable
=
bluetooth
.
enableBluetooth
();
expect
(
enable
).
assertEqual
(
true
);
console
.
info
(
'
[bluetooth_js] enable On =
'
+
JSON
.
stringify
(
enable
));
var
sta
=
bluetooth
.
getState
();
switch
(
sta
){
case
0
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
expect
(
enable
).
assertEqual
(
true
);
break
;
case
1
:
console
.
info
(
'
[bluetooth_js] bt turning on:
'
+
JSON
.
stringify
(
sta
));
break
;
case
2
:
console
.
info
(
'
[bluetooth_js] state is On:
'
+
JSON
.
stringify
(
sta
));
break
;
case
3
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
break
;
default
:
console
.
info
(
'
[bluetooth_js] enable success
'
);
}
await
sleep
(
2000
);
var
state
=
bluetooth
.
getState
();
console
.
info
(
'
[bluetooth_js] getState On =
'
+
JSON
.
stringify
(
state
));
console
.
info
(
'
[bluetooth_js]state on:
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_ON
));
console
.
info
(
'
[bluetooth_js]off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_OFF
));
console
.
info
(
'
[bluetooth_js] turning on :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_TURNING_ON
));
console
.
info
(
'
[bluetooth_js] turning off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_TURNING_OFF
));
console
.
info
(
'
[bluetooth_js] ble turning on :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_ON
));
console
.
info
(
'
[bluetooth_js] ble on:
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_ON
));
console
.
info
(
'
[bluetooth_js] ble turning off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_OFF
));
console
.
info
(
'
bluetooth enable done
'
);
done
();
})
...
...
communication/bluetooth_on/src/main/js/default/test/BluetoothOn.test.js
浏览文件 @
28aa6075
...
...
@@ -66,22 +66,27 @@ describe('bluetoothhostTest', function() {
done
();
}
}
console
.
info
(
'
[bluetooth_js]state on:
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_ON
));
console
.
info
(
'
[bluetooth_js]off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_OFF
));
console
.
info
(
'
[bluetooth_js] turning on :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_TURNING_ON
));
console
.
info
(
'
[bluetooth_js] turning off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_TURNING_OFF
));
console
.
info
(
'
[bluetooth_js] ble turning on :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_ON
));
console
.
info
(
'
[bluetooth_js] ble on:
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_ON
));
console
.
info
(
'
[bluetooth_js] ble turning off :
'
+
JSON
.
stringify
(
bluetooth
.
BluetoothState
.
STATE_BLE_TURNING_OFF
));
var
enable
=
bluetooth
.
enableBluetooth
();
expect
(
enable
).
assertEqual
(
true
);
console
.
info
(
'
[bluetooth_js] enable On =
'
+
JSON
.
stringify
(
enable
));
await
sleep
(
4000
);
var
sta
=
bluetooth
.
getState
();
switch
(
sta
){
case
0
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
expect
(
enable
).
assertEqual
(
true
);
break
;
case
1
:
console
.
info
(
'
[bluetooth_js] bt turning on:
'
+
JSON
.
stringify
(
sta
));
break
;
case
2
:
console
.
info
(
'
[bluetooth_js] state is On:
'
+
JSON
.
stringify
(
sta
));
break
;
case
3
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
break
;
default
:
console
.
info
(
'
[bluetooth_js] enable success
'
);
}
await
sleep
(
2000
);
var
state
=
bluetooth
.
getState
();
console
.
info
(
'
[bluetooth_js] getState On =
'
+
JSON
.
stringify
(
state
));
await
bluetooth
.
off
(
'
stateChange
'
,
result
=>
{
...
...
communication/bluetooth_standard/src/main/js/default/test/Bluetooth.test.js
浏览文件 @
28aa6075
...
...
@@ -73,9 +73,26 @@ describe('bluetoothhostTest', function() {
*/
it
(
'
bluetooth_classic_enable_bluetooth_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
[bluetooth_js] enable start
'
);
var
enable
=
bluetooth
.
enableBluetooth
();
expect
(
enable
).
assertEqual
(
true
);
console
.
info
(
'
[bluetooth_js] enable On =
'
+
JSON
.
stringify
(
enable
));
var
sta
=
bluetooth
.
getState
();
switch
(
sta
){
case
0
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
expect
(
enable
).
assertEqual
(
true
);
break
;
case
1
:
console
.
info
(
'
[bluetooth_js] bt turning on:
'
+
JSON
.
stringify
(
sta
));
break
;
case
2
:
console
.
info
(
'
[bluetooth_js] state is On:
'
+
JSON
.
stringify
(
sta
));
break
;
case
3
:
var
enable
=
bluetooth
.
enableBluetooth
();
console
.
info
(
'
[bluetooth_js] enable0 =
'
+
JSON
.
stringify
(
enable
));
break
;
default
:
console
.
info
(
'
[bluetooth_js] enable success
'
);
}
await
sleep
(
2000
);
var
state
=
bluetooth
.
getState
();
console
.
info
(
'
[bluetooth_js] getState On =
'
+
JSON
.
stringify
(
state
));
...
...
communication/wifi_hotspot/src/main/js/default/test/WifiSoftAP.test.js
浏览文件 @
28aa6075
...
...
@@ -137,7 +137,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0003
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0003
* @tc.desc Test set a invalid hotspot config
* @tc.desc Test set a invalid
band
hotspot config
* @tc.level Level 2
*/
it
(
'
SUB_Communication_WiFi_Hotspot_Config_0003
'
,
0
,
async
function
(
done
)
{
...
...
@@ -200,6 +200,10 @@ describe('ACTS_WifiTest', function() {
var
isSuccess1
=
wifi
.
setHotspotConfig
(
HotspotConfigM1
);
console
.
log
(
"
[wifi_test] set 65 preSharedKey invalid hotspot config result:
"
+
isSuccess1
);
expect
(
isSuccess1
).
assertFalse
();
console
.
info
(
"
[wifi_test] check band of current band should be 5G.
"
);
var
hotspotConfigS
=
wifi
.
getHotspotConfig
();
console
.
log
(
"
[wifi_test] getHotspotConfig result:
"
+
JSON
.
stringify
(
hotspotConfigS
));
expect
(
hotspotConfigS
.
preSharedKey
.
length
).
assertEqual
(
63
);
done
();
})
...
...
@@ -296,7 +300,7 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
=
wifi
.
getHotspotConfig
();
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
);
done
();
...
...
@@ -566,10 +570,10 @@ describe('ACTS_WifiTest', function() {
console
.
log
(
"
[wifi_test] set a psk preSharedKey hotspot config result1:
"
+
isSuccess1
);
expect
(
isSuccess1
).
assertTrue
();
console
.
log
(
"
[wifi_test] check current hotspot config preSharedKey is 8bit
"
);
var
config
s
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
s
));
console
.
info
(
"
ssid:
"
+
config
s
.
ssid
);
expect
(
config
s
.
ssid
).
assertEqual
(
'
WIFITEST
'
);
var
config
=
wifi
.
getHotspotConfig
();
console
.
info
(
"
[wifi_test] getHotspotConfig result ->
"
+
JSON
.
stringify
(
config
));
console
.
info
(
"
ssid:
"
+
config
.
ssid
);
expect
(
config
.
ssid
).
assertEqual
(
'
WIFITEST
'
);
done
();
})
...
...
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
浏览文件 @
28aa6075
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录