提交 d7095fed 编写于 作者: X xinxin13

Adaption code getwant and ActsAbilityDelegatorCaseTest

Signed-off-by: Nxinxin13 <xinxin13@huawei.com>
上级 4665e968
......@@ -37,14 +37,6 @@ export default function actsStServiceAbilityTest() {
done();
}, gSetTimeout);
})
afterAll((done) => {
console.debug('= ACTS_AAAfterAll ====<begin');
setTimeout(function () {
console.debug('= ACTS_AAAfterAll ====<end');
featureAbility.terminateSelf();
done();
}, gSetTimeout);
})
/**
* @tc.number: ACTS_AExecuteShellCommand_0100
......
......@@ -23,7 +23,7 @@ describe('ActsGetWantTest', function () {
done();
})
var TIMEOUT_NUMBER = 2500;
var TIMEOUT_NUMBER = 3500;
// @tc.number: ACTS_GetWant_0100
// @tc.name: getWant : get want in current ability
......@@ -48,6 +48,7 @@ describe('ActsGetWantTest', function () {
},
}
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0100 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -68,7 +69,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey6["subKey1"]).assertEqual("STRING");
expect(data.want.parameters.mykey6["subKey2"]).assertEqual(10);
expect(data.want.parameters.mykey6["subKey3"]).assertEqual(true);
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -101,6 +101,7 @@ describe('ActsGetWantTest', function () {
}
},
(err, data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0200 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -118,7 +119,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[0]).assertEqual("str");
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony");
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
})
......@@ -151,8 +151,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult0300(data);
setTimeout(()=>{
checkOnAbilityResult0300(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -215,6 +215,7 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0500 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -237,7 +238,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_0500 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -275,6 +275,7 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0600 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -297,7 +298,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_0600 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
})
......@@ -330,6 +330,7 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0700 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -352,7 +353,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_0700 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -390,8 +390,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult0800(data);
setTimeout(()=>{
checkOnAbilityResult0800(data);
done();
}, TIMEOUT_NUMBER);
})
......@@ -449,6 +449,7 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_0900 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -471,7 +472,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_0900 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -509,8 +509,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult1000(data);
setTimeout(()=>{
checkOnAbilityResult1000(data);
done();
}, TIMEOUT_NUMBER);
})
......@@ -567,8 +567,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult1100(data);
setTimeout(()=>{
checkOnAbilityResult1100(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -629,6 +629,7 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_1200 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -650,7 +651,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1200 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
})
......@@ -683,6 +683,7 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_1300 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -705,7 +706,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1300 before done=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -743,8 +743,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult1400(data);
setTimeout(()=>{
checkOnAbilityResult1400(data);
done();
}, TIMEOUT_NUMBER);
})
......@@ -802,8 +802,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult1500(data);
setTimeout(()=>{
checkOnAbilityResult1500(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -866,6 +866,7 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_1600 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -888,7 +889,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1600 setTimeout before done.=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
})
......@@ -921,6 +921,7 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
setTimeout(()=>{
console.info('====> ACTS_GetWant_1700 start ability=====>' + JSON.stringify(data))
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap");
......@@ -943,7 +944,6 @@ describe('ActsGetWantTest', function () {
expect(data.want.parameters.mykey5[1]).assertEqual("STR");
expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony");
console.info('====> ACTS_GetWant_1700 setTimeout before done.=====>')
setTimeout(()=>{
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -980,8 +980,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult1900(data);
setTimeout(()=>{
checkOnAbilityResult1900(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -1043,8 +1043,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult2100(data);
setTimeout(()=>{
checkOnAbilityResult2100(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -1107,8 +1107,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult2200(data);
setTimeout(()=>{
checkOnAbilityResult2200(data);
done();
}, TIMEOUT_NUMBER);
})
......@@ -1166,8 +1166,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult2300(data);
setTimeout(()=>{
checkOnAbilityResult2300(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -1230,8 +1230,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult2400(data);
setTimeout(()=>{
checkOnAbilityResult2400(data);
done();
}, TIMEOUT_NUMBER);
})
......@@ -1291,8 +1291,8 @@ describe('ActsGetWantTest', function () {
},
},
}).then((data) => {
checkOnAbilityResult2500(data);
setTimeout(()=>{
checkOnAbilityResult2500(data);
done();
}, TIMEOUT_NUMBER);
}).catch((error) => {
......@@ -1357,8 +1357,8 @@ describe('ActsGetWantTest', function () {
},
},
(err, data) => {
checkOnAbilityResult2600(data);
setTimeout(()=>{
checkOnAbilityResult2600(data);
done();
}, TIMEOUT_NUMBER);
})
......
......@@ -52,7 +52,7 @@ export default {
want: data
}
);
},1000);
},800);
}
}
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册