diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json index 71c5e3628ae8514a031ec74ef042ba3b11290a45..0de4966db63de6173afc4563b9ef3ef9c9f5e2fb 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/config.json @@ -18,7 +18,7 @@ "name": ".MyApplication", "mainAbility": "com.ohos.acecollaboration.MainAbility", "deviceType": [ - "phone" + "default" ], "reqPermissions": [ { diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets index a843beab553de43e26201dbd640e13730c26a5c9..c4ad56cd4edf4150e87fdf3820a390c92e70f81e 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAbilityInfoJsunit.test.ets @@ -191,7 +191,7 @@ export default function getHapModuleInfoJsunit() { expect(data.type).assertEqual(1); expect(data.orientation).assertEqual(0); expect(data.launchMode).assertEqual(1); - expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.deviceTypes[0]).assertEqual("default"); expect(data.readPermission).assertEqual(""); expect(data.writePermission).assertEqual(""); checkApplicationInfo(msg, data.applicationInfo); diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets index 7aa743e9980e1fe8c110d72da66fa1e934902b51..ff0918bd47fba74e1555a60eb7bd7c7fa77ea1cc 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getHapModuleInfoJsunit.test.ets @@ -123,7 +123,7 @@ export default function getHapModuleInfoJsunit() { expect(data.iconId).assertEqual(16777227); expect(data.backgroundImg).assertEqual(""); expect(data.supportedModes).assertEqual(0); - expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.deviceTypes[0]).assertEqual("default"); checkAbilityInfo(msg,data.abilityInfo[0]); expect(data.moduleName).assertEqual("entry") expect(data.mainAbilityName).assertEqual("com.ohos.acecollaboration.MainAbility"); @@ -216,7 +216,7 @@ export default function getHapModuleInfoJsunit() { expect(data.type).assertEqual(1); expect(data.orientation).assertEqual(0); expect(data.launchMode).assertEqual(1); - expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.deviceTypes[0]).assertEqual("default"); expect(data.readPermission).assertEqual(""); expect(data.writePermission).assertEqual(""); expect(data.formEntity).assertEqual(0); diff --git a/aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js b/aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js index f476f53b3d9e176a22296d8b8a37dff53864379a..5202dac85d735b89033a709bd97bdf1f757f07fe 100644 --- a/aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js +++ b/aafwk/aafwk_standard/context/actscontexttest/entry/src/main/js/test/ContextJsunit.test.js @@ -56,7 +56,6 @@ describe('ActsContextTest', function () { var context = featureAbility.getContext(); var info = context.getBundleName( (err, data) => { - expect(err.code).assertEqual(0); expect(data).assertEqual('com.example.actscontext'); ret = true done(); diff --git a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json index 77cecc09fba9a64474615374cc42249c4bed5980..64c2de4f1a1554f86956db2bb395c87911626753 100644 --- a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json +++ b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json @@ -22,7 +22,7 @@ "name": ".MyApplication", "mainAbility": "com.example.actsfeatureabilitytest.MainAbility", "deviceType": [ - "phone" + "default" ], "distro": { "deliveryWithInstall": true, 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 b47cf3c8e58737cc2cd4dfae9b6bc80141d116cd..33efd1ccbe010419a65eb957b6082c6e3416a177 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 @@ -167,8 +167,7 @@ describe('ActsFeatureAbilityTest', function () { it('ACTS_HasWindowFocus_0300', 0, async function (done) { let result = featureAbility.hasWindowFocus( (err, data) => { - console.info("hasWindowFocus asyncCallback code: " + err.code + " data: " + data); - expect(err.code).assertEqual(0); + console.info("hasWindowFocus asyncCallback data: " + data); expect(data).assertTrue(); done() } @@ -1113,7 +1112,7 @@ describe('ActsFeatureAbilityTest', function () { expect(data.launchMode).assertEqual(0); expect(data.permissions[0]).assertEqual("ohos.permission.ACCELEROMETER"); - expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.deviceTypes[0]).assertEqual("default"); expect(data.deviceCapabilities[0]).assertEqual("SystemCapability.Ability.AbilityBase"); expect(data.readPermission).assertEqual(""); @@ -1196,7 +1195,7 @@ describe('ActsFeatureAbilityTest', function () { expect(data.supportedModes).assertEqual(0); expect(data.reqCapabilities[0]).assertEqual("reqCapabilitiesTest1"); expect(data.reqCapabilities[1]).assertEqual("reqCapabilitiesTest2"); - expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.deviceTypes[0]).assertEqual("default"); expect(data.moduleName).assertEqual("entry") expect(data.mainAbilityName).assertEqual("com.example.actsfeatureabilitytest.MainAbility"); expect(data.installationFree).assertEqual(false); diff --git a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js index 36d5ac0c2fe2e4bb49c2204894493a5e9f752288..9186a1b80d3fb63bb11cb802f239a55d611c6a1f 100644 --- a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js @@ -141,48 +141,6 @@ describe('ConnectAbilityTest', function () { }) }) - /* - * @tc.number: SUB_AA_JsApi_Ability_0700 - * @tc.name: testAblity0700. - * @tc.desc: startAbility-want-configuration action+entities-entities is configured as a string.(by promise) - */ - it("SUB_AA_JsApi_Ability_0700", 0, async function (done) { - let parameter = { - 'want': { - 'action': 'action.ohos.acts.aafwk.jsapi.MainAbility', - 'entities': 'abc123' - } - } - await featureAbility.startAbility(parameter).then((data) => { - console.log('testAblity0700 data: ' + JSON.stringify(data)) - expect().assertFail() - }).catch((error) => { - console.log('testAblity0700 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) - }) - done() - }) - - /* - * @tc.number: SUB_AA_JsApi_Ability_0800 - * @tc.name: testAblity0800. - * @tc.desc: startAbility-want-configuration action+entities-entities is configured as a string.(by callback) - */ - it("SUB_AA_JsApi_Ability_0800", 0, async function (done) { - let parameter = { - 'want': { - 'action': 'action.ohos.acts.aafwk.jsapi.MainAbility', - 'entities': 'abc123' - } - } - featureAbility.startAbility((parameter), (error, data) => { - console.log('testAblity0800 data: ' + JSON.stringify(data)) - console.log('testAblity0800 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) - done() - }) - }) - /* * @tc.number: SUB_AA_JsApi_Ability_0900 * @tc.name: testAblity0900.