diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json index de781134a39890c903f2f79f2a371210485b51fe..51fa2f6859d1e717cff06d16f13a97619316b56f 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappa/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json index a010eb12b964ba3315318e6ea839623d11ce4758..7dcd21f0ccf753855a79451cdf672b92285fe9a3 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappb/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json index 61fb321aa064bf7ebdb79c5df8df0209eb638fe2..b72ef81bee85c59eea413134b88f5fd690ed4cbd 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappc/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json index d92eac1351af60774d1fed1da542f125dc7ff1ec..98bb6819006081e85d12fc4463bd3cd703f7bbe4 100644 --- a/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json +++ b/ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappd/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json index a13f5e23b06928f971968e8fb15a94f406b961c7..764e9f312660fed76c752bc076d930351021e81c 100755 --- a/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json +++ b/ability/ability_runtime/stage/actswindowstagelifecyclemultihaptest/hap4/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:hap4_desc", "mainElement": "Hap4MainAbility1", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js index 954d3e40d4d5d859ff09ed7677cfb73d6b05fa0b..63f8c55e69e273c2b58ae92c82b1625f3ca48c4d 100644 --- a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js +++ b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js @@ -18,12 +18,12 @@ 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') - done(); - }) - - var TIMEOUT_NUMBER = 3500; + var TIMEOUT_NUMBER = 3000; + afterEach(async (done) => { + setTimeout(function () { + done(); + }, 1500); + }) // @tc.number: ACTS_GetWant_0100 // @tc.name: getWant : get want in current ability @@ -152,7 +152,29 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action2"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.entities[1]).assertEqual("entity2"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.3); + expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -162,32 +184,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action2"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.entities[1]).assertEqual("entity2"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.3); - expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("!@#$%"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony"); - console.info('====> ACTS_GetWant_0300 before done=====>') - } - // @tc.number: ACTS_GetWant_0500 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -391,37 +387,33 @@ describe('ActsGetWantTest', function () { }, (err, data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + expect(data.want.parameters.mykey5[1]).assertEqual("STR"); + expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); + console.info('====> ACTS_GetWant_0800 before done=====>') done(); - }, TIMEOUT_NUMBER); + }, 3500); }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_0800 before done=====>') - } - // @tc.number: ACTS_GetWant_0900 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -508,39 +500,35 @@ describe('ActsGetWantTest', function () { }, }, }, - (err, data) => { - setTimeout(()=>{ - checkOnAbilityResult1000(data); - done(); - }, TIMEOUT_NUMBER); - }) + (err, data) => { + setTimeout(()=>{ + console.info('====> ACTS_GetWant_1000 start ability=====>' + JSON.stringify(data)) + expect(data.want.deviceId).assertEqual(""); + expect(data.want.bundleName).assertEqual("com.example.actsgetwantalltesthap"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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); + }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_1000 before done=====>') - } - // @tc.number: ACTS_GetWant_1100 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -568,7 +556,27 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -578,30 +586,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_1100 before done=====>') - } - // @tc.number: ACTS_GetWant_1200 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -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,37 +728,33 @@ describe('ActsGetWantTest', function () { }, (err, data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_NOT_OHOS_COMPONENT); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + expect(data.want.parameters.mykey5[1]).assertEqual("STR"); + expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); + console.info('====> ACTS_GetWant_1400 before done=====>') done(); - }, TIMEOUT_NUMBER); + }, 3500); }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_NOT_OHOS_COMPONENT); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_1400 before done=====>') - } - // @tc.number: ACTS_GetWant_1500 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -803,7 +783,28 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITYSLICE_MULTI_DEVICE ); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -813,31 +814,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITYSLICE_MULTI_DEVICE ); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_1500 setTimeout before done.=====>') - } - // @tc.number: ACTS_GetWant_1600 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -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,7 +957,28 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_INSTALL_WITH_BACKGROUND_MODE); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -991,31 +988,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_INSTALL_WITH_BACKGROUND_MODE); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_1900 setTimeout before done.=====>') - } - // @tc.number: ACTS_GetWant_2100 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -1044,7 +1016,28 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_CLEAR_MISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -1054,31 +1047,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_CLEAR_MISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_2100 setTimeout before done.=====>') - } - // @tc.number: ACTS_GetWant_2200 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -1108,37 +1076,33 @@ describe('ActsGetWantTest', function () { }, (err, data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_CLEAR_MISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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); }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_CLEAR_MISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_2200 setTimeout before done.=====>') - } - // @tc.number: ACTS_GetWant_2300 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -1167,7 +1131,28 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_NEW_MISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -1177,31 +1162,6 @@ describe('ActsGetWantTest', function () { }) }) - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_NEW_MISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_2300 setTimeout before done.=====>') - } - // @tc.number: ACTS_GetWant_2400 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult, @@ -1231,36 +1191,32 @@ describe('ActsGetWantTest', function () { }, (err, data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action1"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_NEW_MISSION); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); + expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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); }) }) - - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action1"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_NEW_MISSION); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.0000000003); - expect(data.want.parameters.mykey2).assertEqual("[a, b, c]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("STR"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmonyhelloopenharmonyhelloopenharmony"); - console.info('====> ACTS_GetWant_2400 setTimeout before done.=====>') - } /* * @tc.number ACTS_GetWant_2500 @@ -1292,7 +1248,28 @@ describe('ActsGetWantTest', function () { }, }).then((data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action2"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT ); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.3); + expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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) => { @@ -1302,31 +1279,6 @@ describe('ActsGetWantTest', function () { }) }); - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action2"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT ); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.3); - expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("test123"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony"); - console.info('====> ACTS_GetWant_2500 before done=====>') - } - /* * @tc.number ACTS_GetWant_2600 * @tc.name Misconfigured bundlename validation @@ -1358,37 +1310,33 @@ describe('ActsGetWantTest', function () { }, (err, data) => { setTimeout(()=>{ - 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"); + expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); + expect(data.want.action).assertEqual("action2"); + expect(data.want.entities[0]).assertEqual("entity1"); + expect(data.want.type).assertEqual("MIMETYPE"); + expect(data.want.uri).assertEqual("key={true,true,false}"); + expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT ); + expect(data.want.parameters.mykey0).assertEqual(0.1); + expect(data.want.parameters.mykey1[0]).assertEqual(0.1); + expect(data.want.parameters.mykey1[1]).assertEqual(0.2); + expect(data.want.parameters.mykey1[2]).assertEqual(0.3); + expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); + expect(data.want.parameters.mykey3).assertEqual("str"); + expect(data.want.parameters.mykey4[0]).assertEqual(false); + expect(data.want.parameters.mykey4[1]).assertEqual(true); + expect(data.want.parameters.mykey4[2]).assertEqual(false); + expect(data.want.parameters.mykey5[0]).assertEqual("str"); + 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); }) }); - 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"); - expect(data.want.abilityName).assertEqual("com.example.actsgetwantalltesthap.MainAbility"); - expect(data.want.action).assertEqual("action2"); - expect(data.want.entities[0]).assertEqual("entity1"); - expect(data.want.type).assertEqual("MIMETYPE"); - expect(data.want.uri).assertEqual("key={true,true,false}"); - expect(data.want.flags).assertEqual(wantConstant.Flags.FLAG_ABILITY_FORWARD_RESULT ); - expect(data.want.parameters.mykey0).assertEqual(0.1); - expect(data.want.parameters.mykey1[0]).assertEqual(0.1); - expect(data.want.parameters.mykey1[1]).assertEqual(0.2); - expect(data.want.parameters.mykey1[2]).assertEqual(0.3); - expect(data.want.parameters.mykey2).assertEqual("[1, 2, 3]"); - expect(data.want.parameters.mykey3).assertEqual("str"); - expect(data.want.parameters.mykey4[0]).assertEqual(false); - expect(data.want.parameters.mykey4[1]).assertEqual(true); - expect(data.want.parameters.mykey4[2]).assertEqual(false); - expect(data.want.parameters.mykey5[0]).assertEqual("str"); - expect(data.want.parameters.mykey5[1]).assertEqual("test123"); - expect(data.want.parameters.mykey5[2]).assertEqual("helloopenharmony"); - console.info('====> ACTS_GetWant_2600 before done=====>') - } - /** * @tc.number: SUB_AA_OpenHarmony_wantConstantEnumeration_0100 * @tc.name: Check the enumerated value ACTION_IMAGE_CAPTURE of wantConstant. diff --git a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js index e07f937b6f1f55364308e187fa001d2a19dc0293..a877ffeac7c83a89ef6c243c5b0cb49093ed354b 100644 --- a/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js +++ b/ability/ability_runtime/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js @@ -44,8 +44,6 @@ export default { }) }else{ setTimeout(function(){ - console.debug("==========data1 bundleName is===========" - + JSON.stringify(data.bundleName)); featureAbility.terminateSelfWithResult( { resultCode: 1, diff --git a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json index fc14c3b577a5324c60ba6a7c9b30e7919217dd02..281074d04f55fce36b1433cf84248ecce4fd89ae 100644 --- a/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json +++ b/ability/ability_runtime/zidltest/actsamszidlclienttest/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json index e99d3316209ad4046ad25401d440890527097ff6..e2a0798375b37b856f0b63216617c18fc24ad983 100644 --- a/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json +++ b/ability/ability_runtime/zidltest/actsamszidlservice/entry/src/main/module.json @@ -6,7 +6,8 @@ "description": "$string:phone_entry_dsc", "mainElement": "MainAbility", "deviceTypes": [ - "default" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false,