From 00bbdecacad4a736619c571c6a1c791bbd5de100 Mon Sep 17 00:00:00 2001 From: wangtiantian Date: Mon, 23 May 2022 21:58:35 +0800 Subject: [PATCH] IssueNo: #I589JF:parse moduleName Description: parse moduleName Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wangtiantian --- .../test/ActsBmsEtsModuleNameTest.test.ets | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/MainAbility/test/ActsBmsEtsModuleNameTest.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/MainAbility/test/ActsBmsEtsModuleNameTest.test.ets index ae35038a9..9610005e3 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/MainAbility/test/ActsBmsEtsModuleNameTest.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/MainAbility/test/ActsBmsEtsModuleNameTest.test.ets @@ -344,20 +344,23 @@ export default function actsBmsJsModuleNameTest() { abilityName: ABILITY_NAME, moduleName: MODULE_NAME1 }, DEFAULT_FLAG, DEFAULT_USER_ID).then(data => { - expect(data).assertFail(); + checkDataInfo(data[0]); + console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data)); }).catch(err => { - console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); - expect(err).assertEqual(INVALID_CODE); + console.info("[QueryAbilityByWant_0100]Operation failed. Err: " + JSON.stringify(err)); + expect(err).assertFail(); }); bundle.queryAbilityByWant({ bundleName: BUNDLE_NAME, abilityName: ABILITY_NAME, moduleName: MODULE_NAME1 }, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => { - console.info("'[QueryAbilityByWant_0100]Return data " + JSON.stringify(data)); - expect(data).assertEqual("type mismatch"); - console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); - expect(err).assertEqual(INVALID_CODE); + expect(err).assertEqual(SUCCESS_CODE); + if (err) { + console.error('[QueryAbilityByWant_0100]Operation failed. Err: ' + JSON.stringify(err)); + } + checkDataInfo(data[0]); + console.info("'[QueryAbilityByWant_0100]Return data : " + JSON.stringify(data)); done(); }); }); -- GitLab