提交 56d7aa60 编写于 作者: X xinxin13

change deviceTypes and fix getwant

Signed-off-by: Nxinxin13 <xinxin13@huawei.com>
上级 2b5b947c
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -6,7 +6,8 @@
"description": "$string:hap4_desc",
"mainElement": "Hap4MainAbility1",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -18,13 +18,13 @@ import wantConstant from '@ohos.ability.wantConstant'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function ActsGetWantTest() {
describe('ActsGetWantTest', function () {
beforeAll(async (done) => {
console.info('ActsGetWantTest begin')
var TIMEOUT_NUMBER = 3000;
afterEach(async (done) => {
setTimeout(function () {
done();
}, 1500);
})
var TIMEOUT_NUMBER = 3500;
// @tc.number: ACTS_GetWant_0100
// @tc.name: getWant : get want in current ability
// @tc.desc:Start the ability through startabilityforresult,
......@@ -152,17 +152,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult0300(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_0300 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult0300(data) {
console.info('====> ACTS_GetWant_0300 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -186,7 +175,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("!@#$%");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony");
console.info('====> ACTS_GetWant_0300 before done=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_0300 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_0500
// @tc.name: getWant : get want in current ability
......@@ -391,13 +387,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult0800(data);
done();
}, TIMEOUT_NUMBER);
})
})
function checkOnAbilityResult0800(data) {
console.info('====> ACTS_GetWant_0800 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -420,7 +409,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_0800 before done=====>')
}
done();
}, 3500);
})
})
// @tc.number: ACTS_GetWant_0900
// @tc.name: getWant : get want in current ability
......@@ -510,13 +502,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult1000(data);
done();
}, TIMEOUT_NUMBER);
})
})
function checkOnAbilityResult1000(data) {
console.info('====> ACTS_GetWant_1000 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -539,7 +524,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1000 before done=====>')
}
done();
}, TIMEOUT_NUMBER);
})
})
// @tc.number: ACTS_GetWant_1100
// @tc.name: getWant : get want in current ability
......@@ -568,17 +556,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult1100(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1100 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult1100(data) {
console.info('====> ACTS_GetWant_1100 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -600,7 +577,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1100 before done=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1100 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_1200
// @tc.name: getWant : get want in current ability
......@@ -707,7 +691,7 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1300 before done=====>')
done();
}, TIMEOUT_NUMBER);
}, 3500);
}).catch((error) => {
console.log('ACTS_GetWant_1300 error: ' + JSON.stringify(error))
expect.assertFail()
......@@ -744,13 +728,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult1400(data);
done();
}, TIMEOUT_NUMBER);
})
})
function checkOnAbilityResult1400(data) {
console.info('====> ACTS_GetWant_1400 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -773,7 +750,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1400 before done=====>')
}
done();
}, 3500);
})
})
// @tc.number: ACTS_GetWant_1500
// @tc.name: getWant : get want in current ability
......@@ -803,17 +783,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult1500(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1500 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult1500(data) {
console.info('====> ACTS_GetWant_1500 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -836,7 +805,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1500 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1500 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_1600
// @tc.name: getWant : get want in current ability
......@@ -890,7 +866,7 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1600 setTimeout before done.=====>')
done();
}, TIMEOUT_NUMBER);
}, 3500);
})
})
......@@ -981,17 +957,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult1900(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1900 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult1900(data) {
console.info('====> ACTS_GetWant_1900 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1014,7 +979,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1900 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_1900 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_2100
// @tc.name: getWant : get want in current ability
......@@ -1044,17 +1016,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult2100(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2100 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult2100(data) {
console.info('====> ACTS_GetWant_2100 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1077,7 +1038,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_2100 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2100 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_2200
// @tc.name: getWant : get want in current ability
......@@ -1108,13 +1076,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult2200(data);
done();
}, TIMEOUT_NUMBER);
})
})
function checkOnAbilityResult2200(data) {
console.info('====> ACTS_GetWant_2200 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1137,7 +1098,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_2200 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
})
})
// @tc.number: ACTS_GetWant_2300
// @tc.name: getWant : get want in current ability
......@@ -1167,17 +1131,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult2300(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2300 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
function checkOnAbilityResult2300(data) {
console.info('====> ACTS_GetWant_2300 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1200,7 +1153,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_2300 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2300 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
})
// @tc.number: ACTS_GetWant_2400
// @tc.name: getWant : get want in current ability
......@@ -1231,13 +1191,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult2400(data);
done();
}, TIMEOUT_NUMBER);
})
})
function checkOnAbilityResult2400(data) {
console.info('====> ACTS_GetWant_2400 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1260,7 +1213,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_2400 setTimeout before done.=====>')
}
done();
}, TIMEOUT_NUMBER);
})
})
/*
* @tc.number ACTS_GetWant_2500
......@@ -1292,17 +1248,6 @@ describe('ActsGetWantTest', function () {
},
}).then((data) => {
setTimeout(()=>{
checkOnAbilityResult2500(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2500 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
});
function checkOnAbilityResult2500(data) {
console.info('====> ACTS_GetWant_2500 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1325,7 +1270,14 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("test123");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony");
console.info('====> ACTS_GetWant_2500 before done=====>')
}
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
console.log('ACTS_GetWant_2500 error: ' + JSON.stringify(error))
expect.assertFail()
done();
})
});
/*
* @tc.number ACTS_GetWant_2600
......@@ -1358,13 +1310,6 @@ describe('ActsGetWantTest', function () {
},
(err, data) => {
setTimeout(()=>{
checkOnAbilityResult2600(data);
done();
}, TIMEOUT_NUMBER);
})
});
function checkOnAbilityResult2600(data) {
console.info('====> ACTS_GetWant_2600 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -1387,7 +1332,10 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("test123");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony");
console.info('====> ACTS_GetWant_2600 before done=====>')
}
done();
}, TIMEOUT_NUMBER);
})
});
/**
* @tc.number: SUB_AA_OpenHarmony_wantConstantEnumeration_0100
......
......@@ -44,8 +44,6 @@ export default {
})
}else{
setTimeout(function(){
console.debug("==========data1 bundleName is==========="
+ JSON.stringify(data.bundleName));
featureAbility.terminateSelfWithResult(
{
resultCode: 1,
......
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
......@@ -6,7 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"default"
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册