From 75180ee93d7ddfe4c470b4a2a6e584408961b173 Mon Sep 17 00:00:00 2001 From: wanghang Date: Thu, 28 Jul 2022 17:15:02 +0800 Subject: [PATCH] IssueNo:#I5JBFN Description:fix getAbilityLabel callback Sig:SIG_ApplicaitonFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: wanghang Change-Id: I40390276811e79edce1a16a0551702b79c240a94 --- .../entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets | 2 +- .../entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets index 4b2de773d..3d074dd1e 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbmsetsmodulenametest/entry/src/main/ets/test/ActsBmsEtsModuleNameTest.test.ets @@ -268,7 +268,7 @@ export default function actsBmsJsModuleNameTest() { expect(err).assertFail(); }); bundle.getAbilityLabel(BUNDLE_NAME, MODULE_NAME3, ABILITY_NAME, (err, data) => { - expect(err).assertEqual(SUCCESS_CODE); + expect(err).assertNull(); if (err) { console.error('[GetAbilityLabel_0300]Operation failed. Err: ' + JSON.stringify(err)); } diff --git a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets index c34be3094..07a6ef4a0 100644 --- a/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets +++ b/bundlemanager/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/test/GetAbilityLabelJsUnit.test.ets @@ -41,7 +41,7 @@ export default function getAbilityLabel() { expect(error).assertFail(); }); Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME, (error, data) => { - expect(error).assertEqual(0); + expect(error).assertNull(); expect(data).assertEqual("entry_MainAbility"); done(); }); @@ -66,7 +66,7 @@ export default function getAbilityLabel() { let timeNewStamp = Utils.getNowTime(); Utils.getDurationTime('[context_getAbilityLabel_test_0200]', timeOldStamp, timeNewStamp); expect(data).assertEqual("bmsfirstright"); - expect(error).assertEqual(0); + expect(error).assertNull(); done(); }); }); -- GitLab