提交 61e922ee 编写于 作者: O openharmony_ci 提交者: Gitee

!1284 Update test code

Merge pull request !1284 from blackleon/update_LTS_1204
......@@ -9,7 +9,8 @@
"kits": [
{
"test-file-name": [
"ActsAnsBadgeDisplayTest.hap"
"ActsAnsBadgeDisplayTest.hap",
"localcandisplay.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var WantAgenta;
......@@ -55,7 +55,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfoa,
(err, data) => {
......@@ -135,7 +135,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfod).then(
(data) => {
......@@ -198,7 +198,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfob,(err,data)=>{
WantAgentb = data
......@@ -227,7 +227,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfoc,
(err, data) => {
......@@ -302,7 +302,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfoe,(err,data)=>{
console.log("=======agentInfoe======="+err.code+JSON.stringify(data))
......@@ -332,7 +332,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfof,
(err, data) => {
......@@ -394,7 +394,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfoe,(err,data)=>{
WantAgentd = data
......@@ -423,7 +423,7 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
wantAgent.getWantAgent(agentInfof,
(err, data) => {
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -32,8 +32,8 @@ describe('ActsAnsWantAgentOneTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest",
abilityName: "com.example.WantAgentTest.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -52,7 +52,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo,
......@@ -73,8 +73,8 @@ describe('ActsAnsWantAgentOneTest', function () {
expect(data.finalCode).assertEqual(0);
expect(data.finalData).assertEqual("");
expect(data.want.deviceId).assertEqual("");
expect(data.want.bundleName).assertEqual("com.neu.WantAgentTest1");
expect(data.want.abilityName).assertEqual("com.example.test.MainAbility");
expect(data.want.bundleName).assertEqual("com.example.WantAgentTest");
expect(data.want.abilityName).assertEqual("com.example.WantAgentTest.MainAbility");
expect(data.want.uri).assertEqual("key={true,true,false}");
expect(JSON.stringify(data.want.entities)).assertEqual(JSON.stringify(["entity1"]));
expect(data.want.action).assertEqual("action1");
......@@ -112,7 +112,7 @@ describe('ActsAnsWantAgentOneTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
action: "action1",
entities: ["entity1"],
......@@ -132,7 +132,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.ONE_TIME_FLAG]
wantAgentFlags:[WantAgentFlags.ONE_TIME_FLAG]
}
console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo,
......@@ -165,7 +165,7 @@ describe('ActsAnsWantAgentOneTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
action: "action1",
entities: ["entity1"],
......@@ -185,7 +185,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.NO_BUILD_FLAG]
wantAgentFlags:[WantAgentFlags.NO_BUILD_FLAG]
}
console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo,
......@@ -218,7 +218,7 @@ describe('ActsAnsWantAgentOneTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
action: "action1",
entities: ["entity1"],
......@@ -238,7 +238,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.CANCEL_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.CANCEL_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo,
......@@ -271,7 +271,7 @@ describe('ActsAnsWantAgentOneTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
action: "action1",
entities: ["entity1"],
......@@ -291,7 +291,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.CONSTANT_FLAG]
wantAgentFlags:[WantAgentFlags.CONSTANT_FLAG]
}
console.info('----getWantAgent before----');
await wantAgent.getWantAgent(agentInfo,
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -22,7 +22,7 @@ describe('ActsAnsWantAgentOneProTest', function () {
console.info('----ActsWantAgentTest----');
/*
* @tc.number: ACTS_SetWant_0100
* @tc.number: ACTS_SetWant_0200
* @tc.name: getWantAgent(OperationType.START_ABILITY)
* @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITY)
*/
......@@ -30,9 +30,8 @@ describe('ActsAnsWantAgentOneProTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -51,7 +50,7 @@ describe('ActsAnsWantAgentOneProTest', function () {
],
operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then(
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentTwoTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -48,9 +47,8 @@ describe('ActsAnsWantAgentTwoTest', function () {
}
},
{
deviceId: "",
bundleName: "com.neu.WantAgenTest2",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgenTest2",
abilityName: "com.example.WantAgenTest2.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -69,7 +67,7 @@ describe('ActsAnsWantAgentTwoTest', function () {
],
operationType: OperationType.START_ABILITIES,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo,
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentTwoProTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -48,9 +47,8 @@ describe('ActsAnsWantAgentTwoProTest', function () {
}
},
{
deviceId: "",
bundleName: "com.neu.WantAgenTest2",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgenTest2",
abilityName: "com.example.WantAgenTest2.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -69,7 +67,7 @@ describe('ActsAnsWantAgentTwoProTest', function () {
],
operationType: OperationType.START_ABILITIES,
requestCode: 0,
// wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then(
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentTreeTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +49,7 @@ describe('ActsAnsWantAgentTreeTest', function () {
],
operationType: OperationType.SEND_COMMON_EVENT,
requestCode: 0,
// wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo,
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentTreeProTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +49,7 @@ describe('ActsAnsWantAgentTreeProTest', function () {
],
operationType: OperationType.SEND_COMMON_EVENT,
requestCode: 0,
// wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then(
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -30,8 +30,8 @@ describe('ActsAnsWantAgentFourTest', function () {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +50,7 @@ describe('ActsAnsWantAgentFourTest', function () {
],
operationType: OperationType.UNKNOWN_TYPE,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo,
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentFourProTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +49,7 @@ describe('ActsAnsWantAgentFourProTest', function () {
],
operationType: OperationType.UNKNOWN_TYPE,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then(
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentFiveTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +49,7 @@ describe('ActsAnsWantAgentFiveTest', function () {
],
// operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo,
......
......@@ -14,7 +14,7 @@
*/
import wantAgent from '@ohos.wantAgent';
import { OperationType, Flags } from '@ohos.wantagent';
import { OperationType, WantAgentFlags } from '@ohos.wantagent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index';
var time = 1000
var WantAgent;
......@@ -29,9 +29,8 @@ describe('ActsAnsWantAgentFiveProTest', function () {
var agentInfo = {
wants: [
{
deviceId: "",
bundleName: "com.neu.WantAgentTest1",
abilityName: "com.example.test.MainAbility",
bundleName: "com.example.WantAgentTest1",
abilityName: "com.example.WantAgentTest1.MainAbility",
action: "action1",
entities: ["entity1"],
type: "MIMETYPE",
......@@ -50,7 +49,7 @@ describe('ActsAnsWantAgentFiveProTest', function () {
],
// operationType: OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[Flags.UPDATE_PRESENT_FLAG]
wantAgentFlags:[WantAgentFlags.UPDATE_PRESENT_FLAG]
}
console.info('----getWantAgent before----');
wantAgent.getWantAgent(agentInfo).then(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册