未验证 提交 9cd007af 编写于 作者: O openharmony_ci 提交者: Gitee

!3786 XTSHO问题整改

Merge pull request !3786 from chengxingzhen/OpenHarmony-3.1-Release
...@@ -16,28 +16,6 @@ import featureAbility from '@ohos.ability.featureAbility' ...@@ -16,28 +16,6 @@ import featureAbility from '@ohos.ability.featureAbility'
import appManager from "@ohos.application.appManager" import appManager from "@ohos.application.appManager"
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' 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 () { describe('ActsAmsCallBackFifthScene', function () {
console.info('----ActsAmsCallBackFifthScene----'); console.info('----ActsAmsCallBackFifthScene----');
beforeAll(async function (done) { beforeAll(async function (done) {
......
...@@ -18,7 +18,7 @@ import {describe, beforeEach, afterEach, it, expect} from "deccjsunit/index"; ...@@ -18,7 +18,7 @@ import {describe, beforeEach, afterEach, it, expect} from "deccjsunit/index";
import Utils from './Utils'; import Utils from './Utils';
export default function ContextJsunit() { export default function ContextJsunit() {
describe('appInfoTest', function () { describe('faContextTest', function () {
beforeEach(async function (done) { beforeEach(async function (done) {
console.info("context before each called"); console.info("context before each called");
done() done()
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import {describe, it, expect} from "deccjsunit/index"; import {describe, it, expect} from "deccjsunit/index";
import Utils from './Utils'; import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
import ability_particleAbility from '@ohos.ability.particleAbility';
import abilityManager from "@ohos.application.appManager" import abilityManager from "@ohos.application.appManager"
const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 '; const TAG_TEST_0100 = ' context_isUpdatingConfigurations_test_0100 ';
...@@ -32,7 +31,7 @@ const TAG_TEST_0011 = ' context_featureAbility_test_0300 '; ...@@ -32,7 +31,7 @@ const TAG_TEST_0011 = ' context_featureAbility_test_0300 ';
const TAG_TEST_0012 = ' context_featureAbility_test_0400 '; const TAG_TEST_0012 = ' context_featureAbility_test_0400 ';
export default function addContextAndAbilityJsunit() { export default function addContextAndAbilityJsunit() {
describe('appInfoTest', function () { describe('addContextTest', function () {
/* /*
* @tc.number: context_isUpdatingConfigurations_test_0100 * @tc.number: context_isUpdatingConfigurations_test_0100
* @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing. * @tc.name: isUpdatingConfigurations : Obtains whether the configuration of the current ability is changing.
...@@ -163,7 +162,7 @@ export default function addContextAndAbilityJsunit() { ...@@ -163,7 +162,7 @@ export default function addContextAndAbilityJsunit() {
}) })
await Utils.sleep(2000) await Utils.sleep(2000)
expect(typeof (detailed)).assertEqual("number"); expect(typeof (detailed)).assertEqual("number");
expect(detailed).assertEqual(512); expect(detailed).assertLarger(0);
done(); done();
console.log('------------------ ' + TAG_TEST_0500 + ' end -------------------'); console.log('------------------ ' + TAG_TEST_0500 + ' end -------------------');
}); });
...@@ -183,7 +182,7 @@ export default function addContextAndAbilityJsunit() { ...@@ -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 error is: ' + JSON.stringify(error));
console.info(TAG_TEST_0600 + ' callBack data is:' + JSON.stringify(data)); console.info(TAG_TEST_0600 + ' callBack data is:' + JSON.stringify(data));
expect(typeof (data)).assertEqual("number"); expect(typeof (data)).assertEqual("number");
expect(data).assertEqual(512); expect(data).assertLarger(0);
console.log('------------------ ' + TAG_TEST_0600 + ' end -------------------'); console.log('------------------ ' + TAG_TEST_0600 + ' end -------------------');
done(); done();
}) })
......
...@@ -17,7 +17,7 @@ import Utils from './Utils'; ...@@ -17,7 +17,7 @@ import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
export default function getHapModuleInfoJsunit() { export default function getHapModuleInfoJsunit() {
describe('appInfoTest', function () { describe('getAbilityInfoTest', function () {
/** /**
* @tc.number: context_getAbilityInfo_test_0100 * @tc.number: context_getAbilityInfo_test_0100
......
...@@ -17,7 +17,7 @@ import Utils from './Utils'; ...@@ -17,7 +17,7 @@ import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
export default function getHapModuleInfoJsunit() { export default function getHapModuleInfoJsunit() {
describe('appInfoTest', function () { describe('getAppVersionInfoTest', function () {
/** /**
* @tc.number: context_getAppVersionInfo_test_0100 * @tc.number: context_getAppVersionInfo_test_0100
* @tc.name: getAppVersionInfo:Gets the version information for the application. * @tc.name: getAppVersionInfo:Gets the version information for the application.
...@@ -83,7 +83,7 @@ export default function getHapModuleInfoJsunit() { ...@@ -83,7 +83,7 @@ export default function getHapModuleInfoJsunit() {
expect(typeof (data.appName)).assertEqual("string"); expect(typeof (data.appName)).assertEqual("string");
expect(typeof (data.versionCode)).assertEqual("number"); expect(typeof (data.versionCode)).assertEqual("number");
expect(typeof (data.versionName)).assertEqual("string"); expect(typeof (data.versionName)).assertEqual("string");
expect(data.appName).assertEqual(""); expect(data.appName).assertEqual("com.ohos.acecollaboration");
expect(data.versionCode).assertEqual(1000000); expect(data.versionCode).assertEqual(1000000);
expect(data.versionName).assertEqual("1.0.0"); expect(data.versionName).assertEqual("1.0.0");
console.log(msg + "---checkAppVersionInfo End--- "); console.log(msg + "---checkAppVersionInfo End--- ");
......
...@@ -17,7 +17,7 @@ import Utils from './Utils'; ...@@ -17,7 +17,7 @@ import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
export default function getHapModuleInfoJsunit() { export default function getHapModuleInfoJsunit() {
describe('appInfoTest', function () { describe('getApplicationContextTest', function () {
/** /**
* @tc.number: context_getApplicationContext_test_0100 * @tc.number: context_getApplicationContext_test_0100
* @tc.name: getApplicationContext:Gets the application context information. * @tc.name: getApplicationContext:Gets the application context information.
......
...@@ -17,7 +17,7 @@ import Utils from './Utils'; ...@@ -17,7 +17,7 @@ import Utils from './Utils';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
export default function getHapModuleInfoJsunit() { export default function getHapModuleInfoJsunit() {
describe('appInfoTest', function () { describe('getHapModuleInfoTest', function () {
/** /**
* @tc.number: context_getHapModuleInfo_test_0100 * @tc.number: context_getHapModuleInfo_test_0100
* @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application. * @tc.name: getHapModuleInfo:Obtains the HapModuleInfo object of the application.
......
...@@ -18,34 +18,17 @@ import appManager from '@ohos.application.appManager' ...@@ -18,34 +18,17 @@ import appManager from '@ohos.application.appManager'
describe('ActsAbilityRunningInfosTest', function () { 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) { function checkRunningProcess(name, dataInfo) {
for (let i = 0, len = dataInfo.length; i < len; i++) { for (let i = 0, len = dataInfo.length; i < len; i++) {
if (dataInfo[i].processName == name) { if (dataInfo[i].processName == name) {
expect(dataInfo[i].uid).assertLarger(2000); expect(dataInfo[i].uid).assertLarger(0);
expect(dataInfo[i].pid).assertLarger(500); expect(dataInfo[i].pid).assertLarger(0);
return true; return true;
} }
} }
return false; return false;
} }
/* /*
* @tc.number: ACTS_getProcessRunningInfos_0100 * @tc.number: ACTS_getProcessRunningInfos_0100
* @tc.name: Application running ability information query * @tc.name: Application running ability information query
...@@ -70,7 +53,7 @@ describe('ActsAbilityRunningInfosTest', function () { ...@@ -70,7 +53,7 @@ describe('ActsAbilityRunningInfosTest', function () {
console.log('ACTS_getProcessRunningInfos_0200====<begin'); console.log('ACTS_getProcessRunningInfos_0200====<begin');
appManager.getProcessRunningInfos((err, data) => { appManager.getProcessRunningInfos((err, data) => {
console.info('====> ACTS_getProcessRunningInfos_0200 ====>' + JSON.stringify(data)) console.info('====> ACTS_getProcessRunningInfos_0200 ====>' + JSON.stringify(data))
expect(checkRunningProcess('com.ohos.launcher', data)).assertTrue(); expect(checkRunningProcess('com.example.abilityrunninginfostest', data)).assertTrue();
done(); done();
}) })
}) })
......
...@@ -56,134 +56,4 @@ describe('ConfigurationTest', function () { ...@@ -56,134 +56,4 @@ describe('ConfigurationTest', function () {
done(); done();
console.log("------------end SUB_AA_OpenHarmony_ConfigurationConstant_colorMode_0300-------------"); 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册