From 48ce40f91efe342afd97b0219891084333c23f56 Mon Sep 17 00:00:00 2001 From: mingxihua Date: Thu, 10 Mar 2022 12:07:25 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#I4X70Z:=20=E5=85=83=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E9=80=82=E9=85=8D=E6=96=B0=E4=BB=BB=E5=8A=A1=E6=A0=88xts?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E4=BF=AE=E6=94=B9=20Descri?= =?UTF-8?q?ption:=20=E5=85=83=E8=83=BD=E5=8A=9B=E9=80=82=E9=85=8D=E6=96=B0?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=88xts=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=BF=AE=E6=94=B9=20Sig:SIG=5FApplicationFramework=20?= =?UTF-8?q?Feature=20or=20Bugfix:Bugfix=20Binary=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mingxihua --- .../entry/src/main/config.json | 4 + .../signature/openharmony_sx.p7b | Bin 3443 -> 3455 bytes .../entry/src/main/config.json | 8 + .../signature/openharmony_sx.p7b | Bin 3443 -> 3454 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 2 +- .../signature/openharmony_sx.p7b | Bin 3443 -> 3455 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 10 +- .../signature/openharmony_sx.p7b | Bin 3443 -> 3455 bytes .../entry/src/main/config.json | 8 + .../signature/openharmony_sx.p7b | Bin 3443 -> 3455 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 29 +-- .../signature/openharmony_sx.p7b | Bin 3443 -> 3451 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 18 +- .../signature/openharmony_sx.p7b | Bin 3443 -> 3451 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 21 ++- .../signature/openharmony_sx.p7b | Bin 3443 -> 3452 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 14 +- .../signature/openharmony_sx.p7b | Bin 3443 -> 3453 bytes .../entry/src/main/config.json | 8 + .../main/js/test/MangerAbilityJsunit.test.js | 18 +- .../signature/openharmony_sx.p7b | Bin 3443 -> 3451 bytes .../signature/systemui.p7b | Bin 3443 -> 3445 bytes .../src/main/config.json | 4 + .../main/js/test/MangerAbilityJsunit.test.js | 4 +- .../signature/systemui.p7b | Bin 3443 -> 3446 bytes .../clearmissionspromise/src/main/config.json | 4 + .../main/js/test/MangerAbilityJsunit.test.js | 9 +- .../amsMissionSnapshotTest/Test.json | 2 +- .../entry/src/main/config.json | 4 + .../src/main/js/default/pages/index/index.js | 1 + .../js/test/amsMissionSnapshotTest.test.js | 169 +++++++----------- .../actsfeatureabilitytest/Test.json | 2 +- .../main/js/test/FeatureAbilityJsunit.test.js | 15 +- 39 files changed, 239 insertions(+), 163 deletions(-) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json index 8af26777e..587d73eda 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json +++ b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/config.json @@ -61,6 +61,10 @@ { "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "name":"ohos.permission.MANAGE_MISSIONS", + "reason":"need use ohos.permission.MANAGE_MISSIONS" } ], "js": [ diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..bf893c5fa3f7c335b731c76c5ad1b45620889f25 100644 GIT binary patch delta 277 zcmew?^@5qwPB{BRkWACf*#NPzDntqam*WHydX{n+IbmGYb==K@+PC zLLuXVCRSdSCRWak4tXq!sTGO21v#mDiOD6!iMhqei8(n*iOJb%nQ0{%#mT98shbb6 zjz delta 265 zcmew_^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJt7W9M=*XkxSj8fK6^ zxq&Nn@){oJdLsi119L+o6XPfYeYk;~EQU%f3Vj7qdR$V~qJFkYYqVQts6IRV-Yn2Z z?BSC1F9pdz_RlcjV&ech^_(pWGZTx4fg6(|!?PgUl=(+v_ee*(ntu5`@ruHN)C-+c zw&re{${_scqre-Wl6esuP0uhbSQqm5^VIe4g;-a4Z=GMQvYheY^M@5qwPB{BRkWACf;nIP&yMMqam*WHydX{n+IbmGYb==K@+PC zLLuXVCRSdSCRWak4tXq!sTGO21v#mDiOD6!iMhqei8(n*iOJb%nMK7V#mT98shbb6 z!|CTP-`~UgI%`HF6i_6{_aItX!-F?oMg_()P&A^38LH<;t$}9JyT$QPc zmI3X3A#HEC7`HP-@7~|{Lj4Kr)o)A+8Rc9#ZH#9;u8CYdIFosumB686e721RVS9gX LPT8B5U$Pkh^GIMM delta 265 zcmew-^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJt7W9M=*XkxSj8fK6^ zxq&Nn@){oJdLsi119L+o6XPfYeYk;~EQU%f3Vj7qdR$V~qJFkYYqVQts6IRV-Yn2Z z?BSC1F9pdz_RlcjV&ech^_(pWGZTx4fg6(|!?PgUl=(+v_ee*(ntu5`@ruHN)C-+c zw&re{${_scqre-Wl6esuP0uhbSQqm5^VIe4g;-a4Z=GMQvYheY^M { console.info('Acts_Ams_test_6400 killProcessesByBundleName error.code \ ' + error.code + ',data [' + info + ']'); diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamscallbackfourthscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..ff671512c0c9cb2a4287350e0758a577e432ff11 100755 GIT binary patch delta 277 zcmew?^@5qwPB{BRkWACf*#NPzDntqam*WHydX{n+IbmGYb==K@+Pi zLLuXVCRRR{CRVPE4tXp}sTGO21v#mDiOD6!iMhqei8(n*iOJb%`K3iA8O6z|d8wNZ zvE;FH0c~Tn0UB+PJvoszb@F^3=XzrU3qwN_V^fPL1AVyhoGgY)ED8=R@mmGol$+hY zvBHG$&->P2tn+5dHa=5v37w;)a3@yCfQyX-=2r!(?8+&?<=h@d61V*mgE delta 265 zcmew_^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHeX=LW9M=*XkxSj8fK6^ zxsfY%@>(9}dLsi119L+o6XPfYeYk;~EQU%f3Vj7qdR$V~qJFkYYqVQts6IRV-Yn2Z z?BSC1F9pdz_RlcjV&ech^_(pWGZTx4fg6(|!?PgUl=(+v_ee*(ntu5`@ruHN)C-+c zw&re{${_scqre-Wl6esuP0uhbSQqm5^VIe4g;-a4Z=GMQvYheY^M { console.info('Acts_Ams_test_3200 killProcessesByBundleName error.code: \ ' + error.code + ',data [' + info + ']'); - expect(info).assertEqual(2097215); + expect(error.code).assertEqual(2097215); done(); }); setTimeout(timeout, 5000); diff --git a/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..3f581c43476851e85978d022eb4a269fa6a7ae04 100755 GIT binary patch delta 277 zcmew?^@5qwPB{BRkWACf*#NPzDntqam*WHydX{n+IbmGYb==K@+PC zLLuXVCRSdSCRWak4tXq!sTGO21v#mDiOD6!iMhqei8(n*iOJa|8JR^X#mT98shbb6 zA9~oNiA~z=FrXG?=BW%QjnUiS?&`&jpL4w`?@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJt7W9M=*XkxSj8fK6^ zxq&Nn@){oJdLsi119L+o6XPfYeYk;~EQU%f3Vj7qdR$V~qJFkYYqVQts6IRV-Yn2Z z?BSC1F9pdz_RlcjV&ech^_(pWGZTx4fg6(|!?PgUl=(+v_ee*(ntu5`@ruHN)C-+c zw&re{${_scqre-Wl6esuP0uhbSQqm5^VIe4g;-a4Z=GMQvYheY^M@5qwPB{BRkWACf*#NPzDntqam*WHydX{n+IbmGYb==K@+PC zLLuXVCRSdSCRWak4tXq!sTGO21v#mDiOD6!iMhqei8(n*iOJa|8JR^X#mT98shbb6 zb}deqoU-9i52N7w&e)yuuj@U< N_d8#=IQjW_BLH$nV8{Rf delta 265 zcmew_^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJt7W9M=*XkxSj8fK6^ zxq&Nn@){oJdLsi119L+o6XPfYeYk;~EQU%f3Vj7qdR$V~qJFkYYqVQts6IRV-Yn2Z z?BSC1F9pdz_RlcjV&ech^_(pWGZTx4fg6(|!?PgUl=(+v_ee*(ntu5`@ruHN)C-+c zw&re{${_scqre-Wl6esuP0uhbSQqm5^VIe4g;-a4Z=GMQvYheY^M { - console.info('ActsAmsTestFifthScene beforeAll clearMission error.code \ - ' + error.code + ', want.bundleName:' + data[i].want.bundleName); - } - ); + if (data[i].want.bundleName != 'com.example.actsamstestfifthscene') { + console.log("ActsAmsTestFifthScene, missionId: " + data[i].missionId) + missionManager.clearMission(data[i].missionId, + (error, info) => { + console.info('ActsAmsTestFifthScene beforeAll clearMission error.code \ + ' + error.code + ', want.bundleName:' + data[i].want.bundleName); + } + ); + } } await featureAbility.startAbility( @@ -170,6 +172,7 @@ describe('ActsAmsTestFifthScene', function () { * @tc.desc : Move Mission To Top(by Promise) */ it('Acts_Ams_test_1100', 0, async function (done) { + console.log('Acts_Ams_test_1100 begin'); var maxnum = 10; var result = await missionManager.getMissionInfos("", maxnum).catch(err => { console.log('Acts_Ams_test_1100 getMissionInfos failed: ' + err); @@ -177,9 +180,11 @@ describe('ActsAmsTestFifthScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_1100 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.moveMissionToFront(result[0].missionId); + var info = await missionManager.moveMissionToFront(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_1100 moveMissionToFront failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_1100 moveMissionToFront data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -231,9 +236,11 @@ describe('ActsAmsTestFifthScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_0700 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearMission(result[1].missionId); + var info = await missionManager.clearMission(result[1].missionId).catch(err => { + console.log('Acts_Ams_test_0700 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_0700 clearMission data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..a5df9f02bca11378394043282115c8e6389b9b19 100755 GIT binary patch delta 273 zcmew?^;^oppozDfjZ>@5qwPB{BRkWACf*F7PznfWpqtOxvM@8TxEr`KDHyZNa%4zeWfUUVd3=F4 zd#m@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJq6V`p_TXkxURY{#>< z-pIhhz}(Qt#5l@8A8rmOi=h&WLSKQD9+y*f@YLJZH { + console.log('Acts_Ams_test_1100 moveMissionToFront failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_1100 moveMissionToFront data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -182,9 +184,11 @@ describe('ActsAmsTestFirstScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_0700 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearMission(result[0].missionId); + var info = await missionManager.clearMission(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_0700 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_0700 clearMission data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -202,9 +206,11 @@ describe('ActsAmsTestFirstScene', function () { } expect(result.length).assertEqual(1); var missionID = result[0].missionId + 1; - var info = await missionManager.clearMission(missionID); + var info = await missionManager.clearMission(missionID).catch(err => { + console.log('Acts_Ams_test_11100 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_11100 clearMissions data [' + info + ']'); - expect(info).assertLarger(0); done(); setTimeout(timeout, 5000); }) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..8a8e5f6d50d18ed3ee012fb3f416fce87a9aed18 100755 GIT binary patch delta 273 zcmew?^;^oppozDfjZ>@5qwPB{BRkWACf*F7PznlG85)_Qz6z@#Ads$7fn`}}W5Umd>ZefgMR@7bN-)7yBrSw&r3 K^&;lD6bAs==wf>S delta 256 zcmew@^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJq6V`p_TXkxURY{#>< z-pIhhz}(Qt#5l@8A8rmOi=h&WLSKQD9+y*f@YLJZH { console.info('ActsAmsTestFourthScene beforeAll clearMission error.code \ @@ -234,9 +234,10 @@ describe('ActsAmsTestFourthScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_5500 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await abilityManager.clearMission(result[0].id); - expect(typeof (info)).assertEqual("number"); - expect(info).assertEqual(0); + var info = await abilityManager.clearMission(result[0].id).catch(err => { + console.log('Acts_Ams_test_5500 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); done(); setTimeout(timeout, 5000); }) @@ -252,9 +253,11 @@ describe('ActsAmsTestFourthScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_5900 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.moveMissionToFront(result[0].missionId); + var info = await missionManager.moveMissionToFront(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_5900 moveMissionToFront failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_5900 moveMissionToFront data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -270,9 +273,11 @@ describe('ActsAmsTestFourthScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_6100 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearAllMissions(); + var info = await missionManager.clearAllMissions().catch(err => { + console.log('Acts_Ams_test_6100 clearMissionInfos failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_6100 clearAllMissions data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamstestfourthscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..d9943d2b89d1b6c1f37c96c330fb3ac1fb15fe54 100755 GIT binary patch delta 274 zcmew?^+(FVpozDFjZ>@5qwPB{BRkWACf-b-P%0B6qam*WHydX{n+IbmGYb==K@+Pa zLLuXVCRQ$%CRVnM4tXqcsTGO21v#mDiOD6!iMhoksl_E}`K3iA8O6z|d8wNZvE;FH zIT|!E+5(L=$ex_YnmTztk8{1TfrX)=sga>+lz~3nXigSGB^HIt0lT!CgHGmh7G6nQ z<&_-0CL#ab#8iRO8^WeTBra3 delta 256 zcmew(^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJb1V`p_TXkxURY|pc{ z-pIhhz}(Qt#5l@8A8rmOi=h&WLSKQD9+y*f@YLJZH { + console.log('Acts_Ams_test_2700 moveMissionToFront failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_2700 moveMissionToFront data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -173,7 +174,6 @@ describe('ActsAmsTestSecondScene', function () { it('Acts_Ams_test_1900', 0, async function (done) { var maxnum = 20; var data = await missionManager.getMissionInfos("", maxnum); - console.info('Acts_Ams_test_1900 getMissionInfos data ' + JSON.stringify(data)); expect(Array.isArray(data)).assertEqual(true); expect(data.length).assertEqual(3); for (var i = 0; i < data.length; i++) { @@ -208,9 +208,11 @@ describe('ActsAmsTestSecondScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_2300 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearMission(result[0].missionId); + var info = await missionManager.clearMission(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_2300 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_2300 clearMission data [' + info + ']'); - expect(info).assertEqual(0); done(); setTimeout(timeout, 5000); }) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..11c4de2f70e08c0b42ec6d6483c91a18304131e6 100755 GIT binary patch delta 256 zcmew?^;gQlpozDVjZ>@5qwPB{BRkWACf+QdP#O~>qam*WHydX{n+IbmGYb==K@+Pa zLLuXVCRQ$%CRVnM4tXqcsTGO21v#mDiOD6!iMhoksl_G5smb|yDaFaDd8wNZu_$oV z8yi>{8k!m#n?@Pv!_DDjF;rqvV0v`Mr?17vPw?%m2cMM|Y*&Zk?^uwQHsp0z= s&AtGY95MTH`VXJElN`gAiOesBelXo$*AVnLwn=^cKI=EDJmy>j0I+*oUjP6A delta 246 zcmew>^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJZp;HWn;urM$;G%_)c zGSG+X=43HcVo~TTkkaFlsuuOLRa&FnGDG#*;rC{NK4K4-q<<+${;_|C0T&ww&|T+j zS(uqvJPh2J6d9fc*`~}t8oNh2+ST;S?}=9w7NlP2oU%1{(^LlGM;`^=0F}&(*l2o& iX~DXXzn`bBe=o$k%6selYL(@T2cI{b-S&`u4Icom^HvW4 diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json index 0c5e798ef..bfa361843 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/config.json @@ -61,6 +61,14 @@ { "name":"ohos.permission.CLEAN_BACKGROUND_PROCESSES", "reason":"need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" + }, + { + "name":"ohos.permission.MANAGE_MISSIONS", + "reason":"need use ohos.permission.MANAGE_MISSIONS" + }, + { + "name":"ohos.permission.GET_RUNNING_INFO", + "reason":"need use ohos.permission.GET_RUNNING_INFO" } ], "js": [ diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js index 17677f590..8fca0df6a 100644 --- a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js @@ -190,9 +190,11 @@ describe('ActsAmsTestThirdScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_3900 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearMission(result[1].missionId); + var info = await missionManager.clearMission(result[1].missionId).catch(err => { + console.log('Acts_Ams_test_3900 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_3900 clearMission data [' + info + ']'); - expect(info.code).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -208,9 +210,11 @@ describe('ActsAmsTestThirdScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_4300 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.moveMissionToFront(result[0].missionId); + var info = await missionManager.moveMissionToFront(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_4300 moveMissionToFront failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_4300 moveMissionToFront data [' + info + ']'); - expect(info.code).assertEqual(0); done(); setTimeout(timeout, 5000); }) @@ -226,9 +230,11 @@ describe('ActsAmsTestThirdScene', function () { for (var i = 0; i < result.length; i++) { console.info('Acts_Ams_test_4500 getMissionInfos result[' + i + "]: " + JSON.stringify(result[i])); } - var info = await missionManager.clearMission(result[0].missionId); + var info = await missionManager.clearMission(result[0].missionId).catch(err => { + console.log('Acts_Ams_test_4500 clearMission failed: ' + err); + expect(err).assertEqual(0); + }); console.info('Acts_Ams_test_4500 clearMission data [' + info + ']'); - expect(info.code).assertEqual(0); done(); setTimeout(timeout, 5000); }) diff --git a/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..cd17207278e8f3aa00b962bdd866d781e748fd04 100755 GIT binary patch delta 273 zcmew?^;^oppozDfjZ>@5qwPB{BRkWACf*F7Pzn@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHlJq6V`p_TXkxURY{#>< z-pIhhz}(Qt#5l@8A8rmOi=h&WLSKQD9+y*f@YLJZH@5qwPB{BRkWACf+2VP#hB@qam*WHydX{n+IbmGYb==K@+PG zLLuXVCRS#aCYJvj9r9SjQ!5g43vyERaw`)H3UV@&6H7Al^9&6)A7aU4=W;Y?VzdRC zXOKNPku`Pld>-d|V*?9ABLgE-qbLJ?xS5d}+`ls`7$V&ee1_M9yXGZTxufh&_jMu}!sCQIe4o!ONl?$>X4FYvv{ zZ6+}>E#J)b@7gSKXwNomqI5gz3!ufqmByyGl E09jjJj{pDw delta 267 zcmew=^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHXmilW9M-)XkxSj8fK7f zkUZId!+vrdPkOzPfrWv&p^=Gklz~3nNKO_*B^HIg0x3N%scKO_TctJHEi+V~9e!^X z=p*)UN&1(9fOam=>%H`TKe5`u9SttGu_)uU1*kc<_0{*=-Nm*YE)V DE_GW> diff --git a/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/config.json b/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/config.json index 3d2062169..72fe0cd57 100644 --- a/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/config.json +++ b/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/config.json @@ -56,6 +56,10 @@ { "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" + }, + { + "name":"ohos.permission.MANAGE_MISSIONS", + "reason":"need use ohos.permission.MANAGE_MISSIONS" } ], "js": [ diff --git a/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js b/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js index a69c29d1e..89ada001b 100644 --- a/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/abilitymanager/clearmissionscallback/src/main/js/test/MangerAbilityJsunit.test.js @@ -54,8 +54,8 @@ describe('ActsAmsCallBackSixth Scene', function () { missionManager.clearAllMissions( (error,info) => { console.info('Acts_Ams_test_12200 clearMissions error.code ' + error.code + ',data [' + info + ']' ); - expect(typeof(info)).assertEqual("number"); - expect(info).assertEqual(0); + expect(typeof(error.code)).assertEqual("number"); + expect(error.code).assertEqual(0); }); done(); }) diff --git a/aafwk/aafwk_standard/abilitymanager/clearmissionspromise/signature/systemui.p7b b/aafwk/aafwk_standard/abilitymanager/clearmissionspromise/signature/systemui.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..4e2e2a9f1f22dd4d85abd1d133ea480f1e099ee2 100644 GIT binary patch delta 268 zcmew?^-apbpozDLjZ>@5qwPB{BRkWACf;PAP&^YOqam*WHydX{n+IbmGYb==K@+Pm zLLuXVCRP@fCRT=x4tXpRsTGO21v#mDxs{0p1v#0?i6xo&d4`6Dn-8(%v2!^ZG%?x& z4K&D}oXDCwc|MPGy|JNzfuX6fk!h5HKHN}F7DFW#h0Gt<7kIH52uP+pl3A|%R8k<# z-T&8D{%6b2?pU`p%$u#$9m;B4?{*2q06l!lRi`sHC<%H4KLT$#!vVzXRL05Z(-zmCVZBjT?WmU-u E0K#TkD*ylh delta 267 zcmew+^;ycnpour1jZ>@5qwPB{BRkWACf)>~Pz)0zqam*WHydX{n+IbmGYb==K@%%K zLLuXVCRPTPCYC=N9r9R2{0ma^JQ9m?^Ybe85(^6SN>YnUHXmcjW9M-)XkxSj8fK7f zkUZIt!+vr-PkOzPfrWv&p^=Gklz~3nNKO_*B^HIg0x3N%scKO_TctJHEi+V~9e!^X z=p*)UN&1(9fOam=>%H`TKe5`u9SttGu_)uU1*kc<_0{*=-Nm*YE)V DF { + console.log('Acts_Ams_test_12100 clearAllMission failed: ' + err); + expect(err).assertEqual(0); + }); + console.info('Acts_Ams_test_12100 clearAllMissions data [' + info + ']'); done(); }) }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/Test.json b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/Test.json index 367f021d9..9194f84eb 100644 --- a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/Test.json +++ b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/Test.json @@ -2,7 +2,7 @@ "description": "Configuration for hjunit demo Tests", "driver": { "type": "JSUnitTest", - "test-timeout": "18000", + "test-timeout": "300000", "package": "com.amsst.amsMissionSnapshotTest", "shell-timeout": "600000" }, diff --git a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/config.json b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/config.json index 8be704894..d65e567e5 100644 --- a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/config.json +++ b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/config.json @@ -55,6 +55,10 @@ { "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" + }, + { + "name":"ohos.permission.MANAGE_MISSIONS", + "reason":"need use ohos.permission.MANAGE_MISSIONS" } ], "js": [ diff --git a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/default/pages/index/index.js index 4bfa4f7e4..42033ba07 100644 --- a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/default/pages/index/index.js +++ b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/default/pages/index/index.js @@ -35,6 +35,7 @@ export default { core.init() const configService = core.getDefaultService('config') configService.setConfig(this) + this.timeout = 10000 require('../../../test/List.test') core.execute() diff --git a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js index c8f8c33e1..81b73013c 100644 --- a/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js +++ b/aafwk/aafwk_standard/amsabilitymanager/amsMissionSnapshotTest/entry/src/main/js/test/amsMissionSnapshotTest.test.js @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import abilityManager from '@ohos.app.abilityManager' import featureAbility from '@ohos.ability.featureAbility' +import missionManager from '@ohos.application.missionManager' import commonEvent from '@ohos.commonEvent' import image from '@ohos.multimedia.image' @@ -41,23 +41,21 @@ describe('ActsMissionSnapshotTest', function () { /* * @tc.number: ACTS_MissionSnapshot_0100 - * @tc.name: getAbilityMissionSnapshot + * @tc.name: getMissionSnapshot * @tc.desc: Recent task stack provides current screenshot.(AsyncCallback) */ it('ACTS_MissionSnapshot_0100', 0, async function (done) { console.debug('ACTS_MissionSnapshot_0100==== { - expect(err.code).assertEqual(0); - console.debug("=ACTS_MissionSnapshot_0100 err,data=======>" - + ("json data【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data.topAbility.bundleName).assertEqual(""); - expect(data.topAbility.abilityName).assertEqual(""); + await missionManager.getMissionSnapShot("", -1, (err, data) => { + expect(err.code).assertEqual(2097172); + console.debug("=ACTS_MissionSnapshot_0100 err.code,data=======>" + + err.code + ("json data【") + JSON.stringify(data) + (" 】") + " , " + data); console.debug('ACTS_MissionSnapshot_0100==== { + await missionManager.getMissionInfos("", upperLimit, async (err, data) => { console.debug("=ACTS_MissionSnapshot_0200 err,data=======>" + ("json err【") + JSON.stringify(err) + (" 】") + ("json data【") + JSON.stringify(data) + (" 】") + " ,err=" + err + " ,data=" + data); - console.debug('ACTS_MissionSnapshot_0200 AbilityMissionInfo data.length ====>: ' + data.length); + console.debug('ACTS_MissionSnapshot_0200 MissionInfo data.length ====>: ' + data.length); if (!data.length) { m_missionId = -99; - m_topAbility_bundleName = ""; - m_topAbility_abilityName = ""; + m_bundleName = ""; + m_abilityName = ""; expect("if (!data.length) ").assertEqual("0"); console.debug('ACTS_MissionSnapshot_0200====" + m_missionId); - await abilityManager.getAbilityMissionSnapshot(m_missionId, (err, data) => { + await missionManager.getMissionSnapShot("", m_missionId, async (err, data) => { expect(err.code).assertEqual(0); console.debug("=ACTS_MissionSnapshot_0200 err,data=======>" + ("json data【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data.topAbility.bundleName).assertEqual(m_topAbility_bundleName); - expect(data.topAbility.abilityName).assertEqual(m_topAbility_abilityName); + expect(data.ability.bundleName).assertEqual(m_bundleName); + expect(data.ability.abilityName).assertEqual(m_abilityName); console.debug("=ACTS_MissionSnapshot_0200 ====> JSON.stringify(data.snapshot)=" + JSON.stringify(data.snapshot) + " , " + data.snapshot); - try { - data.snapshot.getPixelBytesNumber().then(function (data){ - console.debug("=ACTS_MissionSnapshot_0200 ====>" - +"(data.snapshot.getPixelBytesNumber()=)" + data) - expect(data > 0).assertEqual(true); - console.debug('ACTS_MissionSnapshot_0200==== { + await missionManager.getMissionInfos("", upperLimit, async (err, data) => { console.debug("=ACTS_MissionSnapshot_0300 err,data=======>" + ("json err【") + JSON.stringify(err) + (" 】") + ("json data【") + JSON.stringify(data) + (" 】") + " ,err=" + err + " ,data=" + data); - console.debug('ACTS_MissionSnapshot_0300 AbilityMissionInfo data.length ====>' + console.debug('ACTS_MissionSnapshot_0300 MissionInfo data.length ====>' + data.length); if (!data.length) { m_missionId = -99; - m_topAbility_bundleName = ""; - m_topAbility_abilityName = ""; + m_bundleName = ""; + m_abilityName = ""; expect("if (!data.length) ").assertEqual(0); unsubscribe("if (!data.length) ", subscriber); console.debug('ACTS_MissionSnapshot_0300====" + m_missionId); - await abilityManager.getAbilityMissionSnapshot(m_missionId, (err, data) => { + await missionManager.getMissionSnapShot("", m_missionId, async (err, data) => { expect(err.code).assertEqual(0); console.debug("=ACTS_MissionSnapshot_0300 then data====>" + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); try { - expect(data.topAbility.bundleName).assertEqual(m_topAbility_bundleName); - expect(data.topAbility.abilityName).assertEqual(m_topAbility_abilityName); - data.snapshot.getPixelBytesNumber().then(function (data){ - console.debug("=ACTS_MissionSnapshot_0300 ====> " - +("data.snapshot.getPixelBytesNumber()=" + data)) - expect(data > 0).assertEqual(true); - unsubscribe(".then() ", subscriber); - console.debug('ACTS_MissionSnapshot_0300====" + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data.topAbility.bundleName).assertEqual(""); - expect(data.topAbility.abilityName).assertEqual(""); console.debug('ACTS_MissionSnapshot_0400====" + ("json err 【") + JSON.stringify(err) + (" 】 ")); - expect(err).assertEqual("false"); + expect(err.code).assertEqual(2097172); console.debug('ACTS_MissionSnapshot_0400==== { + await missionManager.getMissionInfos("", upperLimit, async (err, data) => { console.debug("=ACTS_MissionSnapshot_0500 err,data=======>" + ("json err【") + JSON.stringify(err) + (" 】") + ("json data【") + JSON.stringify(data) + (" 】") + " ,err=" + err + " ,data=" + data); - console.debug('ACTS_MissionSnapshot_0500 AbilityMissionInfo data.length ====>: ' + data.length); + console.debug('ACTS_MissionSnapshot_0500 MissionInfo data.length ====>: ' + data.length); if (!data.length) { m_missionId = -99; - m_topAbility_bundleName = ""; - m_topAbility_abilityName = ""; + m_bundleName = ""; + m_abilityName = ""; expect("if (!data.length) ").assertEqual(0); console.debug('ACTS_MissionSnapshot_0500====" + m_missionId); - abilityManager.getAbilityMissionSnapshot(m_missionId) + missionManager.getMissionSnapShot("", m_missionId) .then(function (data) { console.debug("=ACTS_MissionSnapshot_0500 then data====>" + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); - expect(data.topAbility.bundleName).assertEqual(m_topAbility_bundleName); - expect(data.topAbility.abilityName).assertEqual(m_topAbility_abilityName); + expect(data.ability.bundleName).assertEqual(m_bundleName); + expect(data.ability.abilityName).assertEqual(m_abilityName); console.debug("=ACTS_MissionSnapshot_0500 err,data=======> JSON.stringify(data.snapshot)=" + JSON.stringify(data.snapshot) + " , " + data.snapshot); - try { - data.snapshot.getPixelBytesNumber().then(function (data){ - console.debug("=ACTS_MissionSnapshot_0500 ====> " - +("data.snapshot.getPixelBytesNumber()=" + data)) - expect(data > 0).assertEqual(true); - console.debug('ACTS_MissionSnapshot_0500====" + ("json err 【") + JSON.stringify(err) + (" 】 ")); @@ -336,7 +300,7 @@ describe('ActsMissionSnapshotTest', function () { } /* * @tc.number: ACTS_MissionSnapshot_0600 - * @tc.name: getAbilityMissionSnapshot + * @tc.name: getMissionSnapshot * @tc.desc: Recent task stack provides current screenshot.(Promise) */ it('ACTS_MissionSnapshot_0600', 0, async function (done) { @@ -364,46 +328,39 @@ describe('ActsMissionSnapshotTest', function () { unsubscribe("subscribe", subscriber); var m_missionId = -1; - var m_topAbility_bundleName = ""; - var m_topAbility_abilityName = ""; + var m_bundleName = ""; + var m_abilityName = ""; var upperLimit = 10; - await abilityManager.getActiveAbilityMissionInfos(upperLimit, (err, data) => { + await missionManager.getMissionInfos("", upperLimit, (err, data) => { console.debug("=ACTS_MissionSnapshot_0600 err,data=======>" + ("json err【") + JSON.stringify(err) + (" 】") + ("json data【") + JSON.stringify(data) + (" 】") + " ,err=" + err + " ,data=" + data); - console.debug('ACTS_MissionSnapshot_0600 AbilityMissionInfo data.length ====>' + console.debug('ACTS_MissionSnapshot_0600 MissionInfo data.length ====>' + data.length); if (!data.length) { m_missionId = -99; - m_topAbility_bundleName = ""; - m_topAbility_abilityName = ""; + m_bundleName = ""; + m_abilityName = ""; expect("if (!data.length) ").assertEqual(0); unsubscribe("if (!data.length) ", subscriber); console.debug('ACTS_MissionSnapshot_0600====" + m_missionId); - abilityManager.getAbilityMissionSnapshot(m_missionId).then(function (data) { + missionManager.getMissionSnapShot("", m_missionId).then(function (data) { console.debug("=ACTS_MissionSnapshot_0600 then data====>" + ("json data 【") + JSON.stringify(data) + (" 】") + " , " + data); try { - expect(data.topAbility.bundleName).assertEqual(m_topAbility_bundleName); - expect(data.topAbility.abilityName).assertEqual(m_topAbility_abilityName); + expect(data.ability.bundleName).assertEqual(m_bundleName); + expect(data.ability.abilityName).assertEqual(m_abilityName); console.debug("=ACTS_MissionSnapshot_0600=====> JSON.stringify(data.snapshot)=" + JSON.stringify(data.snapshot) + " , " + data.snapshot); - data.snapshot.getPixelBytesNumber().then(function (data){ - console.debug("=ACTS_MissionSnapshot_0600 ====> " - +("data.snapshot.getPixelBytesNumber()=" + data)) - expect(data > 0).assertEqual(true); - unsubscribe(".then() ", subscriber); - console.debug('ACTS_MissionSnapshot_0600===={ console.log('ACTS_StartAbility_0800 asyncCallback errCode : ' + JSON.stringify(err) + " data: " + JSON.stringify(data)); - expect(err.code == 2097155).assertTrue(); + expect(err.code != 0).assertTrue(); done(); }); }catch(error){ @@ -2637,7 +2637,7 @@ describe('ActsFeatureAbilityTest', function () { featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ console.log('ACTS_StartAbility_1100 asyncCallback errCode : ' + JSON.stringify(err) + " data: " + JSON.stringify(data)); - expect(err.code == 2097155).assertTrue(); + expect(err.code != 0).assertTrue(); done(); }); }catch(error){ @@ -2665,7 +2665,7 @@ describe('ActsFeatureAbilityTest', function () { featureAbility.startAbility(StartAbilityParameter,(err,data)=>{ console.log('ACTS_StartAbility_1200 asyncCallback errCode : ' + JSON.stringify(err) + " data: " + JSON.stringify(data)); - expect(err.code == 2097155).assertTrue(); + expect(err.code != 0).assertTrue(); done(); }); }catch(error){ @@ -2777,7 +2777,8 @@ describe('ActsFeatureAbilityTest', function () { expect().assertFail(); done(); }).catch((err)=>{ - expect(err.code == 2097155).assertTrue(); + expect(err.code != 0).assertTrue(); + done(); }); }); @@ -2795,7 +2796,8 @@ describe('ActsFeatureAbilityTest', function () { expect().assertFail(); done(); }).catch((err)=>{ - expect(err.code == -104).assertTrue(); + expect(err.code != 0).assertTrue(); + done(); }); }); @@ -2812,7 +2814,8 @@ describe('ActsFeatureAbilityTest', function () { expect().assertFail(); done(); }).catch((err)=>{ - expect(err.code == -104).assertTrue(); + expect(err.code != 0).assertTrue(); + done(); }); }); -- GitLab