diff --git a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js index 88e220c3a4d1a943cc92a43f1aa946a0d509b2b7..b7eb11fd5c6c848859a9afc70ec298f217344828 100755 --- a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js @@ -1419,168 +1419,6 @@ describe('ActsFeatureAbilityTest', function () { expect(typeof (promise)).assertEqual("object"); }) - /* - * @tc.number: ACTS_FinishWithResult_0100 - * @tc.name: FinishWithResult : Called when startAbilityForResultis called to start - * an ability and the result is returned. - * @tc.desc: Check the return value of the interface (by promise) - */ - it('ACTS_FinishWithResult_0100', 0, async function (done) { - var promise = await featureAbility.startAbilityForResult( - { - want: - { - action: "action.system.home", - entities: ["entity.system.home"], - type: "MIMETYPE", - options: { - // indicates the grant to perform read operations on the URI - authReadUriPermission: true, - // indicates the grant to perform write operations on the URI - authWriteUriPermission: true, - // support forward intent result to origin ability - abilityForwardResult: true, - // used for marking the ability start-up is triggered by continuation - abilityContinuation: true, - // specifies whether a component does not belong to ohos - notOhosComponent: true, - // specifies whether an ability is started - abilityFormEnabled: true, - // indicates the grant for possible persisting on the URI. - authPersistableUriPermission: true, - // indicates the grant for possible persisting on the URI. - authPrefixUriPermission: true, - // support distributed scheduling system start up multiple devices - abilitySliceMultiDevice: true, - // indicates that an ability using the service template is started regardless of whether the - // host application has been started. - startForegroundAbility: true, - // install the specified ability if it's not installed. - installOnDemand: true, - // return result to origin ability slice - abilitySliceForwardResult: true, - // install the specified ability with background mode if it's not installed. - installWithBackgroundMode: true - }, - deviceId: "", - bundleName: "com.example.finishwithresultpromiseparameterstest", - abilityName: "com.example.finishwithresultpromiseparameterstest.MainAbility", - uri: "" - } - } - ); - checkOnAbilityResult(promise); - done(); - }) - - /** - * @tc.number: ACTS_FinishWithResult_0200 - * @tc.name: FinishWithResult : Called when startAbilityForResultis called to start - * an ability and the result is returned. - * @tc.desc: Check the return value of the interface (by promise) - */ - it('ACTS_FinishWithResult_0200', 0, async function (done) { - var promise = await featureAbility.startAbilityForResult( - { - want: - { - action: "action.system.home", - entities: ["entity.system.home"], - type: "MIMETYPE", - options: { - // indicates the grant to perform read operations on the URI - authReadUriPermission: true, - // indicates the grant to perform write operations on the URI - authWriteUriPermission: true, - // support forward intent result to origin ability - abilityForwardResult: true, - // used for marking the ability start-up is triggered by continuation - abilityContinuation: true, - // specifies whether a component does not belong to ohos - notOhosComponent: true, - // specifies whether an ability is started - abilityFormEnabled: true, - // indicates the grant for possible persisting on the URI. - authPersistableUriPermission: true, - // indicates the grant for possible persisting on the URI. - authPrefixUriPermission: true, - // support distributed scheduling system start up multiple devices - abilitySliceMultiDevice: true, - // indicates that an ability using the service template is started regardless of whether the - // host application has been started. - startForegroundAbility: true, - // install the specified ability if it's not installed. - installOnDemand: true, - // return result to origin ability slice - abilitySliceForwardResult: true, - // install the specified ability with background mode if it's not installed. - installWithBackgroundMode: true - }, - deviceId: "", - bundleName: "com.example.finishwithresulttest", - abilityName: "com.example.finishwithresulttest.MainAbility", - uri: "" - } - } - ); - checkOnAbilityResult(promise); - done(); - }) - - /** - * @tc.number: ACTS_FinishWithResult_0300 - * @tc.name: FinishWithResult : Called when startAbilityForResultis called to start - * an ability and the result is returned. - * @tc.desc: Check the return value of the interface (by promise) - */ - it('ACTS_FinishWithResult_0300', 0, async function (done) { - var promise = await featureAbility.startAbilityForResult( - { - want: - { - action: "action.system.home", - entities: ["entity.system.home"], - type: "MIMETYPE", - options: { - // indicates the grant to perform read operations on the URI - authReadUriPermission: true, - // indicates the grant to perform write operations on the URI - authWriteUriPermission: true, - // support forward intent result to origin ability - abilityForwardResult: true, - // used for marking the ability start-up is triggered by continuation - abilityContinuation: true, - // specifies whether a component does not belong to ohos - notOhosComponent: true, - // specifies whether an ability is started - abilityFormEnabled: true, - // indicates the grant for possible persisting on the URI. - authPersistableUriPermission: true, - // indicates the grant for possible persisting on the URI. - authPrefixUriPermission: true, - // support distributed scheduling system start up multiple devices - abilitySliceMultiDevice: true, - // indicates that an ability using the service template is started regardless of whether the - // host application has been started. - startForegroundAbility: true, - // install the specified ability if it's not installed. - installOnDemand: true, - // return result to origin ability slice - abilitySliceForwardResult: true, - // install the specified ability with background mode if it's not installed. - installWithBackgroundMode: true - }, - deviceId: "", - bundleName: "com.example.finishwithresultemptytest", - abilityName: "com.example.finishwithresultemptytest.MainAbility", - uri: "" - } - } - ); - checkOnAbilityResult(promise); - done(); - }) - // checkAbilityName function checkAbilityName(info) { console.log("AbilityName name : " + info);