Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
84da7812
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看板
未验证
提交
84da7812
编写于
8月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5295 【location】脚本优化
Merge pull request !5295 from 权力/myfeature
上级
dacbd3aa
8bef1dc0
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
509 addition
and
380 deletion
+509
-380
location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js
...on_standard/src/main/js/default/test/GeocoderTest.test.js
+328
-221
location/geolocation_standard/src/main/js/default/test/GetCountryCode.test.js
..._standard/src/main/js/default/test/GetCountryCode.test.js
+6
-6
location/geolocation_standard/src/main/js/default/test/LocationTest.test.js
...on_standard/src/main/js/default/test/LocationTest.test.js
+166
-138
location/geolocation_standard/src/main/js/default/test/SystemLocation.test.js
..._standard/src/main/js/default/test/SystemLocation.test.js
+9
-15
未找到文件。
location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js
浏览文件 @
84da7812
此差异已折叠。
点击以展开。
location/geolocation_standard/src/main/js/default/test/GetCountryCode.test.js
浏览文件 @
84da7812
...
...
@@ -90,13 +90,13 @@ describe('geolocationTest_4', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
001
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
100
* @tc.name Test getCountryCode
* @tc.desc Obtaining Country Code Information
* @tc.type Function
* @tc.level since 9
*/
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
001
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
100
'
,
0
,
async
function
(
done
)
{
await
geolocation
.
getCountryCode
().
then
((
result
)
=>
{
console
.
info
(
"
[lbs_js] getCountryCode promise result:
"
+
JSON
.
stringify
(
result
));
console
.
info
(
"
[lbs_js] country :
"
+
result
.
country
);
...
...
@@ -113,13 +113,13 @@ describe('geolocationTest_4', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
002
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
200
* @tc.name Test getCountryCode
* @tc.desc Obtaining Country Code Information
* @tc.type Function
* @tc.level since 9
*/
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
200
'
,
0
,
async
function
(
done
)
{
function
getCountryCodeCallback
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
geolocation
.
getCountryCode
((
err
)
=>
{
...
...
@@ -137,13 +137,13 @@ describe('geolocationTest_4', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
003
* @tc.number SUB_HSS_LocationSystem_CountryCode_0
300
* @tc.name getCountryCode_on_off
* @tc.desc The interception country code is changed.
* @tc.type Function
* @tc.level since 9
*/
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
003
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_CountryCode_0
300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
[lbs_js]countryCodeChange
"
);
geolocation
.
on
(
'
countryCodeChange
'
,
function
(
data
)
{
console
.
info
(
'
[lbs_js] countryCodeChange
'
+
JSON
.
stringify
(
data
)
);
...
...
location/geolocation_standard/src/main/js/default/test/LocationTest.test.js
浏览文件 @
84da7812
此差异已折叠。
点击以展开。
location/geolocation_standard/src/main/js/default/test/SystemLocation.test.js
浏览文件 @
84da7812
...
...
@@ -81,16 +81,16 @@ describe('geolocationTest_geo2', function () {
})
afterEach
(
function
()
{
})
/**
* @tc.number SUB_HSS_LocationSystem_systemapi_0
001
* @tc.number SUB_HSS_LocationSystem_systemapi_0
100
* @tc.name Test getLocation
* @tc.desc Obtains the geographical location of a device..
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_systemapi_0
001
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_systemapi_0
100
'
,
0
,
async
function
(
done
)
{
geolocations
.
getLocation
({
timeout
:
30000
,
coordType
:
'
wgs84
'
,
...
...
@@ -127,14 +127,14 @@ describe('geolocationTest_geo2', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_systemapi_0
002
* @tc.number SUB_HSS_LocationSystem_systemapi_0
200
* @tc.name Test subscribe and unsubscribe
* @tc.desc Test subscribe api .
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_systemapi_0
002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_systemapi_0
200
'
,
0
,
async
function
(
done
)
{
geolocations
.
subscribe
({
coordType
:
'
wgs84
'
,
success
:
function
(
data
)
{
...
...
@@ -152,14 +152,14 @@ describe('geolocationTest_geo2', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_systemapi_0
003
* @tc.number SUB_HSS_LocationSystem_systemapi_0
300
* @tc.name test getLocationType
* @tc.desc Subscribing to geographical location information .
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_systemapi_0
003
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_HSS_LocationSystem_systemapi_0
300
'
,
0
,
async
function
(
done
)
{
geolocations
.
getLocationType
({
success
:
function
(
data
)
{
console
.
log
(
'
success get location type:
'
+
JSON
.
stringify
(
data
));
...
...
@@ -178,14 +178,14 @@ describe('geolocationTest_geo2', function () {
})
/**
* @tc.number SUB_HSS_LocationSystem_systemapi_0
004
* @tc.number SUB_HSS_LocationSystem_systemapi_0
400
* @tc.name Test getSupportedCoordTypes
* @tc.desc Obtains the geographical location of a device..
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_systemapi_0
004
'
,
0
,
function
()
{
it
(
'
SUB_HSS_LocationSystem_systemapi_0
400
'
,
0
,
function
()
{
let
types
=
geolocations
.
getSupportedCoordTypes
();
console
.
info
(
'
[lbs_js] getSupportedCoordTypes result:
'
+
JSON
.
stringify
(
types
));
expect
(
true
).
assertEqual
(
types
.
length
!=
0
);
...
...
@@ -196,9 +196,3 @@ describe('geolocationTest_geo2', function () {
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录