未验证 提交 64e2dbcc 编写于 作者: O openharmony_ci 提交者: Gitee

!4287 元能力失败用例适配

Merge pull request !4287 from chengxingzhen/OpenHarmony-3.1-Release
...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilityFir start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFifthScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsCallBackFifthScene VerifyIoThirdAbility start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -65,8 +63,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -65,8 +63,7 @@ describe('ActsAmsCallBackFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilitySed start, error.code \ console.info('ActsAmsCallBackFifthScene SimulateFeatureAbilitySed start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
setTimeout(done, 5000); setTimeout(done, 5000);
...@@ -98,8 +95,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -98,8 +95,7 @@ describe('ActsAmsCallBackFifthScene', function () {
console.info("sleep end"); console.info("sleep end");
appManager.getProcessRunningInfos( appManager.getProcessRunningInfos(
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_6600 getProcessRunningInfos error.code \ console.info('Acts_Ams_test_6600 getProcessRunningInfos error.code ' + error.code);
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
...@@ -110,7 +106,7 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -110,7 +106,7 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
...@@ -120,4 +116,4 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -120,4 +116,4 @@ describe('ActsAmsCallBackFifthScene', function () {
); );
setTimeout(timeout, 5000); setTimeout(timeout, 5000);
}) })
}) })
\ No newline at end of file
...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFirstScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFirstScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsCallBackFirstScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -64,8 +63,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -64,8 +63,7 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info("sleep end"); console.info("sleep end");
appManager.getProcessRunningInfos( appManager.getProcessRunningInfos(
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_0200 getProcessRunningInfos error.code \ console.info('Acts_Ams_test_0200 getProcessRunningInfos error.code ' + error.code);
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
for (var i = 0; i < info.length; i++) { for (var i = 0; i < info.length; i++) {
...@@ -76,7 +74,7 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -76,7 +74,7 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFourthScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsCallBackFourthScene VerifyIoThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFourthScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsCallBackFourthScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -65,8 +63,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -65,8 +63,7 @@ describe('ActsAmsCallBackFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFourthScene VerifyActThirdAbility start, error.code \ console.info('ActsAmsCallBackFourthScene VerifyActThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -82,8 +79,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -82,8 +79,7 @@ describe('ActsAmsCallBackFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackFourthScene SimulateEntryAbilityFir start, error.code \ console.info('ActsAmsCallBackFourthScene SimulateEntryAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -115,8 +111,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -115,8 +111,7 @@ describe('ActsAmsCallBackFourthScene', function () {
console.info("sleep end"); console.info("sleep end");
appManager.getProcessRunningInfos( appManager.getProcessRunningInfos(
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_5000 getProcessRunningInfos error.code \ console.info('Acts_Ams_test_5000 getProcessRunningInfos error.code ' + error.code);
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
...@@ -127,7 +122,7 @@ describe('ActsAmsCallBackFourthScene', function () { ...@@ -127,7 +122,7 @@ describe('ActsAmsCallBackFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackSecondScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackSecondScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsCallBackSecondScene VerifyIoThirdAbility start:' + error.code)
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackSecondScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackSecondScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsCallBackSecondScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -81,8 +79,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -81,8 +79,7 @@ describe('ActsAmsCallBackSecondScene', function () {
console.info("sleep end"); console.info("sleep end");
appManager.getProcessRunningInfos( appManager.getProcessRunningInfos(
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_1800 getProcessRunningInfos error.code \ console.info('Acts_Ams_test_1800 getProcessRunningInfos error.code ' + error.code);
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
...@@ -93,7 +90,7 @@ describe('ActsAmsCallBackSecondScene', function () { ...@@ -93,7 +90,7 @@ describe('ActsAmsCallBackSecondScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -31,8 +31,7 @@ describe('ActsAmsCallBackThirdScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackThirdScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsCallBackThirdScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -48,8 +47,7 @@ describe('ActsAmsCallBackThirdScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsCallBackThirdScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsCallBackThirdScene VerifyIoThirdAbility start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -75,8 +73,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -75,8 +73,7 @@ describe('ActsAmsCallBackThirdScene', function () {
console.info("sleep end"); console.info("sleep end");
appManager.getProcessRunningInfos( appManager.getProcessRunningInfos(
(error, info) => { (error, info) => {
console.info('Acts_Ams_test_3400 getProcessRunningInfos error.code \ console.info('Acts_Ams_test_3400 getProcessRunningInfos error.code ' + error.code);
' + error.code + ', data length [' + info.length + ']');
expect(Array.isArray(info)).assertEqual(true); expect(Array.isArray(info)).assertEqual(true);
expect(info.length).assertLarger(0); expect(info.length).assertLarger(0);
for (let i = 0; i < info.length; i++) { for (let i = 0; i < info.length; i++) {
...@@ -87,7 +84,7 @@ describe('ActsAmsCallBackThirdScene', function () { ...@@ -87,7 +84,7 @@ describe('ActsAmsCallBackThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -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.SimulateFeatureAbilitySed",
"com.example.VerifyIoThirdAbility",
"com.example.actsamstestfifthscene.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.actsamstestfifthscene"
]
describe('ActsAmsTestFifthScene', function () { describe('ActsAmsTestFifthScene', function () {
console.info('----ActsAmsTestFifthScene----'); console.info('----ActsAmsTestFifthScene----');
beforeAll(async function (done) { beforeAll(async function (done) {
...@@ -58,8 +36,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -58,8 +36,7 @@ describe('ActsAmsTestFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFifthScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsTestFifthScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -80,8 +57,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -80,8 +57,7 @@ describe('ActsAmsTestFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFifthScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsTestFifthScene VerifyIoThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -102,8 +78,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -102,8 +78,7 @@ describe('ActsAmsTestFifthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFifthScene SimulateFeatureAbilitySed start, error.code \ console.info('ActsAmsTestFifthScene SimulateFeatureAbilitySed start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -144,7 +119,7 @@ describe('ActsAmsTestFifthScene', function () { ...@@ -144,7 +119,7 @@ describe('ActsAmsTestFifthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -36,8 +36,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -36,8 +36,7 @@ describe('ActsAmsTestFirstScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFirstScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsTestFirstScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -78,7 +77,7 @@ describe('ActsAmsTestFirstScene', function () { ...@@ -78,7 +77,7 @@ describe('ActsAmsTestFirstScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -36,8 +36,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -36,8 +36,7 @@ describe('ActsAmsTestFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFourthScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsTestFourthScene VerifyIoThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -58,8 +57,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -58,8 +57,7 @@ describe('ActsAmsTestFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFourthScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsTestFourthScene SimulateFeatureAbilityFir start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -80,8 +78,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -80,8 +78,7 @@ describe('ActsAmsTestFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFourthScene VerifyActThirdAbility start, error.code \ console.info('ActsAmsTestFourthScene VerifyActThirdAbility start, error.code' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -102,8 +99,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -102,8 +99,7 @@ describe('ActsAmsTestFourthScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestFourthScene SimulateEntryAbility start, error.code \ console.info('ActsAmsTestFourthScene SimulateEntryAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -144,7 +140,7 @@ describe('ActsAmsTestFourthScene', function () { ...@@ -144,7 +140,7 @@ describe('ActsAmsTestFourthScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -36,8 +36,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -36,8 +36,7 @@ describe('ActsAmsTestSecondScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestSecondScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsTestSecondScene VerifyIoThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -58,8 +57,8 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -58,8 +57,8 @@ describe('ActsAmsTestSecondScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestSecondScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsTestSecondScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -100,7 +99,7 @@ describe('ActsAmsTestSecondScene', function () { ...@@ -100,7 +99,7 @@ describe('ActsAmsTestSecondScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -37,8 +37,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -37,8 +37,7 @@ describe('ActsAmsTestThirdScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestThirdScene SimulateFeatureAbilityFir start, error.code \ console.info('ActsAmsTestThirdScene SimulateFeatureAbilityFir start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
...@@ -59,8 +58,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -59,8 +58,7 @@ describe('ActsAmsTestThirdScene', function () {
{}, {},
}, },
}, (error, data) => { }, (error, data) => {
console.info('ActsAmsTestThirdScene VerifyIoThirdAbility start, error.code \ console.info('ActsAmsTestThirdScene VerifyIoThirdAbility start, error.code ' + error.code);
' + error.code + ', data length [' + data.length + ']');
} }
); );
done(); done();
...@@ -102,7 +100,7 @@ describe('ActsAmsTestThirdScene', function () { ...@@ -102,7 +100,7 @@ describe('ActsAmsTestThirdScene', function () {
expect(typeof (info[i].processName)).assertEqual("string"); expect(typeof (info[i].processName)).assertEqual("string");
expect(info[i].processName.length).assertLarger(0); expect(info[i].processName.length).assertLarger(0);
expect(Array.isArray(info[i].bundleNames)).assertEqual(true); expect(Array.isArray(info[i].bundleNames)).assertEqual(true);
expect(info[i].bundleNames.length).assertEqual(0); expect(info[i].bundleNames.length).assertLarger(0);
expect(typeof (info[i].uid)).assertEqual("number"); expect(typeof (info[i].uid)).assertEqual("number");
expect(info[i].uid).assertLarger(0); expect(info[i].uid).assertLarger(0);
......
...@@ -99,7 +99,7 @@ describe('ActsStServiceAbilityTest', function () { ...@@ -99,7 +99,7 @@ describe('ActsStServiceAbilityTest', function () {
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSetting_0100 asyncCallback errCode : ' + JSON.stringify(err) console.log('ACTS_AAbilityStartSetting_0100 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data)); + " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code); expect(1).assertEqual(err.code);
done(); done();
}); });
}catch(error){ }catch(error){
...@@ -137,7 +137,7 @@ describe('ActsStServiceAbilityTest', function () { ...@@ -137,7 +137,7 @@ describe('ActsStServiceAbilityTest', function () {
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0200 asyncCallback errCode : ' + JSON.stringify(err) console.log('ACTS_AAbilityStartSettingNew_0200 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data)); + " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code); expect(1).assertEqual(err.code);
done(); done();
}); });
}catch(error){ }catch(error){
...@@ -175,7 +175,7 @@ it("ACTS_AAbilityStartSettingNew_0300",0, async function(done){ ...@@ -175,7 +175,7 @@ it("ACTS_AAbilityStartSettingNew_0300",0, async function(done){
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0300 asyncCallback errCode : ' + JSON.stringify(err) console.log('ACTS_AAbilityStartSettingNew_0300 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data)); + " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code); expect(1).assertEqual(err.code);
done(); done();
}); });
}catch(error){ }catch(error){
...@@ -213,7 +213,7 @@ it("ACTS_AAbilityStartSettingNew_0400",0, async function(done){ ...@@ -213,7 +213,7 @@ it("ACTS_AAbilityStartSettingNew_0400",0, async function(done){
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0400 asyncCallback errCode : ' + JSON.stringify(err) console.log('ACTS_AAbilityStartSettingNew_0400 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data)); + " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code); expect(1).assertEqual(err.code);
done(); done();
}); });
}catch(error){ }catch(error){
...@@ -251,7 +251,7 @@ it("ACTS_AAbilityStartSettingNew_0500",0, async function(done){ ...@@ -251,7 +251,7 @@ it("ACTS_AAbilityStartSettingNew_0500",0, async function(done){
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0500 asyncCallback errCode : ' + JSON.stringify(err) console.log('ACTS_AAbilityStartSettingNew_0500 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data)); + " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code); expect(1).assertEqual(err.code);
done(); done();
}); });
}catch(error){ }catch(error){
......
...@@ -55,11 +55,24 @@ describe('CoverApiTest', function () { ...@@ -55,11 +55,24 @@ describe('CoverApiTest', function () {
"test":11, "test":11,
"test3":true "test3":true
} }
var result = formBindingData.createFormBindingData(dataObj) var formData = formBindingData.createFormBindingData(dataObj)
console.log(TAG + " result is : " + JSON.stringify(result)) console.info(TAG + " result is : " + JSON.stringify(formData))
expect(JSON.stringify(result)).
assertEqual(JSON.stringify( let formDataStr = JSON.stringify(formData.data);
{"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"})); let formDataStrToObj = JSON.parse(formDataStr);
if (typeof(formDataStrToObj) == "string" ) {
console.info(TAG + " formDataStrToObj1 is : " + typeof formDataStrToObj)
let formDataStrToObj2 = JSON.parse(formDataStrToObj)
console.info(TAG + " formDataStrToObj2 is : " + typeof formDataStrToObj2)
expect(formDataStrToObj2.test).assertEqual(11)
expect(formDataStrToObj2.test3).assertTrue()
expect(formDataStrToObj2.time).assertEqual("11:00")
} else {
console.info(TAG + " formDataStrToObj is : " + typeof formDataStrToObj)
expect(formDataStrToObj.test).assertEqual(11)
expect(formDataStrToObj.test3).assertTrue()
expect(formDataStrToObj.time).assertEqual("11:00")
}
done(); done();
console.info('------------end SUB_AA_OpenHarmony_FormBase_1000-------------'); console.info('------------end SUB_AA_OpenHarmony_FormBase_1000-------------');
}); });
......
...@@ -47,21 +47,6 @@ ...@@ -47,21 +47,6 @@
"launchType": "standard" "launchType": "standard"
} }
], ],
"defPermissions": [
{
"name": "com.permission.CAMERA",
"grantMode": "system_grant",
"availableScope": ["signature"],
"label": "$string:testFormA",
"description": "CAMERA permission in detail"
},
{
"name": "ohos.permission.REQUIRE_FORM",
"grantMode": "system_grant",
"label": "$string:testForm",
"description": "REQUIRE_FORM permission in detail"
}
],
"reqPermissions": [ "reqPermissions": [
{ {
"name": "ohos.permission.REQUIRE_FORM", "name": "ohos.permission.REQUIRE_FORM",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
import {stringTest, numberTest, booleanTest, nullTest, undefinedTest, import {stringTest, numberTest, booleanTest, nullTest, undefinedTest,
objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js' objectTest, arrayTest, functionTest, REPEAT_COUNT} from './getParam.js'
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
const TIMEOUT = 3000; const TIMEOUT = 3000;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
const TIMEOUT = 5000; const TIMEOUT = 5000;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
const TIMEOUT = 3000; const TIMEOUT = 3000;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
import formBindingData from "@ohos.application.formBindingData" import formBindingData from "@ohos.application.formBindingData"
import formManager from '@ohos.ability.formManager' import formManager from '@ohos.ability.formHost'
import {describe, it, expect} from 'deccjsunit/index' import {describe, it, expect} from 'deccjsunit/index'
const TIMEOUT = 3000; const TIMEOUT = 3000;
...@@ -107,5 +107,4 @@ describe('ActsFormsZeroTest', function () { ...@@ -107,5 +107,4 @@ describe('ActsFormsZeroTest', function () {
done(); done();
console.log("FMS_CreateFormBindingData_0100 end"); console.log("FMS_CreateFormBindingData_0100 end");
}) })
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册