From 9cf2ee07bacc119525eeef1e40715779ff4e927a Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Mon, 13 Mar 2023 19:57:41 +0800 Subject: [PATCH] =?UTF-8?q?xts-form=E5=A2=9E=E5=8A=A0html=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengxingzhen --- .../entry/src/main/ets/test/Ability.test.ets | 68 ++++++++++++++++++- .../src/main/js/widget/pages/index/index.css | 19 ++++++ .../src/main/js/widget/pages/index/index.hml | 7 ++ .../src/main/js/widget/pages/index/index.css | 19 ++++++ .../src/main/js/widget/pages/index/index.hml | 7 ++ .../src/main/js/widget/pages/index/index.css | 19 ++++++ .../src/main/js/widget/pages/index/index.hml | 7 ++ .../src/main/js/widget/pages/index/index.css | 19 ++++++ .../src/main/js/widget/pages/index/index.hml | 7 ++ .../main/js/Form_Js001/pages/index/index.css | 19 ++++++ .../main/js/Form_Js001/pages/index/index.hml | 7 ++ .../main/js/Form_Js001/pages/index/index.css | 19 ++++++ .../main/js/Form_Js001/pages/index/index.hml | 7 ++ .../src/main/js/widget/pages/index/index.css | 19 ++++++ .../src/main/js/widget/pages/index/index.hml | 7 ++ 15 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.hml create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.css create mode 100644 ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.hml diff --git a/ability/ability_runtime/actsrequestdialogtest/actsrequestdialog/entry/src/main/ets/test/Ability.test.ets b/ability/ability_runtime/actsrequestdialogtest/actsrequestdialog/entry/src/main/ets/test/Ability.test.ets index a0a3b0e1c..6c0e0c1f3 100644 --- a/ability/ability_runtime/actsrequestdialogtest/actsrequestdialog/entry/src/main/ets/test/Ability.test.ets +++ b/ability/ability_runtime/actsrequestdialogtest/actsrequestdialog/entry/src/main/ets/test/Ability.test.ets @@ -32,7 +32,7 @@ export default function abilityTest() { /* * @tc.number: ACTS_requestDialog_0100 - * @tc.name: Start Recent Ability with no permission. + * @tc.name: Start Recent Ability with no callback. * @tc.desc: reguest dialog service */ it('ACTS_requestDialog_0100', 0, async function (done) { @@ -66,11 +66,11 @@ export default function abilityTest() { subscriber = data; commonEvent.subscribe(subscriber, subscribeCallBack); try { - await globalThis.abilityContext.requestDialogService( + globalThis.abilityContext.requestDialogService( { bundleName: 'com.acts.example.requestdialog', abilityName: 'com.acts.example.requestdialog.MainAbility2', - }).then((data) => { + }, (data) => { console.info("====>ACTS_requestDialog_0100 request end + data:" + JSON.stringify(data)); resultCode = data.result; }) @@ -91,5 +91,67 @@ export default function abilityTest() { id = setTimeout(timeout, CASE_TIMEOUT); console.log('Start ACTS_requestDialog_0100 timer id : ' + id); }) + + /* + * @tc.number: ACTS_requestDialog_0200 + * @tc.name: Start Recent Ability with no permission. + * @tc.desc: reguest dialog service + */ + it('ACTS_requestDialog_0200', 0, async function (done) { + console.log('ACTS_requestDialog_0200====ACTS_requestDialog_0200 Subscribe CallBack data:====>" + JSON.stringify(data)); + + async function processInfoCheck(data) { + console.info('====> ACTS_requestDialog_0200 processInfoCheck=====>'); + expect(globalThis.requestDialogSuccess).assertTrue(); + expect(globalThis.validRequestInfo).assertTrue(); + expect(globalThis.validRequestCallback).assertTrue(); + commonEvent.unsubscribe(subscriber, unSubscribeCallback); + done(); + } + + if (data.event == "ACTS_REQUEST_DIALOG_EVENT1") { + console.info('====> ACTS_requestDialog_0200 ACTS_StartAbility_CommonEvent1 success=====>'); + + await sleep(500); + processInfoCheck(data); + } + } + + commonEvent.createSubscriber(subscriberInfo).then(async (data) => { + console.info("====>ACTS_requestDialog_0200 Create Subscriber====>"); + subscriber = data; + commonEvent.subscribe(subscriber, subscribeCallBack); + try { + await globalThis.abilityContext.requestDialogService( + { + bundleName: 'com.acts.example.requestdialog', + abilityName: 'com.acts.example.requestdialog.MainAbility2', + }).then((data) => { + console.info("====>ACTS_requestDialog_0200 request end + data:" + JSON.stringify(data)); + resultCode = data.result; + }) + } catch (paramError) { + console.info("====>ACTS_requestDialog_0200 requestDialogSerivce paramError====>"); + } + }) + + function unSubscribeCallback() { + console.info("====>UnSubscribe0200 CallBack====>"); + } + + function timeout() { + console.log('ACTS_requestDialog_0200 timeout.'); + done(); + } + + id = setTimeout(timeout, CASE_TIMEOUT); + console.log('Start ACTS_requestDialog_0200 timer id : ' + id); + }) }) } \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationB/entry/src/main/js/widget/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationC/entry/src/main/js/widget/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationD/entry/src/main/js/widget/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationE/entry/src/main/js/widget/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationF/entry/src/main/js/Form_Js001/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationG/entry/src/main/js/Form_Js001/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.css b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.css new file mode 100644 index 000000000..b52e9bfa9 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.css @@ -0,0 +1,19 @@ +#wrapper { + flex-direction: column; +} + +#div1 { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + background-color: white; +} + +#text1 { + height: 45px; + width: 150px; + font-size: 16px; + text-align: center; +} + diff --git a/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.hml b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.hml new file mode 100644 index 000000000..b01936fb1 --- /dev/null +++ b/ability/ability_runtime/formmanager/fa/formproviderst_ets/formsupplyapplicationH/entry/src/main/js/widget/pages/index/index.hml @@ -0,0 +1,7 @@ +
+
+
+ {{title}} +
+
+
\ No newline at end of file -- GitLab