Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ce459836
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看板
未验证
提交
ce459836
编写于
2月 26, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2063 【communication】增加WIFI P2P JS L2测试用例
Merge pull request !2063 from 权力/myfeature1
上级
6a4777ba
84ede791
变更
5
展开全部
显示空白变更内容
内联
并排
Showing
5 changed file
with
782 addition
and
30 deletion
+782
-30
communication/wifi_standard/src/main/js/default/test/List.test.js
...ation/wifi_standard/src/main/js/default/test/List.test.js
+1
-0
communication/wifi_standard/src/main/js/default/test/WifiP2P.test.js
...on/wifi_standard/src/main/js/default/test/WifiP2P.test.js
+584
-0
communication/wifi_standard/src/main/js/default/test/WifiSoftAP.test.js
...wifi_standard/src/main/js/default/test/WifiSoftAP.test.js
+22
-1
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
...on/wifi_standard/src/main/js/default/test/WifiSta.test.js
+24
-2
location/geolocation_standard/src/main/js/default/test/Geolocation.test.js
...ion_standard/src/main/js/default/test/Geolocation.test.js
+151
-27
未找到文件。
communication/wifi_standard/src/main/js/default/test/List.test.js
浏览文件 @
ce459836
...
...
@@ -14,4 +14,5 @@
*/
require
(
'
./WifiSta.test.js
'
)
require
(
'
./WifiSoftAP.test.js
'
)
require
(
'
./WifiP2P.test.js
'
)
communication/wifi_standard/src/main/js/default/test/WifiP2P.test.js
0 → 100644
浏览文件 @
ce459836
此差异已折叠。
点击以展开。
communication/wifi_standard/src/main/js/default/test/WifiSoftAP.test.js
浏览文件 @
ce459836
...
...
@@ -55,6 +55,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number OPEN_0002
* @tc.name SUB_Communication_WiFi_Hotspot_Open_0002
* @tc.desc Test wifi.enableHotspot and wifi.disableHotspot API functionality1.
* @tc.author wudangping wwx1075776
* @tc.level Level 0
*/
it
(
'
SUB_Communication_WiFi_Hotspot_Open_0002
'
,
0
,
function
()
{
...
...
@@ -91,6 +92,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number OPEN_0003
* @tc.name SUB_Communication_WiFi_Hotspot_Open_0003
* @tc.author wudangping wwx1075776
* @tc.desc Test open Hotspot after open wifi
* @tc.level Level 1
*/
...
...
@@ -115,6 +117,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0001
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test set a valid 2.4G hotspot config
* @tc.level Level 0
*/
...
...
@@ -153,6 +156,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0002
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0002
* @tc.author wudangping wwx1075776
* @tc.desc Test set a valid 5G hotspot config
* @tc.level Level 1
*/
...
...
@@ -196,6 +200,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0003
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0003
* @tc.author wudangping wwx1075776
* @tc.desc Test set a invalid hotspot config
* @tc.level Level 2
*/
...
...
@@ -220,10 +225,10 @@ describe('ACTS_WifiTest', function() {
})
/**
* @tc.number CONFIG_0004
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0004
* @tc.author wudangping wwx1075776
* @tc.desc Test set a max preSharedKey is hotspot config
* @tc.level Level 2
*/
...
...
@@ -274,6 +279,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0005
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0005
* @tc.author wudangping wwx1075776
* @tc.desc Test set a min preSharedKey is hotspot config
* @tc.level Level 2
*/
...
...
@@ -322,6 +328,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0006
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0006
* @tc.author wudangping wwx1075776
* @tc.desc Test set a max ssid for hotspot config
* @tc.level Level 2
*/
...
...
@@ -373,6 +380,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0007
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0007
* @tc.author wudangping wwx1075776
* @tc.desc Test set a null ssid invalid hotspot config
* @tc.level Level 2
*/
...
...
@@ -398,6 +406,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0008
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0008
* @tc.author wudangping wwx1075776
* @tc.desc Test set a contains Chinese.special.digits valid hotspot config
* @tc.level Level 2
*/
...
...
@@ -429,6 +438,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0009
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0009
* @tc.author wudangping wwx1075776
* @tc.desc Test set a invalid preSharedKey hotspot config
* @tc.level Level 2
*/
...
...
@@ -479,6 +489,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0010
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0010
* @tc.author wudangping wwx1075776
* @tc.desc Test set a valid PSK preSharedKey hotspot config
* @tc.level Level 2
*/
...
...
@@ -521,6 +532,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0011
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0011
* @tc.author wudangping wwx1075776
* @tc.desc Test set a valid OPEN preSharedKey hotspot config
* @tc.level Level 2
*/
...
...
@@ -560,6 +572,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONFIG_0012
* @tc.name SUB_Communication_WiFi_Hotspot_Config_0012
* @tc.author wudangping wwx1075776
* @tc.desc Test set a valid hotspot config after open Hotspot
* @tc.level Level 2
*/
...
...
@@ -607,6 +620,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONN_0001
* @tc.name SUB_Communication_WiFi_Hotspot_Conn_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test set a maxConn and more maxConn hotspot config
* @tc.level Level 2
*/
...
...
@@ -657,6 +671,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number CONN_0002
* @tc.name SUB_Communication_WiFi_Hotspot_Conn_0002
* @tc.author wudangping wwx1075776
* @tc.desc Test Obtains the list of clients that are connected to a Wi-Fi hotspot.
* @tc.level Level 2
*/
...
...
@@ -686,6 +701,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number SUB_Communication_WiFi_Hotspot_ON_0001
* @tc.name testhotspotStateChangeOn
* @tc.author wudangping wwx1075776
* @tc.desc Test hotspotStateChangeOn api.
* @tc.size MEDIUM
* @tc.type Function
...
...
@@ -709,6 +725,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Hotspot_Off_0002
* @tc.name testhotspotStateChangeOff
* @tc.desc Test hotspotStateChange api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -731,6 +748,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Hotspot_ON_0003
* @tc.name testhotspotStaJoinOn
* @tc.desc Test hotspotStaJoinOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -753,6 +771,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Hotspot_Off_0004
* @tc.name testhotspotStaJoinOff
* @tc.desc Test hotspotStaJoin api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -775,6 +794,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Hotspot_ON_0005
* @tc.name testhotspotStaLeaveOn
* @tc.desc Test hotspotStaLeaveOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -797,6 +817,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Hotspot_Off_0006
* @tc.name testhotspotStaLeaveOff
* @tc.desc Test hotspotStaLeave api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
communication/wifi_standard/src/main/js/default/test/WifiSta.test.js
浏览文件 @
ce459836
...
...
@@ -27,6 +27,7 @@ function sleep(delay) {
}
}
var
WifiSecurityType
=
{
WIFI_SEC_TYPE_INVALID
:
0
,
WIFI_SEC_TYPE_OPEN
:
1
,
...
...
@@ -84,6 +85,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number open_0001
* @tc.name SUB_Communication_WiFi_Sta_Open_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test wifi.isWifiEnable API functionality.
*/
it
(
'
SUB_Communication_WiFi_Sta_Open_0001
'
,
0
,
function
()
{
...
...
@@ -92,7 +94,7 @@ describe('ACTS_WifiTest', function() {
var
active
=
wifi
.
isWifiActive
();
if
(
!
active
)
{
var
enable
=
wifi
.
enableWifi
();
sleep
(
3
000
);
sleep
(
5
000
);
console
.
log
(
"
[wifi_test] wifi open result:
"
+
enable
);
expect
(
enable
).
assertTrue
();
}
...
...
@@ -108,6 +110,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Scan_0001
* @tc.name SUB_Communication_WiFi_Sta_Scan_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test get ScanInfos callback API functionality.
*/
it
(
'
SUB_Communication_WiFi_Sta_Scan_0001
'
,
0
,
async
function
(
done
)
{
...
...
@@ -163,6 +166,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Scan_0004
* @tc.name SUB_Communication_WiFi_Sta_Scan_0004
* @tc.author wudangping wwx1075776
* @tc.desc Test wifi.getSignalLevel API functionality.
*/
it
(
'
SUB_Communication_WiFi_Sta_Scan_0004
'
,
0
,
function
()
{
...
...
@@ -201,6 +205,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Config_0001
* @tc.name SUB_Communication_WiFi_Sta_Config_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test create a OPEN SecurityType wifi device config
*/
it
(
'
SUB_Communication_WiFi_Sta_Config_0001
'
,
0
,
async
function
(
done
)
{
...
...
@@ -255,6 +260,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Config_0002
* @tc.name SUB_Communication_WiFi_Sta_Config_0002
* @tc.author wudangping wwx1075776
* @tc.desc Test create a PSK SecurityType wifi device config
*/
it
(
'
SUB_Communication_WiFi_Sta_Config_0002
'
,
0
,
async
function
(
done
)
{
...
...
@@ -294,6 +300,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Config_0005
* @tc.name SUB_Communication_WiFi_Sta_Config_0005
* @tc.author wudangping wwx1075776
* @tc.desc Test remove all wifi device config
*/
it
(
'
SUB_Communication_WiFi_Sta_Config_0005
'
,
0
,
async
function
(
done
)
{
...
...
@@ -359,6 +366,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Config_0007
* @tc.name SUB_Communication_WiFi_Sta_Config_0007
* @tc.author wudangping wwx1075776
* @tc.desc Test update wifi device config
*/
it
(
'
SUB_Communication_WiFi_Sta_Config_0007
'
,
0
,
async
function
(
done
)
{
...
...
@@ -411,6 +419,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_info_0001
* @tc.name testgetMacAddress
* @tc.desc Test getMacAddress api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -432,6 +441,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_info_0002
* @tc.name testgetCountryCode
* @tc.desc Test getCountryCode api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -453,6 +463,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_info_0004
* @tc.name testFeatureSupported
* @tc.desc Test FeatureSupported api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -469,6 +480,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Conn_Info_0001
* @tc.name SUB_Communication_WiFi_Sta_Conn_Info_0001
* @tc.author wudangping wwx1075776
* @tc.desc Test reconnect wifi
*/
it
(
'
SUB_Communication_WiFi_Sta_Conn_Info_0001
'
,
0
,
function
()
{
...
...
@@ -514,6 +526,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number conn_Config_0002
* @tc.name SUB_Communication_WiFi_Sta_Conn_Info_0002
* @tc.author wudangping wwx1075776
* @tc.desc Test getLinkedInfo information
*/
it
(
'
SUB_Communication_WiFi_Sta_Conn_Info_0001
'
,
0
,
async
function
(
done
)
{
...
...
@@ -559,6 +572,7 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number Conn_Info_0003
* @tc.name SUB_Communication_WiFi_Sta_Conn_Info_0003
* @tc.author wudangping wwx1075776
* @tc.desc Test get IpInfo information
*/
it
(
'
SUB_Communication_WiFi_Sta_Conn_Info_0002
'
,
0
,
function
()
{
...
...
@@ -600,6 +614,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_ON_0001
* @tc.name testwifiStateChangeOn
* @tc.desc Test wifiStateChangeOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -622,6 +637,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_Off_0002
* @tc.name testwifiStateChangeOff
* @tc.desc Test wifiStateChangeOff api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -644,6 +660,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_ON_0003
* @tc.name testwifiConnectionChnageOn
* @tc.desc Test wifiConnectionChnageOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -666,6 +683,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_Off_0004
* @tc.name testwifiConnectionChangeOff
* @tc.desc Test wifiConnectionChangeOff api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -688,6 +706,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_ON_0005
* @tc.name testwifiScanStateChangeOn
* @tc.desc Test wifiwifiScanStateChangeOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -710,6 +729,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_Off_0006
* @tc.name testwifiScanStateChangeOff
* @tc.desc Test wifiScanStateChangeOff api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -732,6 +752,7 @@ describe('ACTS_WifiTest', function() {
* @tc.number SUB_Communication_WiFi_Sta_ON_0007
* @tc.name testwifiRssiChangeOn
* @tc.desc Test wifiRssiChangeOn api.
* @tc.author wudangping wwx1075776
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
@@ -753,7 +774,8 @@ describe('ACTS_WifiTest', function() {
/**
* @tc.number SUB_Communication_WiFi_Sta_Off_0008
* @tc.name testwifiRssiChangeOff
* @tc.desc Test wifiRssiChange api.
* @tc.desc Test wifiRssiChange api
* @tc.author wudangping wwx1075776.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 3
...
...
location/geolocation_standard/src/main/js/default/test/Geolocation.test.js
浏览文件 @
ce459836
...
...
@@ -17,6 +17,12 @@ import geolocation from '@ohos.geolocation';
import
{
LocationEventListener
}
from
'
@ohos.geolocation
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
LocationRequestScenario
=
{
UNSET
:
0x300
,
NAVIGATION
:
0x301
,
TRAJECTORY_TRACKING
:
0x302
,
CAR_HAILING
:
0x303
,
DAILY_LIFE_SERIVICE
:
0x304
,
NO_POWER
:
0x305
}
var
LocationRequestPriority
=
{
UNSET
:
0x200
,
ACCURACY
:
0x201
,
LOW_POWER
:
0x202
,
FIRST_FIX
:
0x203
}
describe
(
'
geolocationTest
'
,
function
()
{
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll called
'
)
...
...
@@ -33,7 +39,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_ENABLE_LOCATION_PROMISE_0
001
* @tc.number
geolocation_enableLocation_promise_test_
001
* @tc.name testenableLocation promise
* @tc.desc Test enableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -56,7 +62,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_IS_LOCATION_ENABLED_PROMISE_0
001
* @tc.number
geolocation_isLocationEnabled_promise_test_
001
* @tc.name testisLocationEnabled promise
* @tc.desc Test isLocationEnabled api .
* @tc.author wangsilu wwx1075324
...
...
@@ -88,7 +94,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_GET_ADDR_FROM_LOCATION_NAME_CALLBACK_0
001
* @tc.number
geolocation_getAddressesFromLocationName_callback_test_
001
* @tc.name testgetAddressesFromLocationName callback
* @tc.desc Test getAddressesFromLocationName api .
* @tc.author wangsilu wwx1075324
...
...
@@ -109,7 +115,8 @@ describe('geolocationTest', function () {
console
.
info
(
'
LBS getAddressesFromLocationName callback test start ...
'
);
var
geocodeRequest
=
{
"
description
"
:
"
上海市浦东新区金穗路1800号
"
,
"
maxItems
"
:
1
,
"
locale
"
:
"
zh
"
};
"
maxItems
"
:
1
,
"
locale
"
:
"
zh
"
,
minLatitude
:
""
,
minLongitude
:
""
,
maxLatitude
:
""
,
maxLongitude
:
""
};
geolocation
.
getAddressesFromLocationName
(
geocodeRequest
,
(
err
,
data
)
=>
{
if
(
err
)
{
...
...
@@ -150,7 +157,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_GET_ADDR_FROM_LOCATION_CALLBACK_0
001
* @tc.number
geolocation_getAddressesFromLocation_callback_test_
001
* @tc.name testgetAddressesFromLocation callback
* @tc.desc Test getAddressesFromLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -205,7 +212,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_IS_GEOSERVICE_AVAIL_PROMISE_0
001
* @tc.number
geolocation_isGeoServiceAvailable_promise_test_
001
* @tc.name testisGeoServiceAvailable promise
* @tc.desc Test isGeoServiceAvailable api .
* @tc.author wangsilu wwx1075324
...
...
@@ -237,7 +244,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_IS_LOCATION_ENABLED_CALLBACK_0
001
* @tc.number
geolocation_isLocationEnabled_callback_test_
001
* @tc.name testisLocationEnabled callback
* @tc.desc Test isLocationEnabled api .
* @tc.author wangsilu wwx1075324
...
...
@@ -280,7 +287,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_GET_ADDR_FROM_LOCATION_NAME_PROMISE_0
001
* @tc.number
geolocation_getAddressesFromLocationName_promise_test_
001
* @tc.name testgetAddressesFromLocationName promise
* @tc.desc Test getAddressesFromLocationName api .
* @tc.author wangsilu wwx1075324
...
...
@@ -314,7 +321,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_REQUEST_ENABLE_LOCATION_CALLBACK_0
001
* @tc.number
geolocation_requestEnableLocation_callback_test_
001
* @tc.name testrequestEnableLocation callback
* @tc.desc Test requestEnableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -338,7 +345,7 @@ describe('geolocationTest', function () {
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_REQUEST_ENABLE_LOCATION_PROMISE_0
001
* @tc.number
geolocation_requestEnableLocation_promise_test_
001
* @tc.name testrequestEnableLocation promise
* @tc.desc Test requestEnableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -360,7 +367,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_ENABLE_LOCATION_CALLBACK_0
001
* @tc.number
geolocation_enableLocation_callback_test_
001
* @tc.name testEnableLocation callback
* @tc.desc Test enableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -383,7 +390,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_DISABLE_LOCATION_CALLBACK_0
001
* @tc.number
geolocation_disableLocation_callback_test_
001
* @tc.name testdisableLocation callback
* @tc.desc Test disableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -405,7 +412,7 @@ describe('geolocationTest', function () {
});
})
/** @tc.number
SUB_LOCATION_geocode_DEVICE_JS_DISABLE_LOCATION_PROMISE_0
001
/** @tc.number
geolocation_disableLocation_promise_test_
001
* @tc.name testdisableLocation promise
* @tc.desc Test disableLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -424,7 +431,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_GET_ADDR_FROM_LOCATION_PROMISE_0
001
* @tc.number
geolocation_getAddressesFromLocation_promise_test_
001
* @tc.name testgetAddressesFromLocation promise
* @tc.desc Test getAddressesFromLocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -448,7 +455,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_GET_CURRENT_LOCATION_CALLBACK_0
001
* @tc.number
geolocation_GetCurrentlocation_callback_test_
001
* @tc.name testGetCurrentlocation callback
* @tc.desc Test GetCurrentlocation api .
* @tc.author wangsilu wwx1075324
...
...
@@ -468,7 +475,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_IS_GEOSERVICE_AVAIL_CALLBACK_0
001
* @tc.number
geolocation_isGeoServiceAvailable_callback_test_
001
* @tc.name testisGeoServiceAvailable callback
* @tc.desc Test isGeoServiceAvailable api .
* @tc.author wangsilu wwx1075324
...
...
@@ -509,7 +516,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_LOCATION_CHANGE_ON_0
002
* @tc.number
geolocation_locationChange_On_test_
002
* @tc.name testlocationChangeOn promise
* @tc.desc Test locationChangeOn api .
* @tc.author wangsilu wwx1075324
...
...
@@ -525,8 +532,18 @@ describe('geolocationTest', function () {
await
locationEventListener
.
on
(
'
locationChange
'
,
requestInfo
,
result
=>
{
console
.
info
(
"
onLocationChange callback, result:
"
+
JSON
.
stringify
(
result
));
expect
(
true
).
assertEqual
(
result
!=
null
);
console
.
info
(
"
[lbs_js] onLocationChange latitude:
"
+
result
.
latitude
);
console
.
info
(
"
[lbs_js] onLocationChange longitude:
"
+
result
.
longitude
);
console
.
info
(
"
[lbs_js] onLocationChange altitude:
"
+
result
.
altitude
);
console
.
info
(
"
[lbs_js] onLocationChange accuracy:
"
+
result
.
accuracy
);
console
.
info
(
"
[lbs_js] onLocationChange speed:
"
+
result
.
speed
);
console
.
info
(
"
[lbs_js] onLocationChange timeStamp:
"
+
result
.
timeStamp
);
console
.
info
(
"
[lbs_js] onLocationChange direction:
"
+
result
.
direction
);
console
.
info
(
"
[lbs_js] onLocationChange additions:
"
+
result
.
additions
);
console
.
info
(
"
[lbs_js] onLocationChange additionSize:
"
+
result
.
additionSize
);
done
();
});
console
.
info
(
'
LBS enableLocation callback test start ...
'
);
geolocation
.
enableLocation
((
err
,
data
)
=>
{
if
(
err
)
{
...
...
@@ -542,7 +559,7 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_ON_LOCATION_SERVICE_STATE_0
001
* @tc.number
geolocation_OnLocationServiceState_test_
001
* @tc.name testOnLocationServiceState
* @tc.desc Test OnLocationServiceState api .
* @tc.author wangsilu wwx1075324
...
...
@@ -572,8 +589,8 @@ describe('geolocationTest', function () {
})
/**
* @tc.number
SUB_LOCATION_geocode_DEVICE_JS_ON_LOCATION_SERVICE_STATE_0
001
* @tc.name test
On
LocationServiceState
* @tc.number
geolocation_offLocationServiceState_test_
001
* @tc.name test
off
LocationServiceState
* @tc.desc Test offLocationServiceState api .
* @tc.author wangsilu wwx1075324
* @tc.size MEDIUM
...
...
@@ -621,7 +638,30 @@ describe('geolocationTest', function () {
})
/**
* @tc.number SUB_LOCATION_geocode_DEVICE_JS_LOCATION_SERVICE_OFF_0002
* @tc.number geolocation_getLastLocation_callback__test_001
* @tc.name testgetLastLocation callback
* @tc.desc Test getLastLocation api .
* @tc.author wangsilu wwx1075324
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
geolocation_getLastLocation_callback__test_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
LBS getLastLocation test start ...
'
);
geolocation
.
getLastLocation
((
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
[lbs_js] getLastLocation callback err is :
'
+
err
);
}
else
{
console
.
info
(
"
[lbs_js] getLastLocation callback data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertTrue
(
data
!=
null
);
console
.
info
(
"
[lbs_js] getLastLocation callback exit .
"
);
}
});
done
();
})
/**
* @tc.number geolocation_locationChange_Off_test_002
* @tc.name testlocationChangeOff promise
* @tc.desc Test locationChangeoff api .
* @tc.author wangsilu wwx1075324
...
...
@@ -671,5 +711,89 @@ describe('geolocationTest', function () {
done
();
});
})
/**
* @tc.number geolocation_getLastLocation_promise__test_001
* @tc.name testgetLastLocation promise
* @tc.desc Test getLastLocation api .
* @tc.author wangsilu wwx1075324
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
geolocation_getLastLocation_promise__test_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
LBS getLastLocation test start ...
'
);
geolocation
.
getLastLocation
().
then
((
result
)
=>
{
console
.
info
(
"
[lbs_js] getLastLocation promise data:
"
+
JSON
.
stringify
(
result
));
expect
(
data
).
assertTrue
(
data
!=
null
);
console
.
info
(
"
[lbs_js] getLastLocation promise exit .
"
);
done
();
}).
catch
(
error
=>
{
console
.
info
(
'
[lbs_js] getLastLocation promise err is :
'
+
err
);
expect
().
assertFail
();
done
();
});
})
/**
* @tc.number geolocation_isLocationPrivacyConfirmed_promise_test_001
* @tc.name Test setLocationPrivacyConfirmStatus promise
* @tc.desc Test setLocationPrivacyConfirmStatus api .
* @tc.author wangsilu wwx1075324
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
geolocation_setLocationPrivacyConfirmStatus_promise_test_001
'
,
0
,
async
function
(
done
)
{
let
reqType
=
1
;
let
value
=
true
;
let
type
=
"
STARTUP
"
;
if
(
type
==
"
OTHERS
"
){
reqType
=
0
;
}
if
(
type
==
"
STARTUP
"
){
reqType
=
1
;
}
if
(
type
==
"
CORE_LOCATION
"
){
reqType
=
2
;
}
console
.
info
(
'
LBS setLocationPrivacyConfirmStatus promise test start ...
'
)
geolocation
.
setLocationPrivacyConfirmStatus
(
reqType
,
value
).
then
((
resp
)
=>
{
console
.
log
(
"
[lbs_js] setLocationPrivacyConfirmStatus current type is
"
+
JSON
.
stringify
(
resp
))
expect
(
resp
).
assertTrue
();
done
();
})
})
/**
* @tc.number geolocation_isLocationPrivacyConfirmed_promise_test_001
* @tc.name Test isLocationPrivacyConfirmed promise
* @tc.desc Test isLocationPrivacyConfirmed api .
* @tc.author wangsilu wwx1075324
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
geolocation_isLocationPrivacyConfirmed_promise_test_001
'
,
0
,
async
function
(
done
)
{
let
reqType
=
1
;
let
value
=
true
;
console
.
info
(
'
LBS setLocationPrivacyConfirmStatus promise test start ...
'
)
geolocation
.
setLocationPrivacyConfirmStatus
(
reqType
,
value
).
then
((
resp
)
=>
{
console
.
log
(
"
[lbs_js] setLocationPrivacyConfirmStatus current type is
"
+
JSON
.
stringify
(
resp
))
expect
(
resp
).
assertTrue
();
})
console
.
info
(
'
LBS isLocationPrivacyConfirmed promise test start ...
'
);
geolocation
.
isLocationPrivacyConfirmed
(
reqType
).
then
(
resp
=>
{
console
.
log
(
"
[lbs_js] isLocationPrivacyConfirmed current type is
"
+
JSON
.
stringify
(
resp
))
expect
(
resp
).
assertTrue
();
console
.
info
(
"
[lbs_js] isLocationPrivacyConfirmed callback exit .
"
);
done
();
})
})
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录