Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c99b1f01
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看板
未验证
提交
c99b1f01
编写于
7月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9568 【XTS】【LOCATION】LBS问题优化
Merge pull request !9568 from 权力/myfeature3
上级
f8c2e980
93fd23f1
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
780 addition
and
710 deletion
+780
-710
location/geolocation_standard/src/main/js/test/GeocoderMTest.test.js
...olocation_standard/src/main/js/test/GeocoderMTest.test.js
+780
-710
未找到文件。
location/geolocation_standard/src/main/js/test/GeocoderMTest.test.js
浏览文件 @
c99b1f01
...
...
@@ -113,11 +113,11 @@ export default function geolocationTest_geo5() {
try
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
console
.
info
(
'
[lbs_js] isGeocoderAvailable result:
'
+
JSON
.
stringify
(
geocoder1
));
expect
(
geocoder1
).
assertTrue
(
);
expect
(
true
).
assertEqual
(
JSON
.
stringify
(
geocoder1
)
!=
null
);
}
catch
(
error
)
{
console
.
info
(
'
[lbs_js] isGeocoderAvailable err:
'
+
JSON
.
stringify
(
error
));
console
.
info
(
'
[lbs_js] not support now
'
);
expect
(
true
).
assertFalse
(
);
expect
(
error
.
code
).
assertEqual
(
"
801
"
);
}
});
...
...
@@ -130,10 +130,11 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2000
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
reverseGeocodeRequest
=
{
"
latitude
"
:
31.265496
,
"
longitude
"
:
121.62771
,
"
maxItems
"
:
1
};
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
,
(
err
,
data
)
=>
{
try
{
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
[lbs_js] getAddressesFromLocation4 callback err is:
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
3301300
);
...
...
@@ -141,13 +142,15 @@ export default function geolocationTest_geo5() {
console
.
info
(
"
[lbs_js] getAddressesFromLocation4 callback data is:
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
((
JSON
.
stringify
(
data
))
!=
null
);
}
}
catch
(
error
)
{
});
}
catch
(
error
)
{
console
.
info
(
"
[lbs_js] getAddressesFromLocation4 callback try error:
"
+
error
);
expect
(
true
).
assertFalse
();
}
});
await
sleep
(
2000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -161,6 +164,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2100
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
let
reverseGeocodeRequest
=
{
"
latitude
"
:
31.265496
,
"
longitude
"
:
121.62771
,
"
maxItems
"
:
5
};
await
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
).
then
((
data
)
=>
{
...
...
@@ -197,6 +202,9 @@ export default function geolocationTest_geo5() {
expect
(
true
).
assertFalse
();
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -209,6 +217,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2200
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
let
reverseGeocodeRequest
=
{
"
latitude
"
:
31.265496
,
"
longitude
"
:
121.62771
,
"
maxItems
"
:
5
};
await
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
).
then
((
data
)
=>
{
...
...
@@ -224,6 +234,9 @@ export default function geolocationTest_geo5() {
expect
(
true
).
assertFalse
();
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -236,6 +249,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2300
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
reverseGeocodeRequest1
=
{
"
latitude
"
:
90
,
"
longitude
"
:
121.62771
,
"
maxItems
"
:
1
};
try
{
await
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest1
).
then
((
data
)
=>
{
...
...
@@ -291,6 +306,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -303,6 +321,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2400
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
reverseGeocodeRequest
=
{
"
latitude
"
:
31.265496
,
"
longitude
"
:
180
,
"
maxItems
"
:
1
};
try
{
await
geolocationm
.
getAddressesFromLocation
(
reverseGeocodeRequest
).
then
((
data
)
=>
{
...
...
@@ -329,7 +349,6 @@ export default function geolocationTest_geo5() {
});
}
catch
(
error
)
{
console
.
info
(
"
[lbs_js] getAddressesFromLocation message2.
"
+
JSON
.
stringify
(
error
));
// expect(true).assertEqual((JSON.stringify(error.message)) != null);
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
...
...
@@ -359,10 +378,12 @@ export default function geolocationTest_geo5() {
});
}
catch
(
error
)
{
console
.
info
(
"
[lbs_js] getAddressesFromLocation message4.
"
+
JSON
.
stringify
(
error
));
// expect(true).assertEqual((JSON.stringify(error.message)) != null);
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -376,13 +397,15 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2500
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
let
geocodeRequest
=
{
"
description
"
:
"
上海市浦东新区金穗路1800号
"
,
"
maxItems
"
:
1
,
"
locale
"
:
"
zh
"
,
};
geolocationm
.
getAddressesFromLocationName
(
geocodeRequest
,
(
err
,
data
)
=>
{
try
{
if
(
err
)
{
switch
(
err
)
{
case
100
:
...
...
@@ -419,14 +442,16 @@ export default function geolocationTest_geo5() {
else
{
console
.
info
(
"
[lbs_js] getAddressesFromLocationName08 callback data is:
"
+
JSON
.
stringify
(
data
));
}
}
catch
(
error
){
done
();
});
}
catch
(
error
)
{
console
.
info
(
"
[lbs_js] getAddressesFromLocationName08 message.
"
+
JSON
.
stringify
(
error
.
message
));
expect
(
true
).
assertFalse
();
}
done
();
});
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -439,6 +464,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2600
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest
=
{
"
description
"
:
"
上海市浦东新区金穗路1800号
"
,
"
maxItems
"
:
3
};
try
{
await
geolocationm
.
getAddressesFromLocationName
(
geocodeRequest
).
then
((
result
)
=>
{
...
...
@@ -454,6 +481,9 @@ export default function geolocationTest_geo5() {
expect
(
true
).
assertFalse
();
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -466,6 +496,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2700
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
let
geocodeRequest
=
{
"
description
"
:
"
上海市浦东新区金穗路1800号
"
,
"
maxItems
"
:
5
};
await
geolocationm
.
getAddressesFromLocationName
(
geocodeRequest
).
then
((
result
)
=>
{
...
...
@@ -481,6 +513,9 @@ export default function geolocationTest_geo5() {
expect
(
true
).
assertFalse
();
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -494,6 +529,8 @@ export default function geolocationTest_geo5() {
需要实测!!!!
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2800
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
let
geocodeRequest
=
{
"
description
"
:
""
,
"
maxItems
"
:
1
};
await
geolocationm
.
getAddressesFromLocationName
(
geocodeRequest
).
then
((
result
)
=>
{
...
...
@@ -522,6 +559,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -534,6 +574,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_2900
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest
=
{
"
description
"
:
"
上海金穗路1800号
"
,
"
maxItems
"
:
1
,
...
...
@@ -556,6 +598,9 @@ export default function geolocationTest_geo5() {
expect
(
true
).
assertFalse
();
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -569,6 +614,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_3000
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest
=
{
"
description
"
:
""
,
"
maxItems
"
:
1
,
...
...
@@ -612,6 +659,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -625,6 +675,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_3100
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest
=
{
"
description
"
:
"
北京天安门
"
,
"
maxItems
"
:
1
,
...
...
@@ -646,6 +698,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -667,6 +722,8 @@ export default function geolocationTest_geo5() {
"
maxLatitude
"
:
39.85
,
"
maxLongitude
"
:
116.35
};
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
try
{
await
geolocationm
.
getAddressesFromLocationName
(
geocodeRequest
).
then
((
result
)
=>
{
console
.
info
(
"
[lbs_js] getAddressesFromLocationName32 promise data is:
"
+
JSON
.
stringify
(
result
));
...
...
@@ -681,6 +738,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -693,6 +753,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_3300
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest1
=
{
"
description
"
:
"
上海金穗路1800号
"
,
"
maxItems
"
:
1
,
...
...
@@ -866,6 +928,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
@@ -878,6 +943,8 @@ export default function geolocationTest_geo5() {
* @tc.level Level 2
*/
it
(
'
SUB_HSS_LocationSystem_Geo_3400
'
,
0
,
async
function
(
done
)
{
let
geocoder1
=
geolocationm
.
isGeocoderAvailable
();
if
(
geocoder1
)
{
let
geocodeRequest1
=
{
"
description
"
:
"
北京天安门
"
,
"
maxItems
"
:
1
,
...
...
@@ -1048,6 +1115,9 @@ export default function geolocationTest_geo5() {
expect
(
error
.
code
).
assertEqual
(
"
401
"
);
}
await
sleep
(
1000
);
}
else
{
console
.
info
(
"
[lbs_js] The geocoding service is unavailable.
"
);
}
done
();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录