提交 e4688caf 编写于 作者: 付家睿

fail用例修改

Signed-off-by: N付家睿 <fujiarui6@huawei.com>
上级 10537483
...@@ -61,10 +61,13 @@ describe('ActsAnsDistributeTest', function () { ...@@ -61,10 +61,13 @@ describe('ActsAnsDistributeTest', function () {
it('ActsDistribute_test_0300', 0, async function (done) { it('ActsDistribute_test_0300', 0, async function (done) {
await notify.getDeviceRemindType((err,data) => { await notify.getDeviceRemindType((err,data) => {
console.debug("===>ActsDistribute_test_0300===>"+ JSON.stringify(data)) console.debug("===>ActsDistribute_test_0300===>"+ JSON.stringify(data))
expect(data != notify.DeviceRemindType.IDLE_DONOT_REMIND ).assertEqual(true); if (data != notify.DeviceRemindType.IDLE_DONOT_REMIND
expect(data != notify.DeviceRemindType.IDLE_REMIND).assertEqual(true); && data != notify.DeviceRemindType.IDLE_REMIND
expect(data != notify.DeviceRemindType.ACTIVE_DONOT_REMIND).assertEqual(true); && data != notify.DeviceRemindType.ACTIVE_DONOT_REMIND
expect(data).assertEqual(notify.DeviceRemindType.ACTIVE_REMIND); && data != notify.DeviceRemindType.ACTIVE_REMIND )
{
expect().assertFail();
}
done(); done();
}); });
}) })
...@@ -77,9 +80,15 @@ describe('ActsAnsDistributeTest', function () { ...@@ -77,9 +80,15 @@ describe('ActsAnsDistributeTest', function () {
it('ActsDistribute_test_0400', 0, async function (done) { it('ActsDistribute_test_0400', 0, async function (done) {
function onConsume0100(data) { function onConsume0100(data) {
console.info("========ActsDistribute_test_0400 onConsume data:=======>" + JSON.stringify(data)); console.info("========ActsDistribute_test_0400 onConsume data:=======>" + JSON.stringify(data));
expect(data.request.distributedOption.remindType).assertEqual(3); if (data.request.distributedOption.remindType != notify.DeviceRemindType.IDLE_DONOT_REMIND
&& data.request.distributedOption.remindType != notify.DeviceRemindType.IDLE_REMIND
&& data.request.distributedOption.remindType != notify.DeviceRemindType.ACTIVE_DONOT_REMIND
&& data.request.distributedOption.remindType != notify.DeviceRemindType.ACTIVE_REMIND )
{
expect().assertFail();
}
expect(data.request.deviceId).assertEqual(""); expect(data.request.deviceId).assertEqual("");
console.info("========ActsDistribute_test_0400 onConsume data:=======>" + JSON.stringify(data.request.notificationFlags)); console.info("ActsDistribute_test_0400 onConsume data"+JSON.stringify(data.request.notificationFlags));
expect(JSON.stringify(data.request.notificationFlags)).assertEqual(undefined); expect(JSON.stringify(data.request.notificationFlags)).assertEqual(undefined);
} }
await notify.enableDistributed(true); await notify.enableDistributed(true);
......
...@@ -229,7 +229,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -229,7 +229,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
wantAgent.getWantAgent(agentInfoc, setTimeout(function(){
wantAgent.getWantAgent(agentInfoc,
(err, data) => { (err, data) => {
if (err.code == 0) { if (err.code == 0) {
WantAgentc = data; WantAgentc = data;
...@@ -266,11 +267,13 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -266,11 +267,13 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
console.info(data); console.info(data);
expect(typeof(data)).assertEqual("object"); expect(typeof(data)).assertEqual("object");
} }
done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_0300====>"); console.debug("====>time out ACTS_SetWantInfo_0300====>");
done();
}, time); }, time);
}); });
}, 1000);
}) })
/* /*
...@@ -334,7 +337,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -334,7 +337,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
wantAgent.getWantAgent(agentInfof, setTimeout(function(){
wantAgent.getWantAgent(agentInfof,
(err, data) => { (err, data) => {
console.log("=======agentInfof======="+err.code+JSON.stringify(data)) console.log("=======agentInfof======="+err.code+JSON.stringify(data))
if (err.code == 0) { if (err.code == 0) {
...@@ -359,11 +363,13 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -359,11 +363,13 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
else{ else{
console.info('----getWantAgent failed!----'+err.code+data); console.info('----getWantAgent failed!----'+err.code+data);
} }
done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_0400====>"); console.debug("====>time out ACTS_SetWantInfo_0400====>");
done();
}, time); }, time);
}); });
}, 1000);
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_0500 * @tc.number: ACTS_SetWantInfo_0500
...@@ -425,7 +431,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -425,7 +431,8 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
wantAgent.getWantAgent(agentInfof, setTimeout(function(){
wantAgent.getWantAgent(agentInfof,
(err, data) => { (err, data) => {
if (err.code == 0) { if (err.code == 0) {
WantAgente = data; WantAgente = data;
...@@ -462,6 +469,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -462,6 +469,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
console.debug("====>time out ACTS_SetWantInfo_0500====>"); console.debug("====>time out ACTS_SetWantInfo_0500====>");
}, time); }, time);
}); });
}, 1000);
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_0600 * @tc.number: ACTS_SetWantInfo_0600
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
"deviceType": [ "deviceType": [
"phone" "phone"
], ],
"reqPermissions": [{
"name": "ohos.permission.NOTIFICATION_CONTROLLER"
}],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
"moduleName": "entry", "moduleName": "entry",
......
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
"name": ".MyApplication", "name": ".MyApplication",
"deviceType": [ "deviceType": [
"phone" "phone"
],
"reqPermissions": [
{
"name": "ohos.permission.NOTIFICATION_CONTROLLER"
}
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册