提交 8bef1dc0 编写于 作者: Q quanli

location update~

Signed-off-by: Nquanli <quanli1@huawei.com>
上级 ac95ec71
...@@ -101,14 +101,14 @@ describe('geolocationTest_geo1', function () { ...@@ -101,14 +101,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0001 * @tc.number SUB_HSS_LocationSystem_Geo_0100
* @tc.name testIsGeoServiceAvailable * @tc.name testIsGeoServiceAvailable
* @tc.desc Check whether address resolution and reverse address resolution are supported. * @tc.desc Check whether address resolution and reverse address resolution are supported.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0100', 0, async function (done) {
geolocation.isGeoServiceAvailable(async (err, data) => { geolocation.isGeoServiceAvailable(async (err, data) => {
if (err) { if (err) {
console.info('[lbs_js] getGeoServiceState err is : ' + JSON.stringify(err)); console.info('[lbs_js] getGeoServiceState err is : ' + JSON.stringify(err));
...@@ -124,14 +124,14 @@ describe('geolocationTest_geo1', function () { ...@@ -124,14 +124,14 @@ describe('geolocationTest_geo1', function () {
}); });
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0002 * @tc.number SUB_HSS_LocationSystem_Geo_0200
* @tc.name TestisGeoServiceAvailable * @tc.name TestisGeoServiceAvailable
* @tc.desc Check whether address resolution and reverse address resolution are supported. * @tc.desc Check whether address resolution and reverse address resolution are supported.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0200', 0, async function (done) {
await geolocation.isGeoServiceAvailable().then((result) => { await geolocation.isGeoServiceAvailable().then((result) => {
console.info('[lbs_js] isGeoServiceAvailable1 promise result: ' + JSON.stringify(result)); console.info('[lbs_js] isGeoServiceAvailable1 promise result: ' + JSON.stringify(result));
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
...@@ -144,14 +144,14 @@ describe('geolocationTest_geo1', function () { ...@@ -144,14 +144,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0003 * @tc.number SUB_HSS_LocationSystem_Geo_0300
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Address Resolution Test. * @tc.desc Address Resolution Test.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0300', 0, async function (done) {
let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 1, "locale": "zh" }; let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 1, "locale": "zh" };
let promise = new Promise((resolve, reject) => { let promise = new Promise((resolve, reject) => {
geolocation.getAddressesFromLocation(reverseGeocodeRequest, (err, data) => { geolocation.getAddressesFromLocation(reverseGeocodeRequest, (err, data) => {
...@@ -168,14 +168,14 @@ describe('geolocationTest_geo1', function () { ...@@ -168,14 +168,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0004 * @tc.number SUB_HSS_LocationSystem_Geo_0400
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Address Resolution Test. * @tc.desc Address Resolution Test.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0004', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0400', 0, async function (done) {
let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 1 }; let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 1 };
await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => { await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => {
console.info('[lbs_js] getAddressesFromLocation04 promise: ' + JSON.stringify(data)); console.info('[lbs_js] getAddressesFromLocation04 promise: ' + JSON.stringify(data));
...@@ -199,14 +199,14 @@ describe('geolocationTest_geo1', function () { ...@@ -199,14 +199,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0005 * @tc.number SUB_HSS_LocationSystem_Geo_0500
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Obtaining Multiple Addresses Using the Address Resolution Function. * @tc.desc Obtaining Multiple Addresses Using the Address Resolution Function.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0500', 0, async function (done) {
let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 5 }; let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 121.62771, "maxItems": 5 };
await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => { await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => {
console.info('[lbs_js] getAddressesFromLocation05 promise: ' + JSON.stringify(data)); console.info('[lbs_js] getAddressesFromLocation05 promise: ' + JSON.stringify(data));
...@@ -221,14 +221,14 @@ describe('geolocationTest_geo1', function () { ...@@ -221,14 +221,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0006 * @tc.number SUB_HSS_LocationSystem_Geo_0600
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Input parameter boundary test of the address resolution function * @tc.desc Input parameter boundary test of the address resolution function
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0006', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0600', 0, async function (done) {
let reverseGeocodeRequest1 = { "latitude": 90, "longitude": 121.62771, "maxItems": 1 }; let reverseGeocodeRequest1 = { "latitude": 90, "longitude": 121.62771, "maxItems": 1 };
await geolocation.getAddressesFromLocation(reverseGeocodeRequest1).then((data) => { await geolocation.getAddressesFromLocation(reverseGeocodeRequest1).then((data) => {
console.info('[lbs_js] getAddressesFromLocation0601 promise: ' + JSON.stringify(data)); console.info('[lbs_js] getAddressesFromLocation0601 promise: ' + JSON.stringify(data));
...@@ -267,14 +267,14 @@ describe('geolocationTest_geo1', function () { ...@@ -267,14 +267,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0007 * @tc.number SUB_HSS_LocationSystem_Geo_0700
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Input parameter boundary test of the address resolution function * @tc.desc Input parameter boundary test of the address resolution function
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0007', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0700', 0, async function (done) {
let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 180, "maxItems": 1 }; let reverseGeocodeRequest = { "latitude": 31.265496, "longitude": 180, "maxItems": 1 };
await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => { await geolocation.getAddressesFromLocation(reverseGeocodeRequest).then((data) => {
console.info('[lbs_js] getAddressesFromLocation0701 promise: ' + JSON.stringify(data)); console.info('[lbs_js] getAddressesFromLocation0701 promise: ' + JSON.stringify(data));
...@@ -313,14 +313,14 @@ describe('geolocationTest_geo1', function () { ...@@ -313,14 +313,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0008 * @tc.number SUB_HSS_LocationSystem_Geo_0800
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Reverse address resolution test. * @tc.desc Reverse address resolution test.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0008', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0800', 0, async function (done) {
let geocodeRequest = { let geocodeRequest = {
"description": "上海市浦东新区金穗路1800号", "description": "上海市浦东新区金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -330,6 +330,7 @@ describe('geolocationTest_geo1', function () { ...@@ -330,6 +330,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": "", "maxLatitude": "",
"maxLongitude": "" "maxLongitude": ""
}; };
try {
geolocation.getAddressesFromLocationName(geocodeRequest, (err, data) => { geolocation.getAddressesFromLocationName(geocodeRequest, (err, data) => {
if (err) { if (err) {
switch (err) { switch (err) {
...@@ -361,7 +362,7 @@ describe('geolocationTest_geo1', function () { ...@@ -361,7 +362,7 @@ describe('geolocationTest_geo1', function () {
console.info("QUERY_COUNTRY_CODE_ERROR: " + JSON.stringify(err)); console.info("QUERY_COUNTRY_CODE_ERROR: " + JSON.stringify(err));
break; break;
default: default:
console.info('[lbs_js] getAddressesFromLocationName callback err is : ' + JSON.stringify(err)); console.info('getAddressesFromLocationName callback err: ' + JSON.stringify(err));
} }
} else { } else {
console.info("[lbs_js] getAddressesFromLocationName08 callback data is: " + JSON.stringify(data)); console.info("[lbs_js] getAddressesFromLocationName08 callback data is: " + JSON.stringify(data));
...@@ -369,17 +370,22 @@ describe('geolocationTest_geo1', function () { ...@@ -369,17 +370,22 @@ describe('geolocationTest_geo1', function () {
} }
done(); done();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0009 * @tc.number SUB_HSS_LocationSystem_Geo_0900
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Reverse address resolution test. * @tc.desc Reverse address resolution test.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0009', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_0900', 0, async function (done) {
let geocodeRequest = { "description": "上海市浦东新区金穗路1800号", "maxItems": 1 }; let geocodeRequest = { "description": "上海市浦东新区金穗路1800号", "maxItems": 1 };
await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => {
console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result));
...@@ -392,14 +398,14 @@ describe('geolocationTest_geo1', function () { ...@@ -392,14 +398,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0010 * @tc.number SUB_HSS_LocationSystem_Geo_1000
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Obtaining Multiple Locations Using the Reverse Address Resolution Function. * @tc.desc Obtaining Multiple Locations Using the Reverse Address Resolution Function.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0010', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1000', 0, async function (done) {
let geocodeRequest = { "description": "上海市浦东新区金穗路1800号", "maxItems": 5 }; let geocodeRequest = { "description": "上海市浦东新区金穗路1800号", "maxItems": 5 };
await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => {
console.info("[lbs_js] getAddressesFromLocation m callback data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation m callback data is: " + JSON.stringify(result));
...@@ -413,14 +419,16 @@ describe('geolocationTest_geo1', function () { ...@@ -413,14 +419,16 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0011 * @tc.number SUB_HSS_LocationSystem_Geo_1100
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Invalid parameter input test for the reverse address resolution function. * @tc.desc Invalid parameter input test for the reverse address resolution function.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0011', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1100', 0, async function (done) {
try {
let geocodeRequest = { "description": "", "maxItems": 1 }; let geocodeRequest = { "description": "", "maxItems": 1 };
await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => {
console.info("[lbs_js] getAddressesFromLocation promise data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation promise data is: " + JSON.stringify(result));
...@@ -430,27 +438,35 @@ describe('geolocationTest_geo1', function () { ...@@ -430,27 +438,35 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest1 = { "description": null, "maxItems": 1 }; let geocodeRequest1 = { "description": null, "maxItems": 1 };
try {
await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => {
console.info("[lbs_js] getAddressesFromLocation promise data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(result.length == 0).assertTrue();
}).catch((error) => { }).catch((error) => {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
console.info('[lbs_js] not support now'); expect(true).assertEqual((JSON.stringify(error)) != null);
expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0012 * @tc.number SUB_HSS_LocationSystem_Geo_1200
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Test the reverse address resolution function in the specified range.. * @tc.desc Test the reverse address resolution function in the specified range..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0012', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1200', 0, async function (done) {
let geocodeRequest = { let geocodeRequest = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -471,7 +487,7 @@ describe('geolocationTest_geo1', function () { ...@@ -471,7 +487,7 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0013 * @tc.number SUB_HSS_LocationSystem_Geo_1300
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Invalid input parameter test for the reverse address resolution function in the specified range * @tc.desc Invalid input parameter test for the reverse address resolution function in the specified range
* -Invalid location name. * -Invalid location name.
...@@ -479,7 +495,7 @@ describe('geolocationTest_geo1', function () { ...@@ -479,7 +495,7 @@ describe('geolocationTest_geo1', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0013', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1300', 0, async function (done) {
let geocodeRequest = { let geocodeRequest = {
"description": "", "description": "",
"maxItems": 1, "maxItems": 1,
...@@ -488,6 +504,7 @@ describe('geolocationTest_geo1', function () { ...@@ -488,6 +504,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try {
await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest).then((result) => {
console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result));
expect(result.length == 0).assertTrue(); expect(result.length == 0).assertTrue();
...@@ -495,6 +512,10 @@ describe('geolocationTest_geo1', function () { ...@@ -495,6 +512,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest1 = { let geocodeRequest1 = {
"description": null, "description": null,
"maxItems": 1, "maxItems": 1,
...@@ -503,6 +524,7 @@ describe('geolocationTest_geo1', function () { ...@@ -503,6 +524,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try {
await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => {
console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result)); console.info("[lbs_js] getAddressesFromLocation callback data is: " + JSON.stringify(result));
expect(result.length == 0).assertTrue(); expect(result.length == 0).assertTrue();
...@@ -510,11 +532,15 @@ describe('geolocationTest_geo1', function () { ...@@ -510,11 +532,15 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0014 * @tc.number SUB_HSS_LocationSystem_Geo_1400
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Invalid input parameter test for the reverse address resolution function in the specified range * @tc.desc Invalid input parameter test for the reverse address resolution function in the specified range
* - the address is not in the range. * - the address is not in the range.
...@@ -522,7 +548,7 @@ describe('geolocationTest_geo1', function () { ...@@ -522,7 +548,7 @@ describe('geolocationTest_geo1', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0014', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1400', 0, async function (done) {
let geocodeRequest = { let geocodeRequest = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -543,7 +569,7 @@ describe('geolocationTest_geo1', function () { ...@@ -543,7 +569,7 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0015 * @tc.number SUB_HSS_LocationSystem_Geo_1500
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Invalid longitude and latitude entered for the reverse address resolution * @tc.desc Invalid longitude and latitude entered for the reverse address resolution
* function in the specified range. The longitude and latitude range boundary is inverted.. * function in the specified range. The longitude and latitude range boundary is inverted..
...@@ -551,7 +577,7 @@ describe('geolocationTest_geo1', function () { ...@@ -551,7 +577,7 @@ describe('geolocationTest_geo1', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0015', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1500', 0, async function (done) {
let geocodeRequest = { let geocodeRequest = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -572,14 +598,14 @@ describe('geolocationTest_geo1', function () { ...@@ -572,14 +598,14 @@ describe('geolocationTest_geo1', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0016 * @tc.number SUB_HSS_LocationSystem_Geo_1600
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Input parameter boundary test for the reverse address resolution function in a specified range. * @tc.desc Input parameter boundary test for the reverse address resolution function in a specified range.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0016', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1600', 0, async function (done) {
let geocodeRequest1 = { let geocodeRequest1 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -588,6 +614,7 @@ describe('geolocationTest_geo1', function () { ...@@ -588,6 +614,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise1: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise1: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -596,6 +623,10 @@ describe('geolocationTest_geo1', function () { ...@@ -596,6 +623,10 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest2 = { let geocodeRequest2 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -604,6 +635,7 @@ describe('geolocationTest_geo1', function () { ...@@ -604,6 +635,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest2).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest2).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise2: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise2: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -612,6 +644,10 @@ describe('geolocationTest_geo1', function () { ...@@ -612,6 +644,10 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest3 = { let geocodeRequest3 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -620,6 +656,7 @@ describe('geolocationTest_geo1', function () { ...@@ -620,6 +656,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest3).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest3).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise3: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise3: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) == null); expect(true).assertEqual((JSON.stringify(result)) == null);
...@@ -627,6 +664,10 @@ describe('geolocationTest_geo1', function () { ...@@ -627,6 +664,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest4 = { let geocodeRequest4 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -635,6 +676,7 @@ describe('geolocationTest_geo1', function () { ...@@ -635,6 +676,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 31.1537977881, "maxLatitude": 31.1537977881,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest4).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest4).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise4: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise4: " + JSON.stringify(result));
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
...@@ -643,6 +685,10 @@ describe('geolocationTest_geo1', function () { ...@@ -643,6 +685,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest5 = { let geocodeRequest5 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -651,6 +697,7 @@ describe('geolocationTest_geo1', function () { ...@@ -651,6 +697,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": -90, "maxLatitude": -90,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try {
await geolocation.getAddressesFromLocationName(geocodeRequest5).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest5).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise5: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise5: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -659,6 +706,10 @@ describe('geolocationTest_geo1', function () { ...@@ -659,6 +706,10 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest6 = { let geocodeRequest6 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -667,6 +718,7 @@ describe('geolocationTest_geo1', function () { ...@@ -667,6 +718,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 90, "maxLatitude": 90,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest6).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest6).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise6: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise6: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -675,6 +727,10 @@ describe('geolocationTest_geo1', function () { ...@@ -675,6 +727,10 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest7 = { let geocodeRequest7 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -683,6 +739,7 @@ describe('geolocationTest_geo1', function () { ...@@ -683,6 +739,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": -90.1, "maxLatitude": -90.1,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest7).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest7).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise7: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise7: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) == null); expect(true).assertEqual((JSON.stringify(result)) == null);
...@@ -690,6 +747,10 @@ describe('geolocationTest_geo1', function () { ...@@ -690,6 +747,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest8 = { let geocodeRequest8 = {
"description": "上海金穗路1800号", "description": "上海金穗路1800号",
"maxItems": 1, "maxItems": 1,
...@@ -698,6 +759,7 @@ describe('geolocationTest_geo1', function () { ...@@ -698,6 +759,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 90.1, "maxLatitude": 90.1,
"maxLongitude": 121.8026736943 "maxLongitude": 121.8026736943
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest8).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest8).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise8: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise8: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) == null); expect(true).assertEqual((JSON.stringify(result)) == null);
...@@ -705,18 +767,22 @@ describe('geolocationTest_geo1', function () { ...@@ -705,18 +767,22 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(true).assertEqual((JSON.stringify(error)) != null); expect(true).assertEqual((JSON.stringify(error)) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
done() done()
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Geo_0017 * @tc.number SUB_HSS_LocationSystem_Geo_1700
* @tc.name TestgetAddressesFromLocation * @tc.name TestgetAddressesFromLocation
* @tc.desc Longitude input parameter boundary test for the reverse address resolution function in a specified range * @tc.desc Longitude input parameter boundary test for the reverse address resolution function in a specified range
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Geo_0017', 0, async function (done) { it('SUB_HSS_LocationSystem_Geo_1700', 0, async function (done) {
let geocodeRequest1 = { let geocodeRequest1 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -725,6 +791,7 @@ describe('geolocationTest_geo1', function () { ...@@ -725,6 +791,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 116.45 "maxLongitude": 116.45
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest1).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise1: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise1: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -733,6 +800,10 @@ describe('geolocationTest_geo1', function () { ...@@ -733,6 +800,10 @@ describe('geolocationTest_geo1', function () {
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
expect(true).assertEqual(JSON.stringify(error) != null); expect(true).assertEqual(JSON.stringify(error) != null);
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest2 = { let geocodeRequest2 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -741,6 +812,7 @@ describe('geolocationTest_geo1', function () { ...@@ -741,6 +812,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 116.45 "maxLongitude": 116.45
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest2).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest2).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise2: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise2: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -748,6 +820,10 @@ describe('geolocationTest_geo1', function () { ...@@ -748,6 +820,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest3 = { let geocodeRequest3 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -756,6 +832,7 @@ describe('geolocationTest_geo1', function () { ...@@ -756,6 +832,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 116.45 "maxLongitude": 116.45
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest3).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest3).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise3: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise3: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -763,6 +840,10 @@ describe('geolocationTest_geo1', function () { ...@@ -763,6 +840,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest4 = { let geocodeRequest4 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -771,6 +852,7 @@ describe('geolocationTest_geo1', function () { ...@@ -771,6 +852,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 116.45 "maxLongitude": 116.45
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest4).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest4).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise4: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise4: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -778,6 +860,10 @@ describe('geolocationTest_geo1', function () { ...@@ -778,6 +860,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest5 = { let geocodeRequest5 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -786,6 +872,7 @@ describe('geolocationTest_geo1', function () { ...@@ -786,6 +872,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": -180 "maxLongitude": -180
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest5).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest5).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise5: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise5: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -793,6 +880,10 @@ describe('geolocationTest_geo1', function () { ...@@ -793,6 +880,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest6 = { let geocodeRequest6 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -801,6 +892,7 @@ describe('geolocationTest_geo1', function () { ...@@ -801,6 +892,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 180 "maxLongitude": 180
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest6).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest6).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise6: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise6: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -808,6 +900,10 @@ describe('geolocationTest_geo1', function () { ...@@ -808,6 +900,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest7 = { let geocodeRequest7 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -816,6 +912,7 @@ describe('geolocationTest_geo1', function () { ...@@ -816,6 +912,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": -180.1 "maxLongitude": -180.1
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest7).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest7).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise7: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise7: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -823,6 +920,10 @@ describe('geolocationTest_geo1', function () { ...@@ -823,6 +920,10 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
let geocodeRequest8 = { let geocodeRequest8 = {
"description": "北京天安门", "description": "北京天安门",
"maxItems": 1, "maxItems": 1,
...@@ -831,6 +932,7 @@ describe('geolocationTest_geo1', function () { ...@@ -831,6 +932,7 @@ describe('geolocationTest_geo1', function () {
"maxLatitude": 39.95, "maxLatitude": 39.95,
"maxLongitude": 180.1 "maxLongitude": 180.1
}; };
try{
await geolocation.getAddressesFromLocationName(geocodeRequest8).then((result) => { await geolocation.getAddressesFromLocationName(geocodeRequest8).then((result) => {
console.info("[lbs_js]getAddressesFromLocation promise8: " + JSON.stringify(result)); console.info("[lbs_js]getAddressesFromLocation promise8: " + JSON.stringify(result));
expect(true).assertEqual((JSON.stringify(result)) != null); expect(true).assertEqual((JSON.stringify(result)) != null);
...@@ -838,6 +940,11 @@ describe('geolocationTest_geo1', function () { ...@@ -838,6 +940,11 @@ describe('geolocationTest_geo1', function () {
console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error)); console.info("[lbs_js] getAddressesFromLocationName promise then error." + JSON.stringify(error));
expect(error.length != 0).assertTrue(); expect(error.length != 0).assertTrue();
}); });
}catch(error){
console.info("[lbs_js] getAddressesFromLocationName message." + JSON.stringify(error.message));
expect(true).assertEqual((JSON.stringify(error.message)) != null);
}
done(); done();
}) })
}) })
...@@ -90,13 +90,13 @@ describe('geolocationTest_4', function () { ...@@ -90,13 +90,13 @@ describe('geolocationTest_4', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0001 * @tc.number SUB_HSS_LocationSystem_CountryCode_0100
* @tc.name Test getCountryCode * @tc.name Test getCountryCode
* @tc.desc Obtaining Country Code Information * @tc.desc Obtaining Country Code Information
* @tc.type Function * @tc.type Function
* @tc.level since 9 * @tc.level since 9
*/ */
it('SUB_HSS_LocationSystem_CountryCode_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_CountryCode_0100', 0, async function (done) {
await geolocation.getCountryCode().then((result) => { await geolocation.getCountryCode().then((result) => {
console.info("[lbs_js] getCountryCode promise result: " + JSON.stringify(result)); console.info("[lbs_js] getCountryCode promise result: " + JSON.stringify(result));
console.info("[lbs_js] country :" + result.country); console.info("[lbs_js] country :" + result.country);
...@@ -113,13 +113,13 @@ describe('geolocationTest_4', function () { ...@@ -113,13 +113,13 @@ describe('geolocationTest_4', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0002 * @tc.number SUB_HSS_LocationSystem_CountryCode_0200
* @tc.name Test getCountryCode * @tc.name Test getCountryCode
* @tc.desc Obtaining Country Code Information * @tc.desc Obtaining Country Code Information
* @tc.type Function * @tc.type Function
* @tc.level since 9 * @tc.level since 9
*/ */
it('SUB_HSS_LocationSystem_CountryCode_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_CountryCode_0200', 0, async function (done) {
function getCountryCodeCallback() { function getCountryCodeCallback() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
geolocation.getCountryCode((err) => { geolocation.getCountryCode((err) => {
...@@ -137,13 +137,13 @@ describe('geolocationTest_4', function () { ...@@ -137,13 +137,13 @@ describe('geolocationTest_4', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_CountryCode_0003 * @tc.number SUB_HSS_LocationSystem_CountryCode_0300
* @tc.name getCountryCode_on_off * @tc.name getCountryCode_on_off
* @tc.desc The interception country code is changed. * @tc.desc The interception country code is changed.
* @tc.type Function * @tc.type Function
* @tc.level since 9 * @tc.level since 9
*/ */
it('SUB_HSS_LocationSystem_CountryCode_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_CountryCode_0300', 0, async function (done) {
console.info("[lbs_js]countryCodeChange"); console.info("[lbs_js]countryCodeChange");
geolocation.on('countryCodeChange', function (data) { geolocation.on('countryCodeChange', function (data) {
console.info('[lbs_js] countryCodeChange' +JSON.stringify(data) ); console.info('[lbs_js] countryCodeChange' +JSON.stringify(data) );
......
...@@ -111,14 +111,14 @@ describe('geolocationTest_geo3', function () { ...@@ -111,14 +111,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number LocSwitch_0003 * @tc.number SUB_HSS_LocationSystem_LocSwitch_0300
* @tc.name SUB_HSS_LocationSystem_LocSwitch_0003 * @tc.name Test requestrequestEnableLocation api
* @tc.desc Test requestrequestEnableLocation api . * @tc.desc Enabling the Location Service Function for a Third-Party App - Callback
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocSwitch_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_LocSwitch_0300', 0, async function (done) {
geolocation.isLocationEnabled(async (err, data) => { geolocation.isLocationEnabled(async (err, data) => {
if (err) { if (err) {
console.info('[lbs_js] getLocationSwitchState callback err is : ' + JSON.stringify(err)); console.info('[lbs_js] getLocationSwitchState callback err is : ' + JSON.stringify(err));
...@@ -132,14 +132,14 @@ describe('geolocationTest_geo3', function () { ...@@ -132,14 +132,14 @@ describe('geolocationTest_geo3', function () {
}); });
/** /**
* @tc.number LocSwitch_0004 * @tc.number LocSwitch_0400
* @tc.name SUB_HSS_LocationSystem_LocSwitch_0004 * @tc.name Test requestrequestEnableLocation api.
* @tc.desc Test requestrequestEnableLocation api . * @tc.desc Enabling the Location Service Function for a Third-Party Application -Promise Mode
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocSwitch_0004', 0, async function (done) { it('SUB_HSS_LocationSystem_LocSwitch_0400', 0, async function (done) {
await geolocation.isLocationEnabled().then((result1) => { await geolocation.isLocationEnabled().then((result1) => {
console.info('[lbs_js] getLocationSwitchStateLocSwitch_0004 result: ' + JSON.stringify(result1)); console.info('[lbs_js] getLocationSwitchStateLocSwitch_0004 result: ' + JSON.stringify(result1));
expect(result1).assertTrue(); expect(result1).assertTrue();
...@@ -150,14 +150,14 @@ describe('geolocationTest_geo3', function () { ...@@ -150,14 +150,14 @@ describe('geolocationTest_geo3', function () {
}); });
/** /**
* @tc.number LocSwitch_0005 * @tc.number SUB_HSS_LocationSystem_LocSwitch_0500
* @tc.name SUB_HSS_LocationSystem_LocSwitch_0005 * @tc.name Test locationServiceState api .
* @tc.desc Test locationServiceState api . * @tc.desc Subscribe to the location service status change.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocSwitch_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_LocSwitch_0500', 0, async function (done) {
console.log('just for overwriting,locationServiceState test need system api '); console.log('just for overwriting,locationServiceState test need system api ');
var locationServiceState = (state) => { var locationServiceState = (state) => {
console.log('locationServiceState: state: ' + JSON.stringify(state)); console.log('locationServiceState: state: ' + JSON.stringify(state));
...@@ -168,14 +168,14 @@ describe('geolocationTest_geo3', function () { ...@@ -168,14 +168,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0001 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0100
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario and set the navigation scenario.. * @tc.desc Initiate a single location request in a specified scenario and set the navigation scenario..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0100', 0, async function (done) {
let currentLocationRequest = { "priority": 0x200, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x200, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 0 };
function getCurrentLocationCallback() { function getCurrentLocationCallback() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -193,24 +193,25 @@ describe('geolocationTest_geo3', function () { ...@@ -193,24 +193,25 @@ describe('geolocationTest_geo3', function () {
}) })
} }
console.info('getCurrentLocationCallback start'); console.info('getCurrentLocationCallback start');
await getCurrentLocationCallback().then(() => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('getCurrentLocationCallback resolve'); console.info("getCurrentLocation callback_0003, result: " + JSON.stringify(result));
}, () => { expect(true).assertEqual(result != null);
console.info('getCurrentLocationCallback reject'); }).catch(error => {
}); console.info('getCurrentLocation callback_0003:' + JSON.stringify(error));
console.info('getCurrentLocationCallback end'); expect(true).assertEqual(JSON.stringify(error) != null);
})
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0002 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0200
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario and set the navigation scenario.. * @tc.desc Initiate a single location request in a specified scenario and set the navigation scenario..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0200', 0, async function (done) {
let currentLocationRequest = { "priority": 0x203, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x203, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 0 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result ' + JSON.stringify(result));
...@@ -223,14 +224,14 @@ describe('geolocationTest_geo3', function () { ...@@ -223,14 +224,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0003 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0300
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario and set the track tracing scenario. * @tc.desc Initiate a single location request in a specified scenario and set the track tracing scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0300', 0, async function (done) {
let currentLocationRequest = { "priority": 0x200, "scenario": 0x302, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest = { "priority": 0x200, "scenario": 0x302, "timeoutMs": 1000, "maxAccuracy": 10 };
function getCurrentLocationCallback() { function getCurrentLocationCallback() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -248,24 +249,25 @@ describe('geolocationTest_geo3', function () { ...@@ -248,24 +249,25 @@ describe('geolocationTest_geo3', function () {
}) })
} }
console.info('getCurrentLocationCallback start'); console.info('getCurrentLocationCallback start');
await getCurrentLocationCallback().then(() => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('getCurrentLocationCallback resolve'); console.info("getCurrentLocation callback_0003, result: " + JSON.stringify(result));
}, () => { expect(true).assertEqual(result != null);
console.info('getCurrentLocationCallback reject'); }).catch(error => {
}); console.info('getCurrentLocation callback_0003:' + JSON.stringify(error));
console.info('getCurrentLocationCallback end'); expect(true).assertEqual(JSON.stringify(error) != null);
})
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0004 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0400
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario and set a car-sharing scenario. * @tc.desc Initiate a single location request in a specified scenario and set a car-sharing scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0004', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0400', 0, async function (done) {
let currentLocationRequest = { "priority": 0x200, "scenario": 0x303, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest = { "priority": 0x200, "scenario": 0x303, "timeoutMs": 1000, "maxAccuracy": 10 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result004 ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result004 ' + JSON.stringify(result));
...@@ -278,14 +280,14 @@ describe('geolocationTest_geo3', function () { ...@@ -278,14 +280,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0005 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0500
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario and set the life service scenario.. * @tc.desc Initiate a single location request in a specified scenario and set the life service scenario..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0500', 0, async function (done) {
let currentLocationRequest = { "priority": 0x200, "scenario": 0x304, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x200, "scenario": 0x304, "timeoutMs": 1000, "maxAccuracy": 0 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result005 ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result005 ' + JSON.stringify(result));
...@@ -298,7 +300,7 @@ describe('geolocationTest_geo3', function () { ...@@ -298,7 +300,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0006 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0600
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request in a specified scenario * @tc.desc Initiate a single location request in a specified scenario
* and set the scenario with no power consumption. * and set the scenario with no power consumption.
...@@ -306,7 +308,7 @@ describe('geolocationTest_geo3', function () { ...@@ -306,7 +308,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0006', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0600', 0, async function (done) {
let currentLocationRequest1 = { "priority": 0x200, "scenario": 0x305, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest1 = { "priority": 0x200, "scenario": 0x305, "timeoutMs": 1000, "maxAccuracy": 10 };
let currentLocationRequest2 = { "priority": 0x200, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest2 = { "priority": 0x200, "scenario": 0x301, "timeoutMs": 1000, "maxAccuracy": 10 };
await geolocation.getCurrentLocation(currentLocationRequest1).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest1).then((result) => {
...@@ -326,14 +328,14 @@ describe('geolocationTest_geo3', function () { ...@@ -326,14 +328,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0007 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0700
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request with the parameter set to high-precision priority location request. * @tc.desc Initiate a single location request with the parameter set to high-precision priority location request.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0007', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0700', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 10 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result007 ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result007 ' + JSON.stringify(result));
...@@ -346,14 +348,14 @@ describe('geolocationTest_geo3', function () { ...@@ -346,14 +348,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0008 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0800
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request with parameters set to fast location and priority location request. * @tc.desc Initiate a single location request with parameters set to fast location and priority location request.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0008', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0800', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0203, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 10 }; let currentLocationRequest = { "priority": 0x0203, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 10 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result010 ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result010 ' + JSON.stringify(result));
...@@ -366,14 +368,14 @@ describe('geolocationTest_geo3', function () { ...@@ -366,14 +368,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0009 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0900
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request with parameters set to low power consumption. * @tc.desc Initiate a single location request with parameters set to low power consumption.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0009', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0900', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0202, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x0202, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 0 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
console.info('[lbs_js] getCurrentLocation promise result009 ' + JSON.stringify(result)); console.info('[lbs_js] getCurrentLocation promise result009 ' + JSON.stringify(result));
...@@ -386,14 +388,14 @@ describe('geolocationTest_geo3', function () { ...@@ -386,14 +388,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0010 * @tc.number SUB_HSS_LocationSystem_SingleLoc_0100
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request and set the location reporting precision. * @tc.desc Initiate a single location request and set the location reporting precision.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0010', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_0100', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0200, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 5 }; let currentLocationRequest = { "priority": 0x0200, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 5 };
let currentLocationRequest1 = { "priority": 0x0200, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 2 }; let currentLocationRequest1 = { "priority": 0x0200, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 2 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
...@@ -412,7 +414,7 @@ describe('geolocationTest_geo3', function () { ...@@ -412,7 +414,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0011 * @tc.number SUB_HSS_LocationSystem_SingleLoc_1100
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request for specific configuration * @tc.desc Initiate a single location request for specific configuration
* and set the reporting precision of abnormal location. * and set the reporting precision of abnormal location.
...@@ -420,7 +422,7 @@ describe('geolocationTest_geo3', function () { ...@@ -420,7 +422,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0011', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_1100', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": 0 };
let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": -1 }; let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0300, "timeoutMs": 1000, "maxAccuracy": -1 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
...@@ -440,14 +442,14 @@ describe('geolocationTest_geo3', function () { ...@@ -440,14 +442,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0012 * @tc.number SUB_HSS_LocationSystem_SingleLoc_1200
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a single location request and set the location timeout interval. * @tc.desc Initiate a single location request and set the location timeout interval.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0012', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_1200', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0301, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0301, "timeoutMs": 1000, "maxAccuracy": 0 };
let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0301, "timeoutMs": 1000, "maxAccuracy": 0 }; let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0301, "timeoutMs": 1000, "maxAccuracy": 0 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
...@@ -467,14 +469,14 @@ describe('geolocationTest_geo3', function () { ...@@ -467,14 +469,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_SingleLoc_0013 * @tc.number SUB_HSS_LocationSystem_SingleLoc_1300
* @tc.name Test getCurrentLocation * @tc.name Test getCurrentLocation
* @tc.desc Initiate a specified single location request and set the exception location timeout interval. * @tc.desc Initiate a specified single location request and set the exception location timeout interval.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_SingleLoc_0013', 0, async function (done) { it('SUB_HSS_LocationSystem_SingleLoc_1300', 0, async function (done) {
let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0302, "timeoutMs": 0, "maxAccuracy": 0 }; let currentLocationRequest = { "priority": 0x0201, "scenario": 0x0302, "timeoutMs": 0, "maxAccuracy": 0 };
let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0302, "timeoutMs": -1000, "maxAccuracy": 0 }; let currentLocationRequest1 = { "priority": 0x0201, "scenario": 0x0302, "timeoutMs": -1000, "maxAccuracy": 0 };
await geolocation.getCurrentLocation(currentLocationRequest).then((result) => { await geolocation.getCurrentLocation(currentLocationRequest).then((result) => {
...@@ -496,14 +498,14 @@ describe('geolocationTest_geo3', function () { ...@@ -496,14 +498,14 @@ describe('geolocationTest_geo3', function () {
/** /**
* @tc.number SUB_HSS_SendCommand_callback * @tc.number SUB_HSS_SendCommand_0100
* @tc.name Test sendCommand * @tc.name Test sendCommand
* @tc.desc Test sendCommand api . * @tc.desc Test sendCommand api .
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_SendCommand_callback', 0, async function (done) { it('SUB_HSS_SendCommand_0100', 0, async function (done) {
let requestInfo = { 'scenairo': 0x301, 'command': "command_1" }; let requestInfo = { 'scenairo': 0x301, 'command': "command_1" };
await geolocation.sendCommand(requestInfo, (err, result) => { await geolocation.sendCommand(requestInfo, (err, result) => {
if (err) { if (err) {
...@@ -516,14 +518,14 @@ describe('geolocationTest_geo3', function () { ...@@ -516,14 +518,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_SendCommand_promise * @tc.number SUB_HSS_SendCommand_0200
* @tc.name Test sendCommand * @tc.name Test sendCommand
* @tc.desc Test sendCommand1 api . * @tc.desc Test sendCommand1 api .
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_SendCommand_promise', 0, async function (done) { it('SUB_HSS_SendCommand_0200', 0, async function (done) {
let requestInfo = { 'scenairo': 0x301, 'command': "command_1" }; let requestInfo = { 'scenairo': 0x301, 'command': "command_1" };
geolocation.sendCommand(requestInfo).then((result) => { geolocation.sendCommand(requestInfo).then((result) => {
console.info('sendCommand promise result:' + result); console.info('sendCommand promise result:' + result);
...@@ -536,14 +538,14 @@ describe('geolocationTest_geo3', function () { ...@@ -536,14 +538,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0001 * @tc.number SUB_HSS_LocationSystem_LocRequest_0100
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a request for continuous positioning in a specified scenario and set the navigation scenario. * @tc.desc Initiate a request for continuous positioning in a specified scenario and set the navigation scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0100', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":5, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":5,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -557,14 +559,14 @@ describe('geolocationTest_geo3', function () { ...@@ -557,14 +559,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0002 * @tc.number SUB_HSS_LocationSystem_LocRequest_0200
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a request for continuous positioning in a specified scenario and set a track tracing scenario. * @tc.desc Initiate a request for continuous positioning in a specified scenario and set a track tracing scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0200', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x302, "timeInterval":1, let requestInfo = {"priority":0x200, "scenario":0x302, "timeInterval":1,
"distanceInterval": 5, "maxAccuracy": 10}; "distanceInterval": 5, "maxAccuracy": 10};
...@@ -578,14 +580,14 @@ describe('geolocationTest_geo3', function () { ...@@ -578,14 +580,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0003 * @tc.number SUB_HSS_LocationSystem_LocRequest_0300
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a continuous location request in a specified scenario and set a car-sharing scenario. * @tc.desc Initiate a continuous location request in a specified scenario and set a car-sharing scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0300', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x303, "timeInterval":5, let requestInfo = {"priority":0x200, "scenario":0x303, "timeInterval":5,
"distanceInterval": 5, "maxAccuracy": 10}; "distanceInterval": 5, "maxAccuracy": 10};
...@@ -599,14 +601,14 @@ describe('geolocationTest_geo3', function () { ...@@ -599,14 +601,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0004 * @tc.number SUB_HSS_LocationSystem_LocRequest_0400
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a continuous location request in a specified scenario and set a life service scenario. * @tc.desc Initiate a continuous location request in a specified scenario and set a life service scenario.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0004', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0400', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x303, "timeInterval":1, let requestInfo = {"priority":0x200, "scenario":0x303, "timeInterval":1,
"distanceInterval": 5, "maxAccuracy": 0}; "distanceInterval": 5, "maxAccuracy": 0};
...@@ -620,7 +622,7 @@ describe('geolocationTest_geo3', function () { ...@@ -620,7 +622,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0005 * @tc.number SUB_HSS_LocationSystem_LocRequest_0500
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a continuous location request in a specified scenario * @tc.desc Initiate a continuous location request in a specified scenario
* and set the scenario with no power consumption. * and set the scenario with no power consumption.
...@@ -628,7 +630,7 @@ describe('geolocationTest_geo3', function () { ...@@ -628,7 +630,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0500', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x305, "timeInterval":1, let requestInfo = {"priority":0x200, "scenario":0x305, "timeInterval":1,
"distanceInterval": 5, "maxAccuracy": 10}; "distanceInterval": 5, "maxAccuracy": 10};
...@@ -648,7 +650,7 @@ describe('geolocationTest_geo3', function () { ...@@ -648,7 +650,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0007 * @tc.number SUB_HSS_LocationSystem_LocRequest_0700
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous positioning request and * @tc.desc Initiate a specified continuous positioning request and
* set the parameter to high-precision priority positioning request. * set the parameter to high-precision priority positioning request.
...@@ -656,7 +658,7 @@ describe('geolocationTest_geo3', function () { ...@@ -656,7 +658,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0007', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0700', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x201, "scenario":0x300, "timeInterval":1, let requestInfo = {"priority":0x201, "scenario":0x300, "timeInterval":1,
"distanceInterval": 5, "maxAccuracy": 10}; "distanceInterval": 5, "maxAccuracy": 10};
...@@ -670,7 +672,7 @@ describe('geolocationTest_geo3', function () { ...@@ -670,7 +672,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0008 * @tc.number SUB_HSS_LocationSystem_LocRequest_0800
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous positioning request with the parameter * @tc.desc Initiate a specified continuous positioning request with the parameter
* set to fast positioning and priority positioning request. * set to fast positioning and priority positioning request.
...@@ -678,7 +680,7 @@ describe('geolocationTest_geo3', function () { ...@@ -678,7 +680,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0008', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0800', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x203, "scenario":0x300, "timeInterval":5, let requestInfo = {"priority":0x203, "scenario":0x300, "timeInterval":5,
"distanceInterval": 5, "maxAccuracy": 10}; "distanceInterval": 5, "maxAccuracy": 10};
...@@ -692,7 +694,7 @@ describe('geolocationTest_geo3', function () { ...@@ -692,7 +694,7 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0009 * @tc.number SUB_HSS_LocationSystem_LocRequest_0900
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous positioning request with the parameter * @tc.desc Initiate a specified continuous positioning request with the parameter
* set to low power consumption type. * set to low power consumption type.
...@@ -700,7 +702,7 @@ describe('geolocationTest_geo3', function () { ...@@ -700,7 +702,7 @@ describe('geolocationTest_geo3', function () {
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0009', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0900', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x202, "scenario":0x300, "timeInterval":1, let requestInfo = {"priority":0x202, "scenario":0x300, "timeInterval":1,
"distanceInterval": 5, "maxAccuracy": 10} "distanceInterval": 5, "maxAccuracy": 10}
...@@ -714,14 +716,14 @@ describe('geolocationTest_geo3', function () { ...@@ -714,14 +716,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0010 * @tc.number SUB_HSS_LocationSystem_LocRequest_0100
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous location request and set the reporting interval. * @tc.desc Initiate a specified continuous location request and set the reporting interval.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0010', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_0100', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":3, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":3,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -735,14 +737,14 @@ describe('geolocationTest_geo3', function () { ...@@ -735,14 +737,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0011 * @tc.number SUB_HSS_LocationSystem_LocRequest_1100
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous location request and set the location reporting interval. * @tc.desc Initiate a specified continuous location request and set the location reporting interval.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0011', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_1100', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":5, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":5,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -756,14 +758,14 @@ describe('geolocationTest_geo3', function () { ...@@ -756,14 +758,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0012 * @tc.number SUB_HSS_LocationSystem_LocRequest_1200
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous location request and set the interval for reporting exceptions. * @tc.desc Initiate a specified continuous location request and set the interval for reporting exceptions.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0012', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_1200', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -777,14 +779,14 @@ describe('geolocationTest_geo3', function () { ...@@ -777,14 +779,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0013 * @tc.number SUB_HSS_LocationSystem_LocRequest_1300
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous location request and set the interval for reporting abnormal locations. * @tc.desc Initiate a specified continuous location request and set the interval for reporting abnormal locations.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0013', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_1300', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -806,14 +808,14 @@ describe('geolocationTest_geo3', function () { ...@@ -806,14 +808,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0014 * @tc.number SUB_HSS_LocationSystem_LocRequest_1400
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous positioning request and set the positioning reporting precision. * @tc.desc Initiate a specified continuous positioning request and set the positioning reporting precision.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0014', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_1400', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 5}; "distanceInterval": 0, "maxAccuracy": 5};
...@@ -835,14 +837,14 @@ describe('geolocationTest_geo3', function () { ...@@ -835,14 +837,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LocRequest_0015 * @tc.number SUB_HSS_LocationSystem_LocRequest_1500
* @tc.name Test locationChange * @tc.name Test locationChange
* @tc.desc Initiate a specified continuous location request and set the reporting precision of abnormal location. * @tc.desc Initiate a specified continuous location request and set the reporting precision of abnormal location.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LocRequest_0015', 0, async function (done) { it('SUB_HSS_LocationSystem_LocRequest_1500', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo1 = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -864,14 +866,14 @@ describe('geolocationTest_geo3', function () { ...@@ -864,14 +866,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LastLoc_0001 * @tc.number SUB_HSS_LocationSystem_LastLoc_0100
* @tc.name Test getLastLocation * @tc.name Test getLastLocation
* @tc.desc Obtain the last location after a single location. * @tc.desc Obtain the last location after a single location.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LastLoc_0001', 0, async function(done) { it('SUB_HSS_LocationSystem_LastLoc_0100', 0, async function(done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -889,7 +891,7 @@ describe('geolocationTest_geo3', function () { ...@@ -889,7 +891,7 @@ describe('geolocationTest_geo3', function () {
+' accuracy: ' + result.accuracy+' speed: ' + result.speed + +' accuracy: ' + result.accuracy+' speed: ' + result.speed +
'timeStamp: ' + result.timeStamp+'direction:' + result.direction+' timeSinceBoot: ' 'timeStamp: ' + result.timeStamp+'direction:' + result.direction+' timeSinceBoot: '
+ result.timeSinceBoot +'additions: ' + result.additions+' additionSize' + result.additionSize + result.timeSinceBoot +'additions: ' + result.additions+' additionSize' + result.additionSize
+'isFromMock'+ result.isFromMock); + 'isFromMock' +result.isFromMock);
}).catch((error) => { }).catch((error) => {
console.info("[lbs_js] getLastLocation promise then error:" + JSON.stringify(error)); console.info("[lbs_js] getLastLocation promise then error:" + JSON.stringify(error));
console.info('[lbs_js] not support now'); console.info('[lbs_js] not support now');
...@@ -899,14 +901,14 @@ describe('geolocationTest_geo3', function () { ...@@ -899,14 +901,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_LastLoc_0002 * @tc.number SUB_HSS_LocationSystem_LastLoc_0200
* @tc.name Test getLastLocation * @tc.name Test getLastLocation
* @tc.desc Obtain the last location after continuous positioning. * @tc.desc Obtain the last location after continuous positioning.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_LastLoc_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_LastLoc_0200', 0, async function (done) {
enableLocationSwitch(); enableLocationSwitch();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -916,27 +918,34 @@ describe('geolocationTest_geo3', function () { ...@@ -916,27 +918,34 @@ describe('geolocationTest_geo3', function () {
}; };
geolocation.on('locationChange', requestInfo, locationChange); geolocation.on('locationChange', requestInfo, locationChange);
geolocation.off('locationChange', locationChange); geolocation.off('locationChange', locationChange);
geolocation.getLastLocation(async (err, data) => {
function getLastLocationCallback(){
return new Promise((resolve, reject)=>{
geolocation.getLastLocation((err, data) => {
if (err) { if (err) {
console.info('[LastLoc_0002] getLastLocation callback err is : ' + JSON.stringify(err)); console.info('[LastLoc_0002] getLastLocation callback err is : ' + JSON.stringify(err));
expect(true).assertEqual(err !=null);
} else { } else {
console.info('[LastLoc_0002] getLastLocation callback result: ' + JSON.stringify(data)); console.info('[LastLoc_0002] getLastLocation callback result: ' + JSON.stringify(data));
expect(data).assertTrue(); expect(true).assertEqual(data !=null);
} }
done() resolve();
});
}) })
}
await getLastLocationCallback();
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Gnss_0001 * @tc.number SUB_HSS_LocationSystem_Gnss_0100
* @tc.name Test gnssStatusChange * @tc.name Test gnssStatusChange
* @tc.desc Monitoring Satellite Information Reporting * @tc.desc Monitoring Satellite Information Reporting
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Gnss_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_Gnss_0100', 0, async function (done) {
await changedLocationMode(); await changedLocationMode();
var gnssStatusCb = (satelliteStatusInfo) => { var gnssStatusCb = (satelliteStatusInfo) => {
console.info('gnssStatusChange: ' + satelliteStatusInfo); console.info('gnssStatusChange: ' + satelliteStatusInfo);
...@@ -961,14 +970,14 @@ describe('geolocationTest_geo3', function () { ...@@ -961,14 +970,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Gnss_0002 * @tc.number SUB_HSS_LocationSystem_Gnss_0200
* @tc.name Test nmeaMessageChange * @tc.name Test nmeaMessageChange
* @tc.desc Monitoring NMEA Information Reporting * @tc.desc Monitoring NMEA Information Reporting
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Gnss_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_Gnss_0200', 0, async function (done) {
await changedLocationMode(); await changedLocationMode();
let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0, let requestInfo = {"priority":0x200, "scenario":0x301, "timeInterval":0,
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
...@@ -987,14 +996,14 @@ describe('geolocationTest_geo3', function () { ...@@ -987,14 +996,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0001 * @tc.number SUB_HSS_LocationSystem_Batching_0100
* @tc.name Test cachedGnssLocationsReporting * @tc.name Test cachedGnssLocationsReporting
* @tc.desc Setting the Gnss Batching Reporting Interval * @tc.desc Setting the Gnss Batching Reporting Interval
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0100', 0, async function (done) {
var cachedLocationsCb1 = (locations) => { var cachedLocationsCb1 = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1013,14 +1022,14 @@ describe('geolocationTest_geo3', function () { ...@@ -1013,14 +1022,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0002 * @tc.number SUB_HSS_LocationSystem_Batching_0200
* @tc.name Test cachedGnssLocationsReporting * @tc.name Test cachedGnssLocationsReporting
* @tc.desc Setting the Gnss Batching Cache Queue to Be Reported When the Gnss Batching Cache Queue Is Full * @tc.desc Setting the Gnss Batching Cache Queue to Be Reported When the Gnss Batching Cache Queue Is Full
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0200', 0, async function (done) {
var cachedLocationsCb = (locations) => { var cachedLocationsCb = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1034,14 +1043,14 @@ describe('geolocationTest_geo3', function () { ...@@ -1034,14 +1043,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0003 * @tc.number SUB_HSS_LocationSystem_Batching_0300
* @tc.name Test getCachedGnssLocationsSize * @tc.name Test getCachedGnssLocationsSize
* @tc.desc Obtains the number of GNSS data records in the batching process. * @tc.desc Obtains the number of GNSS data records in the batching process.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0300', 0, async function (done) {
var cachedLocationsCb = (locations) => { var cachedLocationsCb = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1051,29 +1060,44 @@ describe('geolocationTest_geo3', function () { ...@@ -1051,29 +1060,44 @@ describe('geolocationTest_geo3', function () {
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
geolocation.on('cachedGnssLocationsReporting', CachedGnssLoactionsRequest, cachedLocationsCb); geolocation.on('cachedGnssLocationsReporting', CachedGnssLoactionsRequest, cachedLocationsCb);
geolocation.off('cachedGnssLocationsReporting',cachedLocationsCb); geolocation.off('cachedGnssLocationsReporting',cachedLocationsCb);
// geolocation.getCachedGnssLocationsSize((err, data) => {
// if (err) {
// console.info('[lbs_js] getCachedGnssLocationsSize callback err is : ' + err);
// expect(true).assertTrue(err != null);
// done();
// }else {
// console.info("[lbs_js] getCachedGnssLocationsSize callback data is: " + JSON.stringify(data));
// expect(true).assertTrue(data != null);
// done()
// }
// });
function getCachedGnssLocationsSizeCallback(){
return new Promise((resolve, reject)=>{
geolocation.getCachedGnssLocationsSize((err, data) => { geolocation.getCachedGnssLocationsSize((err, data) => {
if (err) { if (err) {
console.info('[lbs_js] getCachedGnssLocationsSize callback err is : ' + err); console.info('[lbs_js] getCachedGnssLocationsSize callback err is : ' + JSON.stringify(err));
expect(true).assertTrue(err != null); expect(true).assertTrue(err != null);
done();
}else { }else {
console.info("[lbs_js] getCachedGnssLocationsSize callback data is: " + JSON.stringify(data)); console.info("[lbs_js] getCachedGnssLocationsSize callback data is: " + JSON.stringify(data));
expect(true).assertTrue(data != null); expect(true).assertTrue(data != null);
done()
} }
resolve();
}); });
})
}
await getCachedGnssLocationsSizeCallback();
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0004 * @tc.number SUB_HSS_LocationSystem_Batching_0400
* @tc.name Test getCachedGnssLocationsSize * @tc.name Test getCachedGnssLocationsSize
* @tc.desc Obtains the number of GNSS data records in the batching process. * @tc.desc Obtains the number of GNSS data records in the batching process.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0004', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0400', 0, async function (done) {
var cachedLocationsCb = (locations) => { var cachedLocationsCb = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1095,14 +1119,14 @@ describe('geolocationTest_geo3', function () { ...@@ -1095,14 +1119,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0005 * @tc.number SUB_HSS_LocationSystem_Batching_0500
* @tc.name Test flushCachedGnssLocations * @tc.name Test flushCachedGnssLocations
* @tc.desc Obtains the GNSS data of the current batching. * @tc.desc Obtains the GNSS data of the current batching.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0500', 0, async function (done) {
var cachedLocationsCb = (locations) => { var cachedLocationsCb = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1112,29 +1136,33 @@ describe('geolocationTest_geo3', function () { ...@@ -1112,29 +1136,33 @@ describe('geolocationTest_geo3', function () {
"distanceInterval": 0, "maxAccuracy": 0}; "distanceInterval": 0, "maxAccuracy": 0};
geolocation.on('cachedGnssLocationsReporting', CachedGnssLoactionsRequest, cachedLocationsCb); geolocation.on('cachedGnssLocationsReporting', CachedGnssLoactionsRequest, cachedLocationsCb);
geolocation.off('cachedGnssLocationsReporting',cachedLocationsCb); geolocation.off('cachedGnssLocationsReporting',cachedLocationsCb);
function flushCachedGnssLocationsCallback(){
return new Promise((resolve, reject)=>{
geolocation.flushCachedGnssLocations((err, data) => { geolocation.flushCachedGnssLocations((err, data) => {
if (err) { if (err) {
console.info('[lbs_js] flushCachedGnssLocations callback err is : ' + err); console.info('[lbs_js] flushCachedGnssLocations callback err is : ' + JSON.stringify(err));
expect(true).assertTrue(err != null); expect(true).assertTrue(err != null);
done();
}else { }else {
console.info("[lbs_js] flushCachedGnssLocations callback data is: " + JSON.stringify(data)); console.info("[lbs_js] flushCachedGnssLocations callback data is: " + JSON.stringify(data));
expect(true).assertTrue(data); expect(true).assertTrue(data);
done();
} }
resolve();
}); });
})
}
await flushCachedGnssLocationsCallback();
done(); done();
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_Batching_0006 * @tc.number SUB_HSS_LocationSystem_Batching_0600
* @tc.name Test flushCachedGnssLocations * @tc.name Test flushCachedGnssLocations
* @tc.desc Obtain the GNSS data of the current batching. * @tc.desc Obtain the GNSS data of the current batching.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_Batching_0006', 0, async function (done) { it('SUB_HSS_LocationSystem_Batching_0600', 0, async function (done) {
var cachedLocationsCb = (locations) => { var cachedLocationsCb = (locations) => {
console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations)); console.log('cachedGnssLocationsReporting: locations: ' + JSON.stringify(locations));
expect(true).assertEqual(locations !=null); expect(true).assertEqual(locations !=null);
...@@ -1157,14 +1185,14 @@ describe('geolocationTest_geo3', function () { ...@@ -1157,14 +1185,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_GeoFence_0001 * @tc.number SUB_HSS_LocationSystem_GeoFence_0100
* @tc.name Test fenceStatusChange * @tc.name Test fenceStatusChange
* @tc.desc Gnss fence function test * @tc.desc Gnss fence function test
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 1 * @tc.level Level 1
*/ */
it('SUB_HSS_LocationSystem_GeoFence_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_GeoFence_0100', 0, async function (done) {
await changedLocationMode(); await changedLocationMode();
let geofence = {"latitude": 31.12, "longitude": 121.11, "radius": 1,"expiration": ""}; let geofence = {"latitude": 31.12, "longitude": 121.11, "radius": 1,"expiration": ""};
let geofenceRequest = {"priority":0x200, "scenario":0x301, "geofence": geofence}; let geofenceRequest = {"priority":0x200, "scenario":0x301, "geofence": geofence};
...@@ -1194,14 +1222,14 @@ describe('geolocationTest_geo3', function () { ...@@ -1194,14 +1222,14 @@ describe('geolocationTest_geo3', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_GeoFence_0005 * @tc.number SUB_HSS_LocationSystem_GeoFence_0500
* @tc.name Test fenceStatusChange * @tc.name Test fenceStatusChange
* @tc.desc Test the function of locating the validity period of the fence. * @tc.desc Test the function of locating the validity period of the fence.
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 1 * @tc.level Level 1
*/ */
it('SUB_HSS_LocationSystem_GeoFence_0005', 0, async function (done) { it('SUB_HSS_LocationSystem_GeoFence_0500', 0, async function (done) {
await changedLocationMode(); await changedLocationMode();
let geofence = {"latitude": 31.12, "longitude": 121.11, "radius": 1,"expiration": ""}; let geofence = {"latitude": 31.12, "longitude": 121.11, "radius": 1,"expiration": ""};
let geofenceRequest = {"priority":0x203, "scenario":0x301, "geofence": geofence}; let geofenceRequest = {"priority":0x203, "scenario":0x301, "geofence": geofence};
......
...@@ -83,14 +83,14 @@ describe('geolocationTest_geo2', function () { ...@@ -83,14 +83,14 @@ describe('geolocationTest_geo2', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_systemapi_0001 * @tc.number SUB_HSS_LocationSystem_systemapi_0100
* @tc.name Test getLocation * @tc.name Test getLocation
* @tc.desc Obtains the geographical location of a device.. * @tc.desc Obtains the geographical location of a device..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_systemapi_0001', 0, async function (done) { it('SUB_HSS_LocationSystem_systemapi_0100', 0, async function (done) {
geolocations.getLocation({ geolocations.getLocation({
timeout:30000, timeout:30000,
coordType:'wgs84', coordType:'wgs84',
...@@ -127,14 +127,14 @@ describe('geolocationTest_geo2', function () { ...@@ -127,14 +127,14 @@ describe('geolocationTest_geo2', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_systemapi_0002 * @tc.number SUB_HSS_LocationSystem_systemapi_0200
* @tc.name Test subscribe and unsubscribe * @tc.name Test subscribe and unsubscribe
* @tc.desc Test subscribe api . * @tc.desc Test subscribe api .
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_systemapi_0002', 0, async function (done) { it('SUB_HSS_LocationSystem_systemapi_0200', 0, async function (done) {
geolocations.subscribe({ geolocations.subscribe({
coordType:'wgs84', coordType:'wgs84',
success: function(data) { success: function(data) {
...@@ -152,14 +152,14 @@ describe('geolocationTest_geo2', function () { ...@@ -152,14 +152,14 @@ describe('geolocationTest_geo2', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_systemapi_0003 * @tc.number SUB_HSS_LocationSystem_systemapi_0300
* @tc.name test getLocationType * @tc.name test getLocationType
* @tc.desc Subscribing to geographical location information . * @tc.desc Subscribing to geographical location information .
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_systemapi_0003', 0, async function (done) { it('SUB_HSS_LocationSystem_systemapi_0300', 0, async function (done) {
geolocations.getLocationType({ geolocations.getLocationType({
success: function(data) { success: function(data) {
console.log('success get location type:' + JSON.stringify(data)); console.log('success get location type:' + JSON.stringify(data));
...@@ -178,14 +178,14 @@ describe('geolocationTest_geo2', function () { ...@@ -178,14 +178,14 @@ describe('geolocationTest_geo2', function () {
}) })
/** /**
* @tc.number SUB_HSS_LocationSystem_systemapi_0004 * @tc.number SUB_HSS_LocationSystem_systemapi_0400
* @tc.name Test getSupportedCoordTypes * @tc.name Test getSupportedCoordTypes
* @tc.desc Obtains the geographical location of a device.. * @tc.desc Obtains the geographical location of a device..
* @tc.size MEDIUM * @tc.size MEDIUM
* @tc.type Function * @tc.type Function
* @tc.level Level 2 * @tc.level Level 2
*/ */
it('SUB_HSS_LocationSystem_systemapi_0004', 0, function () { it('SUB_HSS_LocationSystem_systemapi_0400', 0, function () {
let types = geolocations.getSupportedCoordTypes(); let types = geolocations.getSupportedCoordTypes();
console.info('[lbs_js] getSupportedCoordTypes result: ' + JSON.stringify(types)); console.info('[lbs_js] getSupportedCoordTypes result: ' + JSON.stringify(types));
expect(true).assertEqual(types.length !=0); expect(true).assertEqual(types.length !=0);
...@@ -196,9 +196,3 @@ describe('geolocationTest_geo2', function () { ...@@ -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.
先完成此消息的编辑!
想要评论请 注册