未验证 提交 002daf70 编写于 作者: O openharmony_ci 提交者: Gitee

!2912 【communication】修改hotspot测试用例执行失败问题

Merge pull request !2912 from 权力/myfeature1
......@@ -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.
先完成此消息的编辑!
想要评论请 注册