提交 e79a93d7 编写于 作者: Q quanli

quanli1@huawei.com

Signed-off-by: Nquanli <quanli1@huawei.com>
上级 496521cb
......@@ -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();
......
......@@ -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();
......
......@@ -31,7 +31,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();
......@@ -71,6 +70,13 @@ async function applyPermission() {
}
}
let CountryCodeType = {
COUNTRY_CODE_FROM_LOCALE : 1,
COUNTRY_CODE_FROM_SIM:2,
COUNTRY_CODE_FROM_LOCATION:3,
COUNTRY_CODE_FROM_NETWORK:4,
}
describe('geolocationTest_4', function () {
beforeAll(async function (done) {
console.info('beforeAll case');
......@@ -151,6 +157,10 @@ describe('geolocationTest_4', function () {
console.info("[lbs_js] getCountryCode promise result: " + JSON.stringify(result));
console.info("[lbs_js] country :" + JSON.stringify(result).country);
console.info("[lbs_js] type: " + JSON.stringify(result).type);
expect(true).assertTrue(JSON.stringify(result)==CountryCodeType.COUNTRY_CODE_FROM_LOCALE);
expect(true).assertTrue(JSON.stringify(result)!=CountryCodeType.COUNTRY_CODE_FROM_SIM);
expect(true).assertTrue(JSON.stringify(result)!=CountryCodeType.COUNTRY_CODE_FROM_LOCATION);
expect(true).assertTrue(JSON.stringify(result)!=CountryCodeType.COUNTRY_CODE_FROM_NETWORK);
expect(true).assertTrue(JSON.stringify(result)!=null);
}).catch((error) => {
console.info("[lbs_js] getCountryCode promise then error." + JSON.stringify(error));
......@@ -358,3 +368,4 @@ describe('geolocationTest_4', function () {
......@@ -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();
......@@ -1188,3 +1187,4 @@ describe('geolocationTest_geo3', function () {
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册