From e32f41f740322dc0f2faec91814a2d217cc50433 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Thu, 18 Jul 2024 16:58:16 +0800 Subject: [PATCH 01/12] 1 Signed-off-by: zhaiyuqi --- .../src/ohosTest/ets/test/Ability.test.ets | 169 +++++++++++++++--- 1 file changed, 142 insertions(+), 27 deletions(-) diff --git a/function/notification/entry/src/ohosTest/ets/test/Ability.test.ets b/function/notification/entry/src/ohosTest/ets/test/Ability.test.ets index 24cdb3416..a942824e7 100644 --- a/function/notification/entry/src/ohosTest/ets/test/Ability.test.ets +++ b/function/notification/entry/src/ohosTest/ets/test/Ability.test.ets @@ -1,10 +1,10 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,36 +15,151 @@ import hilog from '@ohos.hilog'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; +import Base from '@ohos.base'; +import notificationManager from '@ohos.notificationManager'; export default function abilityTest() { describe('ActsAbilityTest', () => { - // Defines a test suite. Two parameters are supported: test suite name and test suite function. - beforeAll(() => { - // Presets an action, which is performed only once before all test cases of the test suite start. - // This API supports only one parameter: preset action function. - }) - beforeEach(() => { - // Presets an action, which is performed before each unit test case starts. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: preset action function. + + /* + * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0100 + * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0100 + */ + it('Sub_Notification_Ans_NoDistrub_Repetition_0100', 3, () => { + hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it begin'); + + let notificationRequest: notificationManager.NotificationRequest = { + id: 1, + content: { + notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: "test_title", + text: "test_text", + additionalText: "test_additionalText" + } + }, + appMessageId:null + }; + + try{ + notificationManager.publish(notificationRequest) + .then(() => { + hilog.info(0x0001, 'MyTest', '%{public}s', "appMessageId success, data: void"/* + JSON.stringify(data)*/); + expect().assertFail() + }) + } + catch(err){ + hilog.info(0x0001, 'MyTest', '%{public}s', `appMessageId fail! code: ${err.code}, message: ${err.message}`); + expect(err.code).assertEqual(401); + } + + hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it end'); }) - afterEach(() => { - // Presets a clear action, which is performed after each unit test case ends. - // The number of execution times is the same as the number of test cases defined by **it**. - // This API supports only one parameter: clear action function. + + /* + * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0200 + * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0200 + */ + it('Sub_Notification_Ans_NoDistrub_Repetition_0200', 3, () => { + hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it begin'); + + let notificationRequest: notificationManager.NotificationRequest = { + id: 1, + content: { + notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: "test_title", + text: "test_text", + additionalText: "test_additionalText" + } + }, + appMessageId:undefined + }; + + try{ + notificationManager.publish(notificationRequest) + .then(() => { + hilog.info(0x0001, 'MyTest', '%{public}s', "appMessageId success, data: void"/* + JSON.stringify(data)*/); + expect().assertFail() + }) + } + catch(err){ + hilog.info(0x0001, 'MyTest', '%{public}s', `appMessageId fail! code: ${err.code}, message: ${err.message}`); + expect(err.code).assertEqual(401); + } + + hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it end'); }) - afterAll(() => { - // Presets a clear action, which is performed after all test cases of the test suite end. - // This API supports only one parameter: clear action function. + + /* + * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0400 + * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0400 + */ + it('Sub_Notification_Ans_NoDistrub_Repetition_0400', 3, () => { + hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it begin'); + + let notificationRequest: notificationManager.NotificationRequest = { + id: 1, + content: { + notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: "test_title", + text: "test_text", + additionalText: "test_additionalText" + } + }, + unifiedGroupInfo:null + }; + + try{ + notificationManager.publish(notificationRequest) + .then(() => { + hilog.info(0x0001, 'MyTest', '%{public}s', "unifiedGroupInfo success, data: void"/* + JSON.stringify(data)*/); + expect().assertFail() + }) + } + catch(err){ + hilog.info(0x0001, 'MyTest', '%{public}s', `unifiedGroupInfo fail! code: ${err.code}, message: ${err.message}`); + expect(err.code).assertEqual(401); + } + + hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it end'); }) - it('assertContain', 0, () => { - // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. - hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); - let a = 'abc'; - let b = 'b'; - // Defines a variety of assertion methods, which are used to declare expected boolean conditions. - expect(a).assertContain(b); - expect(a).assertEqual(a); + + /* + * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0500 + * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0500 + */ + it('Sub_Notification_Ans_NoDistrub_Repetition_0500', 3, () => { + hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it begin'); + + let notificationRequest: notificationManager.NotificationRequest = { + id: 1, + content: { + notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: "test_title", + text: "test_text", + additionalText: "test_additionalText" + } + }, + unifiedGroupInfo:undefined + }; + + try{ + notificationManager.publish(notificationRequest) + .then(() => { + hilog.info(0x0001, 'MyTest', '%{public}s', "unifiedGroupInfo success, data: void"/* + JSON.stringify(data)*/); + expect().assertFail() + }) + } + catch(err){ + hilog.info(0x0001, 'MyTest', '%{public}s', `unifiedGroupInfo fail! code: ${err.code}, message: ${err.message}`); + expect(err.code).assertEqual(401); + } + + hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it end'); }) + }) } \ No newline at end of file -- Gitee From 0202584105383798cbe1e55fa6595a626a3228e9 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Thu, 18 Jul 2024 17:04:22 +0800 Subject: [PATCH 02/12] 2 Signed-off-by: zhaiyuqi --- .../src/ohosTest/ets/test/{Ability.test.ets => test-zhaiyuqi.ets} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename function/notification/entry/src/ohosTest/ets/test/{Ability.test.ets => test-zhaiyuqi.ets} (100%) diff --git a/function/notification/entry/src/ohosTest/ets/test/Ability.test.ets b/function/notification/entry/src/ohosTest/ets/test/test-zhaiyuqi.ets similarity index 100% rename from function/notification/entry/src/ohosTest/ets/test/Ability.test.ets rename to function/notification/entry/src/ohosTest/ets/test/test-zhaiyuqi.ets -- Gitee From 90098ac77f11201d76c8f81c75f54928cd334b16 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Thu, 18 Jul 2024 17:09:07 +0800 Subject: [PATCH 03/12] 3 Signed-off-by: zhaiyuqi --- .../ets/test/{test-zhaiyuqi.ets => notificationManagerTest.ets} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename function/notification/entry/src/ohosTest/ets/test/{test-zhaiyuqi.ets => notificationManagerTest.ets} (100%) diff --git a/function/notification/entry/src/ohosTest/ets/test/test-zhaiyuqi.ets b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.ets similarity index 100% rename from function/notification/entry/src/ohosTest/ets/test/test-zhaiyuqi.ets rename to function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.ets -- Gitee From a8f7e37fe3b6cfc15177a4417070c59de4ec3464 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Thu, 18 Jul 2024 17:16:42 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- ...tificationManagerTest.ets => notificationManagerTest.test.ets} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename function/notification/entry/src/ohosTest/ets/test/{notificationManagerTest.ets => notificationManagerTest.test.ets} (100%) diff --git a/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.ets b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets similarity index 100% rename from function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.ets rename to function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets -- Gitee From cc92554b9192421582c0c53aaf15f2d5a10509c5 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Thu, 18 Jul 2024 17:45:44 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- function/notification/build-profile.json5 | 12 +++++++++++ .../entry/src/ohosTest/ets/test/List.test.ets | 2 +- .../entry/src/ohosTest/module.json5 | 10 +++++++++ function/notification/oh-package-lock.json5 | 21 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/build-profile.json5 b/function/notification/build-profile.json5 index b1ea9297e..a475311e8 100644 --- a/function/notification/build-profile.json5 +++ b/function/notification/build-profile.json5 @@ -16,6 +16,18 @@ { "app": { "signingConfigs": [ + { + "name": "default", + "material": { + "certpath": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.cer", + "storePassword": "0000001A01BADE8666DD21D0480471DFEC1CF1A511C85F19FE8A7D2D36C64F036213F8DD5007AC5B7824", + "keyAlias": "debugKey", + "keyPassword": "0000001A820DCA5EC9BE8DD3CC71EE7B106E9FCBECC0F04B44F3718FBCB58E840302C3ED432192597107", + "profile": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.p12" + } + } ], "products": [ { diff --git a/function/notification/entry/src/ohosTest/ets/test/List.test.ets b/function/notification/entry/src/ohosTest/ets/test/List.test.ets index 657d19416..184256daa 100644 --- a/function/notification/entry/src/ohosTest/ets/test/List.test.ets +++ b/function/notification/entry/src/ohosTest/ets/test/List.test.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import abilityTest from './Ability.test'; +import abilityTest from './notificationManagerTest.test'; export default function testsuite() { abilityTest(); diff --git a/function/notification/entry/src/ohosTest/module.json5 b/function/notification/entry/src/ohosTest/module.json5 index 10f04ece9..f17efc583 100644 --- a/function/notification/entry/src/ohosTest/module.json5 +++ b/function/notification/entry/src/ohosTest/module.json5 @@ -26,6 +26,16 @@ "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:test_pages", + + "requestPermissions": [ + { + "name":"ohos.permission.OHOS_PERMISSION_NOTIFICATION_AGENT_CONTROLLER" + }, + { + "name":"ohos.permission.NOTIFICATION_CONTROLLER" + } + ], + "abilities": [ { "name": "TestAbility", diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 new file mode 100644 index 000000000..d28bd55fd --- /dev/null +++ b/function/notification/oh-package-lock.json5 @@ -0,0 +1,21 @@ +{ + "lockfileVersion": 2, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" + }, + "packages": { + "@ohos/hypium@1.0.13": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", + "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", + "registryType": "ohpm", + "shasum": "88d8dda420097efb98d770bf59616faef4682f06" + }, + "@ohos/hamock@1.0.0": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "registryType": "ohpm" + } + } +} \ No newline at end of file -- Gitee From 4d2de9854a47e6693346209da6a69092c382c1c3 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Fri, 19 Jul 2024 15:41:19 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=89=88=E6=9D=83?= =?UTF-8?q?=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- .../src/ohosTest/ets/test/notificationManagerTest.test.ets | 6 +++--- function/notification/entry/src/ohosTest/module.json5 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets index a942824e7..ae1ae7516 100644 --- a/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets +++ b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/function/notification/entry/src/ohosTest/module.json5 b/function/notification/entry/src/ohosTest/module.json5 index f17efc583..34c979039 100644 --- a/function/notification/entry/src/ohosTest/module.json5 +++ b/function/notification/entry/src/ohosTest/module.json5 @@ -1,10 +1,10 @@ -/** - * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, -- Gitee From d9544e10a780115cbb5437d2500375f1596d4d89 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Fri, 19 Jul 2024 17:17:40 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- function/notification/oh-package-lock.json5 | 21 ------------------- .../UIAttributeFontInterface001.test.ets | 14 +++++++++++++ 2 files changed, 14 insertions(+), 21 deletions(-) delete mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 deleted file mode 100644 index d28bd55fd..000000000 --- a/function/notification/oh-package-lock.json5 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "lockfileVersion": 2, - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", - "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" - }, - "packages": { - "@ohos/hypium@1.0.13": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", - "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", - "registryType": "ohpm", - "shasum": "88d8dda420097efb98d770bf59616faef4682f06" - }, - "@ohos/hamock@1.0.0": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", - "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", - "registryType": "ohpm" - } - } -} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets index 2e013f975..0b7cd35b3 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import Settings from '../model/Settings' import windowSnap from '../model/snapShot' -- Gitee From 9b7473bec1b73bd1f190b205780bdc3d7036f749 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Fri, 19 Jul 2024 17:38:31 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- function/notification/build-profile.json5 | 14 -------------- function/notification/oh-package-lock.json5 | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/build-profile.json5 b/function/notification/build-profile.json5 index a475311e8..4d8153c8a 100644 --- a/function/notification/build-profile.json5 +++ b/function/notification/build-profile.json5 @@ -15,20 +15,6 @@ { "app": { - "signingConfigs": [ - { - "name": "default", - "material": { - "certpath": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.cer", - "storePassword": "0000001A01BADE8666DD21D0480471DFEC1CF1A511C85F19FE8A7D2D36C64F036213F8DD5007AC5B7824", - "keyAlias": "debugKey", - "keyPassword": "0000001A820DCA5EC9BE8DD3CC71EE7B106E9FCBECC0F04B44F3718FBCB58E840302C3ED432192597107", - "profile": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "C:/Users/kaihong/.ohos/config/openharmony/default_notification_9zBoHPC5AiAooBfN76F7SPi_7cjMcIX3TfXnzZODrYo=.p12" - } - } - ], "products": [ { "name": "default", diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 new file mode 100644 index 000000000..d28bd55fd --- /dev/null +++ b/function/notification/oh-package-lock.json5 @@ -0,0 +1,21 @@ +{ + "lockfileVersion": 2, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" + }, + "packages": { + "@ohos/hypium@1.0.13": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", + "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", + "registryType": "ohpm", + "shasum": "88d8dda420097efb98d770bf59616faef4682f06" + }, + "@ohos/hamock@1.0.0": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "registryType": "ohpm" + } + } +} \ No newline at end of file -- Gitee From 5db17794220e5b3c1d34ac88250ab5728b9a26a0 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Mon, 22 Jul 2024 09:58:09 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- function/notification/oh-package-lock.json5 | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 deleted file mode 100644 index d28bd55fd..000000000 --- a/function/notification/oh-package-lock.json5 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "lockfileVersion": 2, - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", - "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" - }, - "packages": { - "@ohos/hypium@1.0.13": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", - "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", - "registryType": "ohpm", - "shasum": "88d8dda420097efb98d770bf59616faef4682f06" - }, - "@ohos/hamock@1.0.0": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", - "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", - "registryType": "ohpm" - } - } -} \ No newline at end of file -- Gitee From 2d328f6d32af80c8e64130a0e3edb7c277508ea3 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Mon, 22 Jul 2024 14:28:06 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- .../ets/test/notificationManagerTest.test.ets | 70 ------------------- function/notification/oh-package-lock.json5 | 21 ++++++ 2 files changed, 21 insertions(+), 70 deletions(-) create mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets index ae1ae7516..48aba29f1 100644 --- a/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets +++ b/function/notification/entry/src/ohosTest/ets/test/notificationManagerTest.test.ets @@ -21,41 +21,6 @@ import notificationManager from '@ohos.notificationManager'; export default function abilityTest() { describe('ActsAbilityTest', () => { - /* - * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0100 - * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0100 - */ - it('Sub_Notification_Ans_NoDistrub_Repetition_0100', 3, () => { - hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it begin'); - - let notificationRequest: notificationManager.NotificationRequest = { - id: 1, - content: { - notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, - normal: { - title: "test_title", - text: "test_text", - additionalText: "test_additionalText" - } - }, - appMessageId:null - }; - - try{ - notificationManager.publish(notificationRequest) - .then(() => { - hilog.info(0x0001, 'MyTest', '%{public}s', "appMessageId success, data: void"/* + JSON.stringify(data)*/); - expect().assertFail() - }) - } - catch(err){ - hilog.info(0x0001, 'MyTest', '%{public}s', `appMessageId fail! code: ${err.code}, message: ${err.message}`); - expect(err.code).assertEqual(401); - } - - hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it end'); - }) - /* * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0200 * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0200 @@ -91,41 +56,6 @@ export default function abilityTest() { hilog.info(0x0001, 'test1', '%{public}s', 'appMessageId it end'); }) - /* - * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0400 - * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0400 - */ - it('Sub_Notification_Ans_NoDistrub_Repetition_0400', 3, () => { - hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it begin'); - - let notificationRequest: notificationManager.NotificationRequest = { - id: 1, - content: { - notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, - normal: { - title: "test_title", - text: "test_text", - additionalText: "test_additionalText" - } - }, - unifiedGroupInfo:null - }; - - try{ - notificationManager.publish(notificationRequest) - .then(() => { - hilog.info(0x0001, 'MyTest', '%{public}s', "unifiedGroupInfo success, data: void"/* + JSON.stringify(data)*/); - expect().assertFail() - }) - } - catch(err){ - hilog.info(0x0001, 'MyTest', '%{public}s', `unifiedGroupInfo fail! code: ${err.code}, message: ${err.message}`); - expect(err.code).assertEqual(401); - } - - hilog.info(0x0001, 'test1', '%{public}s', 'unifiedGroupInfo it end'); - }) - /* * @tc.number Sub_Notification_Ans_NoDistrub_Repetition_0500 * @tc.name Sub_Notification_Ans_NoDistrub_Repetition_0500 diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 new file mode 100644 index 000000000..d28bd55fd --- /dev/null +++ b/function/notification/oh-package-lock.json5 @@ -0,0 +1,21 @@ +{ + "lockfileVersion": 2, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" + }, + "packages": { + "@ohos/hypium@1.0.13": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", + "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", + "registryType": "ohpm", + "shasum": "88d8dda420097efb98d770bf59616faef4682f06" + }, + "@ohos/hamock@1.0.0": { + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "registryType": "ohpm" + } + } +} \ No newline at end of file -- Gitee From f762d65253c5a0d89f841d33c3678621b6b1eb05 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Mon, 22 Jul 2024 14:29:43 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E4=B8=8D=E9=80=9A=E8=BF=87=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- function/notification/oh-package-lock.json5 | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 function/notification/oh-package-lock.json5 diff --git a/function/notification/oh-package-lock.json5 b/function/notification/oh-package-lock.json5 deleted file mode 100644 index d28bd55fd..000000000 --- a/function/notification/oh-package-lock.json5 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "lockfileVersion": 2, - "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", - "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13" - }, - "packages": { - "@ohos/hypium@1.0.13": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.13.tgz", - "integrity": "sha512-d0+XvDeAYk5Vgl6JQ8Q1G+NPmTyJI8qgZ1PwPfcUbx/dfyKVAAv9lz1XtVNhYypyWEKqAzu8zMAC9GuHo2Y53Q==", - "registryType": "ohpm", - "shasum": "88d8dda420097efb98d770bf59616faef4682f06" - }, - "@ohos/hamock@1.0.0": { - "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", - "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", - "registryType": "ohpm" - } - } -} \ No newline at end of file -- Gitee From 4c906790f87004da8964d33d2c170e4dcdf2efb4 Mon Sep 17 00:00:00 2001 From: zhaiyuqi Date: Mon, 22 Jul 2024 15:13:12 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E6=92=A4=E9=94=80=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaiyuqi --- .../UIAttributeFontInterface001.test.ets | 14 -------------- .../entry/src/ohosTest/ets/test/model/Settings.ets | 11 +++++------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets index 0b7cd35b3..2e013f975 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface001.test.ets @@ -1,17 +1,3 @@ -/* - * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import Settings from '../model/Settings' import windowSnap from '../model/snapShot' diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets index f64d2304c..3b86eb407 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets @@ -146,19 +146,19 @@ class Settings { this.windowCreateType = "createWindow" if (X == undefined) { - X = 10; + X = 0; } if (Y == undefined) { - Y = 200; + Y = 60; } if (width == undefined) { - width = 1000; + width = 720; } if (height == undefined) { - height = 1000; + height = 1220; } if (dpi == undefined) { - dpi = 400; + dpi = 290; } Logger.info(TAG, `params,pageURI=${pageURI},X=${X},Y=${Y},width=${width},height=${height},dpi=${dpi}`) this.changeDpi(dpi) @@ -213,7 +213,6 @@ class Settings { await sleep(200) this.setWindowSystemBarEnable(this.windowClass, []); }); - } } -- Gitee