提交 24e0c2d9 编写于 作者: Q q00313334 提交者: 权力

fixed 5477de5d from https://gitee.com/quanli125/xts_acts/pulls/2912

3516quanli1@huawei.com
Signed-off-by: Nq00313334 <quanli1@huawei.com>
上级 bf32347a
......@@ -20,7 +20,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
title: '',
myTimeout: 15000
myTimeout: 25000
},
onInit() {
this.title = this.$t('strings.world');
......
......@@ -530,6 +530,7 @@ describe('ACTS_WifiTest', function() {
let isSuccess1 = wifi.setHotspotConfig(HotspotConfigWO);
console.log("[wifi_test] set a psk preSharedKey hotspot config result1: " + isSuccess1);
expect(isSuccess1).assertTrue();
await sleep(5000);
let config = wifi.getHotspotConfig();
console.info("[wifi_test] getHotspotConfig result -> " + JSON.stringify(config));
expect(config.ssid).assertEqual('WIFITEST');
......
......@@ -20,7 +20,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
title: '',
myTimeout: 15000
myTimeout: 25000
},
onInit() {
this.title = this.$t('strings.world');
......
......@@ -18,7 +18,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index'
export default {
data: {
title: '',
myTimeout: 15000
myTimeout: 25000
},
onInit() {
this.title = this.$t('strings.world');
......
......@@ -14,12 +14,12 @@
*/
import geolocation from '@ohos.geolocation';
import wantAgent from '@ohos.wantAgent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
let LocationRequestScenario = {UNSET : 0x300 ,NAVIGATION : 0x301 ,
TRAJECTORY_TRACKING : 0x302 ,CAR_HAILING : 0x303,
DAILY_LIFE_SERIVICE : 0x304 ,NO_POWER : 0x305}
DAILY_LIFE_SERVICE : 0x304 ,NO_POWER : 0x305}
let LocationRequestPriority = {UNSET : 0x200 ,ACCURACY : 0x201 ,LOW_POWER : 0x202 ,FIRST_FIX :0x203}
let LocationPrivacyType = {
......@@ -896,6 +896,50 @@ describe('geolocationTest', function () {
})
/**
* @tc.number SUB_LOCATION_geocode_DEVICE_JS_LOCATION_CHANGE_ON_0001
* @tc.name testlocationChangeOn promise
* @tc.desc Test fenceStatusChange api .
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 2
*/
it('geolocation_fenceStatusChange_On_test_001', 0, async function (done) {
geolocation.enableLocation((err, data) => {
if (err) {
console.info('[lbs_js] enableLocation callback err is : ' + err );
}else {
console.info("[lbs_js] enableLocation callback data: " + data);
expect(data).assertTrue();
}
done()
});
let geofence = {"latitude":31.12,"longitude":121.11, "radius":1,"expiration":""};
let geofenceRequest = { "priority":0x203, "scenario":0x300,"geofence":geofence};
let want = (wantAgent)=>{
console.log('wantAgent:'+ JSON.stringify(wantAgent));
};
await geolocation.on('fenceStatusChange',geofenceRequest,
want => {
if(err){
return console.info("fenceStatusChange callback err: " + err);
}
console.info("offfenceStatusChange callback: " + JSON.stringify(want));
expect(true).assertEqual(want !=null);
done();
});
await geolocation.off('fenceStatusChange',geofenceRequest,
want => {
if(err){
return console.info("fenceStatusChange callback err: " + err);
}
console.info("offfenceStatusChange callback: " + JSON.stringify(want));
expect(true).assertEqual(want !=null);
done();
});
})
/**
* @tc.number SUB_LOCATION_geocode_DEVICE_JS_LOCATION_CHANGE_ON_0002
* @tc.name testlocationChangeOn promise
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册