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 ae35038a901a9c0a9a895303a1eb54a7c77f1500..9610005e3ff39a6f74434f8c9a25da135ab6a0b1 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(); }); });