diff --git a/resourceschedule/resourceschedule_standard/BUILD.gn b/resourceschedule/resourceschedule_standard/BUILD.gn index 7aab0b9e0d07e2b0f9fabd9675142fa9ee1623c3..569e4acd99afb98b956424ef8f6d0f54cede6597 100644 --- a/resourceschedule/resourceschedule_standard/BUILD.gn +++ b/resourceschedule/resourceschedule_standard/BUILD.gn @@ -21,6 +21,7 @@ group("resourceschedule_standard") { "continuoustaskrelyhap:ContinuousTaskRelyHap", "deviceusagestatisticsjsunit:resourceschedule_deviceusagestatisticsjsunit_js_test", "reminderagent:resourceschedule_reminderagent_js_test", + "reminderagentManager:resourceschedule_reminderagentmgr_js_test", "workscheduler:resourceschedule_workscheduler_js_test", ] } diff --git a/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/List.test.js b/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/List.test.js index f3bc65d89006da669b7e5787cf9036f4ea91f15f..56d3dee2db870697d80526c30b759eeeab19b8b1 100644 --- a/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/List.test.js +++ b/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/List.test.js @@ -14,9 +14,8 @@ */ import bundlestate_test from './BundleState.test.js' import DeviceUsageStatisticsJsTest from './DeviceUsageStatisticsJsunit.test.js' -import UsageStatisticsTest from './UsageStatistics.test.js' + export default function testsuite() { bundlestate_test() DeviceUsageStatisticsJsTest() - UsageStatisticsTest() } diff --git a/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/UsageStatistics.test.js b/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/UsageStatistics.test.js deleted file mode 100644 index 18b763be2a6ec2e54fc28f2f487f925142a058b4..0000000000000000000000000000000000000000 --- a/resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/test/UsageStatistics.test.js +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright (C) 2022 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 - * - * 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 usageStatistics from '@ohos.resourceschedule.usageStatistics' - -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium' - -export default function UsageStatistics() { -describe("UsageStatistics", function () { - beforeAll(function() { - - /* - * @tc.setup: setup invoked before all testcases - */ - console.info('beforeAll called') - }) - - afterAll(function() { - - /* - * @tc.teardown: teardown invoked after all testcases - */ - console.info('afterAll called') - }) - - beforeEach(function() { - - /* - * @tc.setup: setup invoked before each testcases - */ - console.info('beforeEach called') - }) - - afterEach(function() { - - /* - * @tc.teardown: teardown invoked after each testcases - */ - console.info('afterEach caled') - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0025 - * @tc.name: UsageStatistics001 - * @tc.desc: test isIdleState promise. - */ - it("UsageStatistics001", 0, async function (done) { - console.info('----------------------UsageStatistics001---------------------------'); - let bundleName = 'ohos.acts.resourceschedule.deviceusagestatisticsjsunit.js.function'; - try { - usageStatistics.isIdleState(bundleName).then((res) => { - console.info('test UsageStatistics001 isIdleState promise success.' + res); - expect(res).assertFalse(); - done() - }).catch((err) => { - console.info('test UsageStatistics001 isIdleState promise failure.' + err.code); - }); - } catch (error) { - console.info('isIdleState throw error, code is: ' + error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0026 - * @tc.name: UsageStatistics002 - * @tc.desc: test isIdleState callback. - */ - it("UsageStatistics002", 0, async function (done) { - console.info('----------------------UsageStatistics002---------------------------'); - let bundleName = 'ohos.acts.resourceschedule.deviceusagestatisticsjsunit.js.function'; - try { - usageStatistics.isIdleState(bundleName, (err, res) => { - if(err) { - console.info('test UsageStatistics002 isIdleState callback failure.' + err.code); - } else { - console.info('test UsageStatistics002 isIdleState callback success.' + res); - expect(res).assertFalse(); - done(); - } - }); - } catch (error) { - console.info('isIdleState throw error, code is: ' + error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0027 - * @tc.name: UsageStatistics003 - * @tc.desc: test queryAppGroup promise. - */ - it("UsageStatistics003", 0, async function (done) { - console.info('----------------------UsageStatistics003---------------------------'); - let bundleName = 'ohos.acts.resourceschedule.deviceusagestatisticsjsunit.js.function'; - try { - usageStatistics.queryAppGroup(bundleName).then( res => { - console.info('test UsageStatistics003 queryAppGroup promise success.' + res); - expect(res).assertEqual(10); - done(); - }).catch( err => { - console.info('tets UsageStatistics003 queryAppGroup promise failure.' + err.code); - }); - } catch (error) { - console.info('queryAppGroup throw error, code is: ' + error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0028 - * @tc.name: UsageStatistics004 - * @tc.desc: test queryAppGroup callback. - */ - it("UsageStatistics004", 0, async function (done) { - console.info('----------------------UsageStatistics004---------------------------'); - let bundleName = 'ohos.acts.resourceschedule.deviceusagestatisticsjsunit.js.function'; - try { - usageStatistics.queryAppGroup(bundleName, (err, res) => { - if(err) { - console.info('test UsageStatistics004 queryAppGroup callback failure.' + err.code); - } else { - console.info('tets UsageStatistics004 queryAppGroup callback success.' + res); - expect(res).assertEqual(10); - done(); - } - }); - } catch (error) { - console.info('queryAppGroup throw error, code is: ' + error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0029 - * @tc.name: UsageStatistics005 - * @tc.desc: test queryCurrentBundleEvents promise. - */ - it("UsageStatistics005", 0, async function (done) { - console.info('----------------------UsageStatistics005---------------------------'); - let beginTime = 0; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime).then((res) => { - console.info('test UsageStatistics005 queryCurrentBundleEvents promise success.' + res); - expect(res).assertInstanceOf("Array"); - done(); - }).catch((err) => { - console.info('test UsageStatistics005 queryCurrentBundleEvents promise failure.' + err.code); - }); - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0030 - * @tc.name: UsageStatistics006 - * @tc.desc: test queryCurrentBundleEvents callback. - */ - it("UsageStatistics006", 0, async function (done) { - console.info('----------------------UsageStatistics006---------------------------'); - let beginTime = 0; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics006 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics006 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - done(); - } - }); - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0031 - * @tc.name: UsageStatistics007 - * @tc.desc: test BundleEvents bundleName. - */ - it("UsageStatistics007", 0, async function (done) { - console.info('----------------------UsageStatistics007---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics007 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics007 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{bundleName: 'www.baidu.com'}]; - } - console.info('test BundleEvents bundleName :' + res[0].bundleName); - done(); - } - }); - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0032 - * @tc.name: UsageStatistics008 - * @tc.desc: test BundleEvents eventId. - */ - it("UsageStatistics008", 0, async function (done) { - console.info('----------------------UsageStatistics008---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics008 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics008 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{eventId: 0}]; - } - console.info('test BundleEvents eventId :' + res[0].eventId); - done(); - } - }) - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0033 - * @tc.name: UsageStatistics009 - * @tc.desc: test BundleEvents eventOccurredTime. - */ - it("UsageStatistics009", 0, async function (done) { - console.info('----------------------UsageStatistics009---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics009 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics009 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{eventOccurredTime: 10000000000000}]; - } - console.info('test BundleEvents eventOccurredTime :' + res[0].eventOccurredTime); - done(); - } - }) - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0034 - * @tc.name: UsageStatistics0010 - * @tc.desc: test BundleEvents appGroup. - */ - it("UsageStatistics0010", 0, async function (done) { - console.info('----------------------UsageStatistics0010---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics0010 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics0010 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{appGroup: 1}]; - } - console.info('test BundleEvents appGroup :' + res[0].appGroup); - done(); - } - }) - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0035 - * @tc.name: UsageStatistics0011 - * @tc.desc: test BundleEvents indexOfLink. - */ - it("UsageStatistics0011", 0, async function (done) { - console.info('----------------------UsageStatistics0011---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics0011 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics0011 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{indexOfLink: 'id'}]; - } - console.info('test BundleEvents indexOfLink :' + res[0].indexOfLink); - done(); - } - }) - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0036 - * @tc.name: UsageStatistics0012 - * @tc.desc: test BundleEvents nameOfClass. - */ - it("UsageStatistics0012", 0, async function (done) { - console.info('----------------------UsageStatistics0012---------------------------'); - let beginTime = 10; - let endTime = 20000000000000; - try { - usageStatistics.queryCurrentBundleEvents(beginTime, endTime, (err, res) => { - if(err) { - console.info('tets UsageStatistics0012 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics0012 queryCurrentBundleEvents callback success.' + res); - expect(res).assertInstanceOf("Array"); - if(res === undefined) { - res = [{nameOfClass: 'BundleEvents'}]; - } - console.info('test BundleEvents nameOfClass :' + res[0].nameOfClass); - done(); - } - }) - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0037 - * @tc.name: UsageStatistics0013 - * @tc.desc: test isIdleState promise. - */ - it("UsageStatistics0013", 0, async function (done) { - console.info('----------------------UsageStatistics0013---------------------------'); - try { - usageStatistics.isIdleState(12345).then((res) => { - console.info('test UsageStatistics0013 isIdleStateone promise success.' + res); - }).catch((err) => { - console.info('test UsageStatistics0013 isIdleState promise failure.' + err.code); - }); - } catch (error) { - console.info('isIdleState throw error, code is: ' + error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0038 - * @tc.name: UsageStatistics0014 - * @tc.desc: test isIdleState callback. - */ - it("UsageStatistics0014", 0, async function (done) { - console.info('----------------------UsageStatistics0014---------------------------'); - try { - usageStatistics.isIdleState("", (err, res) => { - if(err) { - console.info('test UsageStatistics0014 isIdleState callback failure.' + err.code); - } else { - console.info('test UsageStatistics0014 isIdleState callback success.' + res); - } - }); - } catch (error) { - console.info('isIdleState throw error, code is: ' + error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0039 - * @tc.name: UsageStatistics0015 - * @tc.desc: test queryAppGroup promise. - */ - it("UsageStatistics0015", 0, async function (done) { - console.info('----------------------UsageStatistics0015---------------------------'); - try { - usageStatistics.queryAppGroup(123456).then( res => { - console.info('test UsageStatistics0015 queryAppGroup promise success.'+ res); - }).catch( err => { - console.info('tets UsageStatistics0015 queryAppGroup promise failure.' + err.code); - }); - } catch (error) { - console.info('queryAppGroup throw error, code is: ' + error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0040 - * @tc.name: UsageStatistics0016 - * @tc.desc: test queryAppGroup callback. - */ - it("UsageStatistics0016", 0, async function (done) { - console.info('----------------------UsageStatistics0016---------------------------'); - try { - usageStatistics.queryAppGroup(null, (err, res) => { - if(err) { - console.info('test UsageStatistics0016 queryAppGroup callback failure.' + err.code); - } else { - console.info('tets UsageStatistics0016 queryAppGroup callback success.' + res); - } - }); - } catch (error) { - console.info('queryAppGroup throw error, code is: ' + error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0041 - * @tc.name: UsageStatistics0017 - * @tc.desc: test queryCurrentBundleEvents promise. - */ - it("UsageStatistics0017", 0, async function (done) { - console.info('----------------------UsageStatistics0017---------------------------'); - try { - usageStatistics.queryCurrentBundleEvents(true, false).then((res) => { - console.info('test UsageStatistics0017 queryCurrentBundleEvents promise success.' + res); - }).catch((err) => { - console.info('test UsageStatistics0017 queryCurrentBundleEvents promise failure.' + err.code); - }); - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) - - /* - * @tc.number:SUB_RESOURCESCHEDULE_USAGEINFO_QUERY_XTS_0042 - * @tc.name: UsageStatistics0018 - * @tc.desc: test queryCurrentBundleEvents callback. - */ - it("UsageStatistics0018", 0, async function (done) { - console.info('----------------------UsageStatistics0018---------------------------'); - try { - usageStatistics.queryCurrentBundleEvents("", "1235456", (err, res) => { - if(err) { - console.info('tets UsageStatistics0018 queryCurrentBundleEvents callback failure.' + err.code); - } else { - console.info('test UsageStatistics0018 queryCurrentBundleEvents callback success.' + res); - } - }); - } catch (error) { - console.info('queryCurrentBundleEvents throw error, code is: ' + - error.code + ',message is: ' + error.message); - expect(error.code).assertEqual("401"); - done(); - } - }) -})} diff --git a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js index 99881bebcb3d5d4c1d0550ce804f83064787ecc2..62824b71256ac7bc2b86e6da9fe6420327d6f940 100644 --- a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js +++ b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js @@ -13,9 +13,8 @@ * limitations under the License. */ import ReminderAgentTest from './ReminderAgentJs.test.js' -import ReminderAgentManagerTest from './ReminderAgentManagerJs.test.js' + export default function testsuite() { ReminderAgentTest() -ReminderAgentManagerTest() } diff --git a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js index 76a392b4baee964fce97e067a413ed9d32184b09..6025bb74eee3ccd86d2b5e7b5650e8eec27a8b1c 100644 --- a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js +++ b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js @@ -2800,7 +2800,8 @@ export default function ReminderAgentTest() { let firstId = 0; let secondId = 0; let diffId = 0 - for (let i = 0; i < maxLimitNumsOfApp; i++) { + reminderAgent.cancelAllReminders().then(() =>{ + for (let i = 0; i < maxLimitNumsOfApp; i++) { (function (i) { setTimeout(function () { reminderAgent.publishReminder(timer).then((reminderId) => { @@ -2811,12 +2812,13 @@ export default function ReminderAgentTest() { secondId = reminderId diffId = secondId - firstId expect(29).assertEqual(diffId); + done(); } }); - }, 500 * i); + }, 500); })(i); } - done(); + }) }) /** diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/BUILD.gn b/resourceschedule/resourceschedule_standard/reminderagentManager/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..620c816d7332252cba1e73058e1d20be416463c3 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2021 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 +# +# 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("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("resourceschedule_reminderagentmgr_js_test") { + hap_profile = "./src/main/config.json" + deps = [ + ":resourceschedule_js_assets", + ":resourceschedule_js_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsResourcescheduleReminderAgentMgrTest" + subsystem_name = "notification" + part_name = "distributed_notification_service" +} +ohos_js_assets("resourceschedule_js_assets") { + js2abc = true + hap_profile = "./src/main/config.json" + source_dir = "./src/main/js" +} +ohos_resources("resourceschedule_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/Test.json b/resourceschedule/resourceschedule_standard/reminderagentManager/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..17f24ca21de287034ae4bad71d6251119cb0d50d --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for resourceschedule js api Tests", + "driver": { + "type": "OHJSUnitTest", + "test-timeout": "300000", + "shell-timeout": "300000", + "bundle-name": "ohos.acts.resourceschedule.reminderagentMgr.js.function", + "package-name": "ohos.acts.resourceschedule.reminderagentMgr.js.function" + }, + "kits": [ + { + "test-file-name": [ + "ActsResourcescheduleReminderAgentMgrTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/signature/openharmony_sx.p7b b/resourceschedule/resourceschedule_standard/reminderagentManager/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..19950f1bc1f859de3380460702902327f3f819f4 Binary files /dev/null and b/resourceschedule/resourceschedule_standard/reminderagentManager/signature/openharmony_sx.p7b differ diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/config.json b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..bccf0ce862e4098570dd47ecb3bf236a79039140 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/config.json @@ -0,0 +1,107 @@ +{ + "app": { + "bundleName": "ohos.acts.resourceschedule.reminderagentMgr.js.function", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5 + } + }, + "deviceConfig": {}, + "module": { + "package": "ohos.acts.resourceschedule.reminderagentMgr.js.function", + "name": ".entry", + "deviceType": [ + "tablet", + "default", + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "formsEnabled": false, + "name": ".MainAbility", + "srcLanguage": "js", + "srcPath": "MainAbility", + "icon": "$media:icon", + "description": "$string:MainAbility_desc", + "label": "$string:MainAbility_label", + "type": "page", + "visible": true, + "launchType": "standard" + }, + { + "orientation": "unspecified", + "formsEnabled": false, + "name": ".TestAbility", + "srcLanguage": "js", + "srcPath": "TestAbility", + "icon": "$media:icon", + "description": "$string:TestAbility_desc", + "label": "$string:TestAbility_label", + "type": "page", + "visible": true, + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + }, + { + "pages": [ + "pages/index/index" + ], + "name": ".TestAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ], + "reqPermissions": [ + { + "name": "ohos.permission.PUBLISH_AGENT_REMINDER", + "reason": "SYSTEM_GRANT", + "usedScene": { + "ability": [ + ".FormAbility" + ], + "when": "inuse" + } + } + ], + "testRunner": { + "name": "OpenHarmonyTestRunner", + "srcPath": "TestRunner" + }, + "mainAbility": ".MainAbility", + "srcPath": "" + } +} \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/app.js b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/app.js new file mode 100644 index 0000000000000000000000000000000000000000..e423f4bce4698ec1d7dc86c3eea3990a5e7b1085 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/app.js @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2021 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 + * + * 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. + */ + +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/en-US.json b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/zh-CN.json b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..096c4d3d6046124485b28f71efab32009529c20d --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "鸿蒙" + } +} \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.css b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..6fda792753f2e15f22b529c7b90a82185b2770bf --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.hml b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/reminderagentManager/src/main/js/MainAbility/pages/index/index.hml @@ -0,0 +1,5 @@ +