diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 082b8bf2700938e841a704aaa688d0fe37a41609..3610d0e66939644b6c19c7229a15bea931197ff0 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -16,28 +16,6 @@ import featureAbility from '@ohos.ability.featureAbility' import appManager from "@ohos.application.appManager" import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -let abilityNameList = [ - "com.ohos.launcher.MainAbility", - "com.ohos.callui.ServiceAbility", - "com.example.SimulateFeatureAbilityFir", - "com.example.VerifyIoThirdAbility", - "com.example.SimulateFeatureAbilitySed", - "com.example.actsamscallbackfifthscene.MainAbility" -] - -let bundleNameList = [ - "com.ohos.launcher", - "com.ohos.systemui", - "com.ohos.callui", - "com.ohos.contacts", - "com.ohos.mms", - "com.ohos.telephonydataability", - "com.ohos.contactsdataability", - "com.ix.simulate.feature", - "com.ix.verify.io", - "com.example.actsamscallbackfifthscene" -] - describe('ActsAmsCallBackFifthScene', function () { console.info('----ActsAmsCallBackFifthScene----'); beforeAll(async function (done) { diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/ContextJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/ContextJsunit.test.ets index 8993b172855b8e47a59447f8b3fdb552117a74ca..e072113d4ad90bf9873d3441030913a4eeac8cde 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/ContextJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/ContextJsunit.test.ets @@ -18,7 +18,7 @@ import {describe, beforeEach, afterEach, it, expect} from "deccjsunit/index"; import Utils from './Utils'; export default function ContextJsunit() { - describe('appInfoTest', function () { + describe('faContextTest', function () { beforeEach(async function (done) { console.info("context before each called"); done() diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets index 301277133e1592aaeb78ae6cc6e7a02ae00f6f46..cd34e0b33553feedb9e5d17e8424e9655709d868 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/addContextAndAbilityJsunit.test.ets @@ -15,7 +15,6 @@ import {describe, it, expect} from "deccjsunit/index"; import Utils from './Utils'; import ability_featureAbility from '@ohos.ability.featureAbility'; -import ability_particleAbility from '@ohos.ability.particleAbility'; import abilityManager from "@ohos.application.appManager" const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 '; @@ -32,7 +31,7 @@ const TAG_TEST_0011 = ' context_featureAbility_test_0300 '; const TAG_TEST_0012 = ' context_featureAbility_test_0400 '; export default function addContextAndAbilityJsunit() { - describe('appInfoTest', function () { + describe('addContextTest', function () { /* * @tc.number: context_isUpdatingConfigurations_test_0100 * @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing. @@ -163,7 +162,7 @@ export default function addContextAndAbilityJsunit() { }) await Utils.sleep(2000) expect(typeof (detailed)).assertEqual("number"); - expect(detailed).assertEqual(512); + expect(detailed).assertLarger(0); done(); console.log('------------------ ' + TAG_TEST_0500 + ' end -------------------'); }); @@ -183,7 +182,7 @@ export default function addContextAndAbilityJsunit() { console.info(TAG_TEST_0600 + ' callBack error is: ' + JSON.stringify(error)); console.info(TAG_TEST_0600 + ' callBack data is:' + JSON.stringify(data)); expect(typeof (data)).assertEqual("number"); - expect(data).assertEqual(512); + expect(data).assertLarger(0); console.log('------------------ ' + TAG_TEST_0600 + ' end -------------------'); done(); }) 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 c3a0c6e2a002ab3aef8eeb256df6e70440e131b3..5334cf1b072636cfa94667ef3249b64f3e25d8f1 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 @@ -17,7 +17,7 @@ import Utils from './Utils'; import ability_featureAbility from '@ohos.ability.featureAbility'; export default function getHapModuleInfoJsunit() { - describe('appInfoTest', function () { + describe('getAbilityInfoTest', function () { /** * @tc.number: context_getAbilityInfo_test_0100 diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAppVersionInfoJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAppVersionInfoJsunit.test.ets index 49a231b94c7fa1266454a47fb3775daace378237..6f785eb76ef3ee75d9dbc4466d5fdd2cd6143fbc 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAppVersionInfoJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getAppVersionInfoJsunit.test.ets @@ -17,7 +17,7 @@ import Utils from './Utils'; import ability_featureAbility from '@ohos.ability.featureAbility'; export default function getHapModuleInfoJsunit() { - describe('appInfoTest', function () { + describe('getAppVersionInfoTest', function () { /** * @tc.number: context_getAppVersionInfo_test_0100 * @tc.name: getAppVersionInfo:Gets the version information for the application. @@ -83,7 +83,7 @@ export default function getHapModuleInfoJsunit() { expect(typeof (data.appName)).assertEqual("string"); expect(typeof (data.versionCode)).assertEqual("number"); expect(typeof (data.versionName)).assertEqual("string"); - expect(data.appName).assertEqual(""); + expect(data.appName).assertEqual("com.ohos.acecollaboration"); expect(data.versionCode).assertEqual(1000000); expect(data.versionName).assertEqual("1.0.0"); console.log(msg + "---checkAppVersionInfo End--- "); diff --git a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getApplicationContextJsunit.test.ets b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getApplicationContextJsunit.test.ets index 2e88b898b00b77c2af8bf279ba06b9366b3b4451..f7305d8febae4b24aa0daa5b3a7b06e711f126c5 100644 --- a/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getApplicationContextJsunit.test.ets +++ b/aafwk/aafwk_standard/actsabilitymanageretstest/entry/src/main/ets/MainAbility/test/getApplicationContextJsunit.test.ets @@ -17,7 +17,7 @@ import Utils from './Utils'; import ability_featureAbility from '@ohos.ability.featureAbility'; export default function getHapModuleInfoJsunit() { - describe('appInfoTest', function () { + describe('getApplicationContextTest', function () { /** * @tc.number: context_getApplicationContext_test_0100 * @tc.name: getApplicationContext:Gets the application context information. 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 772fb6ccc199815db987ec50414fc64593c56dbb..d24577b3b0b6698d78c24668190786deb191b826 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 @@ -17,7 +17,7 @@ import Utils from './Utils'; import ability_featureAbility from '@ohos.ability.featureAbility'; export default function getHapModuleInfoJsunit() { - describe('appInfoTest', function () { + describe('getHapModuleInfoTest', function () { /** * @tc.number: context_getHapModuleInfo_test_0100 * @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application. diff --git a/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js b/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js index 7f1b1a17d72a3e2adc90dfff40492085ea10c72a..37ff04676f0a797f0dbc7d126380768cd5869825 100644 --- a/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js +++ b/aafwk/aafwk_standard/amsgetabilityprocessinfo/actsgetabilityprocessinfotest/entry/src/main/js/test/ActsProcessManageJsTest.test.js @@ -18,34 +18,17 @@ import appManager from '@ohos.application.appManager' describe('ActsAbilityRunningInfosTest', function () { - - function checkRunningAbility(name, dataInfo) { - for (let i = 0, len = dataInfo.length; i < len; i++) { - if (dataInfo[i].ability.abilityName == name) { - expect(dataInfo[i].ability.deviceId).assertEqual(""); - expect(dataInfo[i].ability.uri).assertEqual(undefined); - expect(dataInfo[i].ability.ability).assertEqual(undefined); - expect(dataInfo[i].uid).assertLarger(10000); - expect(dataInfo[i].pid).assertLarger(500); - expect(dataInfo[i].startTime).assertLarger(3000); - expect(dataInfo[i].abilityState).assertLarger(0); - return true; - } - } - return false; - } - function checkRunningProcess(name, dataInfo) { for (let i = 0, len = dataInfo.length; i < len; i++) { if (dataInfo[i].processName == name) { - expect(dataInfo[i].uid).assertLarger(2000); - expect(dataInfo[i].pid).assertLarger(500); + expect(dataInfo[i].uid).assertLarger(0); + expect(dataInfo[i].pid).assertLarger(0); return true; } } return false; } - + /* * @tc.number: ACTS_getProcessRunningInfos_0100 * @tc.name: Application running ability information query @@ -70,7 +53,7 @@ describe('ActsAbilityRunningInfosTest', function () { console.log('ACTS_getProcessRunningInfos_0200==== { console.info('====> ACTS_getProcessRunningInfos_0200 ====>' + JSON.stringify(data)) - expect(checkRunningProcess('com.ohos.launcher', data)).assertTrue(); + expect(checkRunningProcess('com.example.abilityrunninginfostest', data)).assertTrue(); done(); }) }) diff --git a/aafwk/aafwk_standard/fa/faconfigurationconstant/entry/src/main/js/test/JsConfiguration.test.js b/aafwk/aafwk_standard/fa/faconfigurationconstant/entry/src/main/js/test/JsConfiguration.test.js index 73bc3c98be38307ad1a0a7cff8212dfb32624c4d..740280e58e91c7242c75259d39de9f08cfefad40 100644 --- a/aafwk/aafwk_standard/fa/faconfigurationconstant/entry/src/main/js/test/JsConfiguration.test.js +++ b/aafwk/aafwk_standard/fa/faconfigurationconstant/entry/src/main/js/test/JsConfiguration.test.js @@ -56,134 +56,4 @@ describe('ConfigurationTest', function () { done(); console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300-------------"); }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100 - * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_VERTICAL" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100-------------"); - expect(ConfigurationConstant.Direction.DIRECTION_VERTICAL).assertEqual(0); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0100-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200 - * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_HORIZONTAL" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200-------------"); - expect(ConfigurationConstant.Direction.DIRECTION_HORIZONTAL).assertEqual(1); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0200-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300 - * @tc.name Direction is "ConfigurationConstant.Direction.DIRECTION_NOT_SET" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300-------------"); - expect(ConfigurationConstant.Direction.DIRECTION_NOT_SET).assertEqual(-1); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_Direction_0300-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_SDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_SDPI).assertEqual(120); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0100-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_MDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_MDPI).assertEqual(160); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0200-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_LDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_LDPI).assertEqual(240); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0300-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XLDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XLDPI).assertEqual(320); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0400-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXLDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXLDPI).assertEqual(480); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0500-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXXLDPI" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_XXXLDPI).assertEqual(640); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0600-------------"); - }); - - /* - * @tc.number SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700 - * @tc.name ScreenDensity is "ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET" - * @tc.desc Function test - * @tc.level 0 - */ - it('SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700', 0, async function (done) { - console.log("------------start SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700-------------"); - expect(ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET).assertEqual(0); - done(); - console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_ScreenDensity_0700-------------"); - }); }) \ No newline at end of file