未验证 提交 6c3d6653 编写于 作者: O openharmony_ci 提交者: Gitee

!3712 【XTS】【事件通知子系统】wantAgent用例修改-release

Merge pull request !3712 from 付家睿/cherry-pick-1655973451
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import notify from '@ohos.notification' import notify from '@ohos.notification'
import WantAgent from '@ohos.wantAgent' import WantAgent from '@ohos.wantAgent'
import { OperationType, WantAgentFlags } from '@ohos.wantagent' //import { OperationType, WantAgentFlags } from '@ohos.wantagent'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('ActsAnsActionButtonTest', function () { describe('ActsAnsActionButtonTest', function () {
...@@ -87,7 +87,7 @@ describe('ActsAnsActionButtonTest', function () { ...@@ -87,7 +87,7 @@ describe('ActsAnsActionButtonTest', function () {
], ],
operationType: WantAgent.OperationType.START_ABILITY, operationType: WantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
}; };
var wantAgentData = await WantAgent.getWantAgent(agentInfoA); var wantAgentData = await WantAgent.getWantAgent(agentInfoA);
...@@ -172,7 +172,7 @@ describe('ActsAnsActionButtonTest', function () { ...@@ -172,7 +172,7 @@ describe('ActsAnsActionButtonTest', function () {
], ],
operationType: WantAgent.OperationType.START_ABILITY, operationType: WantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[WantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
}; };
var wantAgentDataB = await WantAgent.getWantAgent(agentInfoB); var wantAgentDataB = await WantAgent.getWantAgent(agentInfoB);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -50,9 +50,9 @@ describe('ActsAnsWantAgentOneTest', function () { ...@@ -50,9 +50,9 @@ describe('ActsAnsWantAgentOneTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo, await wantAgent.getWantAgent(agentInfo,
...@@ -130,9 +130,9 @@ describe('ActsAnsWantAgentOneTest', function () { ...@@ -130,9 +130,9 @@ describe('ActsAnsWantAgentOneTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.ONE_TIME_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.ONE_TIME_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo, await wantAgent.getWantAgent(agentInfo,
...@@ -183,9 +183,9 @@ describe('ActsAnsWantAgentOneTest', function () { ...@@ -183,9 +183,9 @@ describe('ActsAnsWantAgentOneTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.NO_BUILD_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.NO_BUILD_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo, await wantAgent.getWantAgent(agentInfo,
...@@ -236,9 +236,9 @@ describe('ActsAnsWantAgentOneTest', function () { ...@@ -236,9 +236,9 @@ describe('ActsAnsWantAgentOneTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.CANCEL_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.CANCEL_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo, await wantAgent.getWantAgent(agentInfo,
...@@ -289,9 +289,9 @@ describe('ActsAnsWantAgentOneTest', function () { ...@@ -289,9 +289,9 @@ describe('ActsAnsWantAgentOneTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.CONSTANT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.CONSTANT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo, await wantAgent.getWantAgent(agentInfo,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -48,9 +48,9 @@ describe('ActsAnsWantAgentOneProTest', function () { ...@@ -48,9 +48,9 @@ describe('ActsAnsWantAgentOneProTest', function () {
} }
}, },
], ],
operationType: OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then( wantAgent.getWantAgent(agentInfo).then(
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoTest', function () { ...@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoTest', function () {
} }
} }
], ],
operationType: OperationType.START_ABILITIES, operationType: wantAgent.OperationType.START_ABILITIES,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo, wantAgent.getWantAgent(agentInfo,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoProTest', function () { ...@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoProTest', function () {
} }
} }
], ],
operationType: OperationType.START_ABILITIES, operationType: wantAgent.OperationType.START_ABILITIES,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then( wantAgent.getWantAgent(agentInfo).then(
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentTreeTest', function () { ...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentTreeTest', function () {
} }
}, },
], ],
operationType: OperationType.SEND_COMMON_EVENT, operationType: wantAgent.OperationType.SEND_COMMON_EVENT,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo, wantAgent.getWantAgent(agentInfo,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentTreeProTest', function () { ...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentTreeProTest', function () {
} }
}, },
], ],
operationType: OperationType.SEND_COMMON_EVENT, operationType: wantAgent.OperationType.SEND_COMMON_EVENT,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then( wantAgent.getWantAgent(agentInfo).then(
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -48,9 +48,9 @@ describe('ActsAnsWantAgentFourTest', function () { ...@@ -48,9 +48,9 @@ describe('ActsAnsWantAgentFourTest', function () {
} }
}, },
], ],
operationType: OperationType.UNKNOWN_TYPE, operationType: wantAgent.OperationType.UNKNOWN_TYPE,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo, wantAgent.getWantAgent(agentInfo,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFourProTest', function () { ...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFourProTest', function () {
} }
}, },
], ],
operationType: OperationType.UNKNOWN_TYPE, operationType: wantAgent.OperationType.UNKNOWN_TYPE,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then( wantAgent.getWantAgent(agentInfo).then(
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFiveTest', function () { ...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFiveTest', function () {
} }
}, },
], ],
// operationType: OperationType.START_ABILITY, // operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo, wantAgent.getWantAgent(agentInfo,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent'; //import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000 var time = 1000
var WantAgent; var WantAgent;
...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFiveProTest', function () { ...@@ -47,9 +47,9 @@ describe('ActsAnsWantAgentFiveProTest', function () {
} }
}, },
], ],
// operationType: OperationType.START_ABILITY, // operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
console.info('----getWantAgent before----'); console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then( wantAgent.getWantAgent(agentInfo).then(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册