From ffeb404cf715eac5ca515878e5d57843d9f83f10 Mon Sep 17 00:00:00 2001 From: nwn1007101 Date: Tue, 26 Jul 2022 07:37:38 +0000 Subject: [PATCH] fixed ee047f4 from https://gitee.com/ni-yufei/xts_acts/pulls/4617 update Signed-off-by: nwn1007101 --- .../src/main/js/default/test/GeocoderTest.test.js | 3 +-- .../src/main/js/default/test/Geolocation.test.js | 3 +-- .../src/main/js/default/test/LocationTest.test.js | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js b/location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js index bd00cc7b9..bfd342b07 100644 --- a/location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js +++ b/location/geolocation_standard/src/main/js/default/test/GeocoderTest.test.js @@ -39,7 +39,6 @@ async function changedLocationMode(){ await geolocation.requestEnableLocation().then(async(result) => { await sleep(3000); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); - expect(result).assertTrue(); }).catch((error) => { console.info("[lbs_js] promise then error." + JSON.stringify(error)); expect().assertFail(); @@ -47,7 +46,7 @@ async function changedLocationMode(){ } }); await geolocation.isLocationEnabled().then(async(result) => { - console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); + console.info('[lbs_js]check LocationSwitchState result: ' + JSON.stringify(result)); }); } diff --git a/location/geolocation_standard/src/main/js/default/test/Geolocation.test.js b/location/geolocation_standard/src/main/js/default/test/Geolocation.test.js index cfd29cc9c..456e3b3ba 100644 --- a/location/geolocation_standard/src/main/js/default/test/Geolocation.test.js +++ b/location/geolocation_standard/src/main/js/default/test/Geolocation.test.js @@ -30,7 +30,6 @@ async function changedLocationMode(){ await geolocation.requestEnableLocation().then(async(result) => { await sleep(3000); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); - expect(result).assertTrue(); }).catch((error) => { console.info("[lbs_js] promise then error." + JSON.stringify(error)); expect().assertFail(); @@ -38,7 +37,7 @@ async function changedLocationMode(){ } }); await geolocation.isLocationEnabled().then(async(result) => { - console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); + console.info('[lbs_js] check LocationSwitchState result: ' + JSON.stringify(result)); }); } diff --git a/location/geolocation_standard/src/main/js/default/test/LocationTest.test.js b/location/geolocation_standard/src/main/js/default/test/LocationTest.test.js index a3b33ca35..c14e95297 100644 --- a/location/geolocation_standard/src/main/js/default/test/LocationTest.test.js +++ b/location/geolocation_standard/src/main/js/default/test/LocationTest.test.js @@ -38,9 +38,8 @@ async function changedLocationMode(){ console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); if(!result){ await geolocation.requestEnableLocation().then(async(result) => { -// await sleep(3000); + await sleep(3000); console.info('[lbs_js] test requestEnableLocation promise result: ' + JSON.stringify(result)); - expect(result).assertTrue(); }).catch((error) => { console.info("[lbs_js] promise then error." + JSON.stringify(error)); expect().assertFail(); @@ -48,7 +47,7 @@ async function changedLocationMode(){ } }); await geolocation.isLocationEnabled().then(async(result) => { - console.info('[lbs_js] getLocationSwitchState result: ' + JSON.stringify(result)); + console.info('[lbs_js] check LocationSwitchState result: ' + JSON.stringify(result)); }); } -- GitLab