From 22501df8dc14380cd2ade75c822d0e1c304f1501 Mon Sep 17 00:00:00 2001 From: bayanxing Date: Tue, 30 Aug 2022 19:55:08 +0800 Subject: [PATCH] ets api push Signed-off-by: bayanxing --- .../src/main/ets/MainAbility/pages/dom.ets | 53 -- .../main/ets/MainAbility/pages/ellipse.ets | 53 -- .../ets/MainAbility/pages/featureAbility.ets | 266 -------- .../ets/MainAbility/pages/form_component.ets | 63 -- .../src/main/ets/MainAbility/pages/gauge.ets | 56 -- .../main/ets/MainAbility/pages/gesture.ets | 104 --- .../src/main/ets/MainAbility/pages/grid.ets | 77 --- .../main/ets/MainAbility/pages/gridItem.ets | 77 --- .../main/ets/MainAbility/pages/grid_col.ets | 78 --- .../main/ets/MainAbility/pages/grid_row.ets | 65 -- .../main/ets/MainAbility/pages/inspector.ets | 61 -- .../ets/MainAbility/pages/lazyForEach.ets | 293 --------- .../src/main/ets/MainAbility/pages/line.ets | 53 -- .../src/main/ets/MainAbility/pages/list.ets | 116 ---- .../main/ets/MainAbility/pages/list_item.ets | 77 --- .../main/ets/MainAbility/pages/matrix2d.ets | 52 -- .../main/ets/MainAbility/pages/mediaQuery.ets | 104 --- .../main/ets/MainAbility/pages/navigator.ets | 55 -- .../ets/MainAbility/pages/page_transition.ets | 52 -- .../src/main/ets/MainAbility/pages/panel.ets | 105 --- .../src/main/ets/MainAbility/pages/path.ets | 58 -- .../ets/MainAbility/pages/pluginComponent.ets | 66 -- .../main/ets/MainAbility/pages/polyLine.ets | 57 -- .../main/ets/MainAbility/pages/polygon.ets | 57 -- .../main/ets/MainAbility/pages/progress.ets | 52 -- .../src/main/ets/MainAbility/pages/prompt.ets | 92 --- .../src/main/ets/MainAbility/pages/rect.ets | 59 -- .../src/main/ets/MainAbility/pages/router.ets | 121 ---- .../src/main/ets/MainAbility/pages/scroll.ets | 52 -- .../src/main/ets/MainAbility/pages/search.ets | 102 --- .../src/main/ets/MainAbility/pages/select.ets | 52 -- .../src/main/ets/MainAbility/pages/shape.ets | 53 -- .../main/ets/MainAbility/pages/sideBar.ets | 80 --- .../src/main/ets/MainAbility/pages/stack.ets | 70 -- .../ets/MainAbility/pages/stateManagement.ets | 100 --- .../src/main/ets/MainAbility/pages/swiper.ets | 121 ---- .../src/main/ets/MainAbility/pages/tabs.ets | 72 --- .../src/main/ets/MainAbility/pages/text.ets | 68 -- .../main/ets/MainAbility/pages/textArea.ets | 89 --- .../main/ets/MainAbility/pages/textInput.ets | 115 ---- .../main/ets/MainAbility/pages/textPicker.ets | 47 -- .../ets/MainAbility/pages/uiAppearance.ets | 91 --- .../src/main/ets/MainAbility/pages/video.ets | 101 --- .../main/ets/MainAbility/pages/viewModel.ets | 598 ------------------ .../src/main/ets/MainAbility/pages/web.ets | 187 ------ .../main/ets/MainAbility/pages/xcomponent.ets | 74 --- .../entry/src/main/ets/test/Utils.ets | 118 ---- .../entry/src/main/ets/test/ellipse.test.ets | 201 ------ .../src/main/ets/test/featureAbility.test.ets | 201 ------ .../entry/src/main/ets/test/gauge.test.ets | 201 ------ .../entry/src/main/ets/test/gesture.test.ets | 201 ------ .../entry/src/main/ets/test/grid.test.ets | 201 ------ .../entry/src/main/ets/test/gridItem.test.ets | 201 ------ .../entry/src/main/ets/test/grid_col.test.ets | 201 ------ .../entry/src/main/ets/test/grid_row.test.ets | 201 ------ .../src/main/ets/test/lazyForEach.test.ets | 201 ------ .../entry/src/main/ets/test/line.test.ets | 201 ------ .../src/main/ets/test/list_item.test.ets | 201 ------ .../entry/src/main/ets/test/matrix2d.test.ets | 201 ------ .../src/main/ets/test/mediaQuery.test.ets | 204 ------ .../src/main/ets/test/navigator.test.ets | 201 ------ .../main/ets/test/page_transition.test.ets | 201 ------ .../entry/src/main/ets/test/panel.test.ets | 201 ------ .../entry/src/main/ets/test/path.test.ets | 201 ------ .../main/ets/test/pluginComponent.test.ets | 204 ------ .../entry/src/main/ets/test/polyLine.test.ets | 201 ------ .../entry/src/main/ets/test/polygon.test.ets | 201 ------ .../entry/src/main/ets/test/progress.test.ets | 201 ------ .../entry/src/main/ets/test/prompt.test.ets | 201 ------ .../entry/src/main/ets/test/rect.test.ets | 201 ------ .../entry/src/main/ets/test/router.test.ets | 201 ------ .../entry/src/main/ets/test/scroll.test.ets | 201 ------ .../entry/src/main/ets/test/search.test.ets | 201 ------ .../entry/src/main/ets/test/select.test.ets | 201 ------ .../entry/src/main/ets/test/shape.test.ets | 201 ------ .../entry/src/main/ets/test/sideBar.test.ets | 201 ------ .../entry/src/main/ets/test/stack.test.ets | 201 ------ .../main/ets/test/stateManagement.test.ets | 201 ------ .../entry/src/main/ets/test/swiper.test.ets | 201 ------ .../entry/src/main/ets/test/tabs.test.ets | 201 ------ .../entry/src/main/ets/test/text.test.ets | 202 ------ .../entry/src/main/ets/test/textArea.test.ets | 203 ------ .../src/main/ets/test/textInput.test.ets | 201 ------ .../src/main/ets/test/textPicker.test.ets | 201 ------ .../entry/src/main/ets/test/video.test.ets | 201 ------ .../src/main/ets/test/viewModel.test.ets | 201 ------ .../entry/src/main/ets/test/web.test.ets | 65 -- .../src/main/ets/test/xcomponent.test.ets | 201 ------ 88 files changed, 12726 deletions(-) delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/featureAbility.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/form_component.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gauge.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gesture.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gridItem.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_col.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_row.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/inspector.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/lazyForEach.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list_item.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/matrix2d.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/mediaQuery.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/navigator.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/panel.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/progress.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/router.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/scroll.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/search.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/select.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/sideBar.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stack.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stateManagement.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/text.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textPicker.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/viewModel.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/xcomponent.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/Utils.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/ellipse.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/featureAbility.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/gesture.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/gridItem.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_col.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_row.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/lazyForEach.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/matrix2d.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/mediaQuery.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/navigator.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/page_transition.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/panel.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/pluginComponent.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/progress.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/prompt.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/router.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/search.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/select.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/shape.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/stack.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/tabs.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/text.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/viewModel.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/web.test.ets delete mode 100644 arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets deleted file mode 100644 index 71a77ea75..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/dom.ets +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct DomCreateElement { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear DomCreateElement start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear DomCreateElement end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("dom-CreateElement") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("createElementText") - .onClick(() => { - // dom.createElement('div') - }) - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets deleted file mode 100644 index 42183cb86..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/ellipse.ets +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct EllipseNe { - @State w: string = "300.00px"; - @State h: string = "300.00px"; - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear EllipseNe start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear EllipseNe end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("ellipse-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - Ellipse().width(`${this.w}`).height(`${this.h}`).key('ellipse') - }.width('100%').height('100%') - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/featureAbility.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/featureAbility.ets deleted file mode 100644 index 750d4e41f..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/featureAbility.ets +++ /dev/null @@ -1,266 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct FeatureAbilityStartAbility { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear FeatureAbilityStartAbility start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear FeatureAbilityStartAbility end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("featureAbility-StartAbility") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("startAbilityText") - .onClick(() => { - FeatureAbility.startAbility({ - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility" - }) - }) - - Text("featureAbility-StartAbilityForResult") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("startAbilityForResultText") - .onClick(() => { - FeatureAbility.startAbilityForResult({ - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility" }) - }) - - Text("featureAbility-FinishWithResult") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("finishWithResultText") - .onClick(() => { - FeatureAbility.finishWithResult({ code: 200, result: null }) - }) - - Text("featureAbility-GetDeviceList") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("getDeviceListText") - .onClick(() => { - FeatureAbility.getDeviceList(1) - }) - - Text("featureAbility-CallAbility") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("callAbilityText") - .onClick(() => { - FeatureAbility.callAbility({ - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility", - messageCode: 200, - abilityType: 1 - }) - }) - - Text("featureAbility-ContinueAbility") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("continueAbilityText") - .onClick(() => { - FeatureAbility.continueAbility() - }) - - Text("featureAbility-SubscribeAbilityEvent") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("subscribeAbilityEventText") - .onClick(() => { - FeatureAbility.subscribeAbilityEvent({ - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility", - messageCode: 200, - abilityType: 1 - }, () => { - }) - }) - - Text("featureAbility-UnsubscribeAbilityEvent") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("unsubscribeAbilityEventText") - .onClick(() => { - FeatureAbility.unsubscribeAbilityEvent({ - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility", - messageCode: 200, - abilityType: 1 - }) - }) - - Text("featureAbility-SendMsg") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("sendMsgText") - .onClick(() => { - FeatureAbility.sendMsg({ - deviceId: '1001', - bundleName: "com.example.testapp", - abilityName: "com.example.testApp.MainAbility", - message: 'success', - success: () => { - Log.showInfo(TAG, `FeatureAbility.sendMsg success`) - }, - fail: (data, code) => { - Log.showInfo(TAG, `FeatureAbility.sendMsg fail: data: ${data},code: ${code}`) - }, - complete: () => { - Log.showInfo(TAG, `FeatureAbility.sendMsg complete`) - } - }) - }) - - Text("featureAbility-SubscribeMsg") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("subscribeMsgText") - .onClick(() => { - FeatureAbility.subscribeMsg({ - success: (data) => { - Log.showInfo(TAG, `FeatureAbility.subscribeMsg success: data: ${JSON.stringify(data)}`) - }, - fail: (data, code) => { - Log.showInfo(TAG, `FeatureAbility.subscribeMsg fail: data: ${data},code: ${code}`) - } - }) - }) - - Text("featureAbility-UnsubscribeMsg") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("unsubscribeMsgText") - .onClick(() => { - FeatureAbility.unsubscribeMsg() - }) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/form_component.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/form_component.ets deleted file mode 100644 index 6b9b0a166..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/form_component.ets +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -@Entry -@Component -struct Index { - @State formId: number = 0; - @State bundle: string = "com.form.formsystemtestservicea.hmservice"; - @State ability: string = "com.form.formsystemtestservicea.hmservice.MainAbility"; - @State moduleName: string = "entry"; - @State name: string = "Form_Js001"; - @State allowUpate: boolean = true; - @State isShowing: boolean = true; - - private dimension: FormDimension = FormDimension.Dimension_1_2; - - private deleteForm = false; - private deleteId = "-1"; - private temporaryId="-1"; - private temporary = false; - private castForm = false; - - build() { - Column() { - Text('form component test begin') - Column() { - FormComponent({ - id: this.formId, - name: this.name, - bundle: this.bundle, - ability: this.ability, - module: this.moduleName, - dimension: this.dimension, - temporary: this.temporary, - }) - .allowUpdate(this.allowUpate) - .visibility(this.isShowing ? Visibility.Visible : Visibility.Hidden) - .onUninstall((info) => { - console.log("[FormComponent] onUninstall:" + JSON.stringify(info)); - }) - .onError((error) => { - console.log("[FormComponent.host] error code:" + error.errcode); - console.log("[FormComponent.host] error msg:" + error.msg); - }) - } - .backgroundColor(Color.White) - Text('form component test end') - } - .backgroundColor(Color.White) - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gauge.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gauge.ets deleted file mode 100644 index c0baacd30..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gauge.ets +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct GaugeColors { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear GaugeColors start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear GaugeColors end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("gauge-Colors") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("colorsText") - Gauge({ value: 50, min: 0, max: 100 }) - .startAngle(210).endAngle(150) - .colors([[0x317AF7, 1], [0x5BA854, 1], [0xE08C3A, 1], [0x9C554B, 1], [0xD94838, 1]]) - .strokeWidth(20) - .width(200).height(200) - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gesture.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gesture.ets deleted file mode 100644 index b2d7bba7c..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gesture.ets +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct GestureSetDirection { - @State offsetX: number = 10 - @State offsetY: number = 10 - @State directionV: PanDirection = PanDirection.Vertical - @State directionH: PanDirection = PanDirection.Horizontal - // panGesture: PanGestureOptions = new PanGestureOptions({direction:this.directionV, distance:10}) - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear GestureSetDirection start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear GestureSetDirection end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("gesture-SetDirection") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setDirectionText") - - Text("gesture-SetDistance") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setDistanceText") - - Text("gesture-SetFingers") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setFingersText") - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceBetween }) { - Text('PanGesture offset:\nX: ' + this.offsetX + '\n' + 'Y: ' + this.offsetY) - } - .key('panDirection').height(100).width(200).padding(20).border({ width: 1 }).margin(80) - .translate({ x: this.offsetX, y: this.offsetY, z: 5 }) -// .gesture( -// PanGesture(this.panGesture) -// .onActionStart((event: GestureEvent) => { -// console.info('Pan start') -// }) -// .onActionUpdate((event: GestureEvent) => { -// this.offsetX = event.offsetX -// this.offsetY = event.offsetY -// }) -// .onActionEnd(() => { -// console.info('Pan end') -// this.panGesture.setDistance(10) -// this.panGesture.setDirection(this.directionH) -// this.panGesture.setFingers(1) -// }) -// ) - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid.ets deleted file mode 100644 index 87df9ab32..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid.ets +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct GridMaxCount { - @State Number: String[] = ['5', '6', '7', '8', '9'] - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear GridMaxCount start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear GridMaxCount end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("grid-MaxCount") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("maxCountText") - - - Column({ space: 5 }) { - Grid() { - ForEach(this.Number, (day: string) => { - ForEach(this.Number, (day: string) => { - GridItem() { - Text(day) - .fontSize(16) - .backgroundColor(0xF9CF93) - .width('100%') - .height('100%') - .textAlign(TextAlign.Center) - } - }, day => day) - }, day => day) - } - .columnsTemplate('1fr 1fr 1fr 1fr 1fr') - .rowsTemplate('1fr 1fr 1fr 1fr 1fr') - .columnsGap(10) - .rowsGap(10) - .width('90%') - .backgroundColor(0xFAEEE0) - .height(300) - .maxCount(1) - } - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gridItem.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gridItem.ets deleted file mode 100644 index dc494aebf..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/gridItem.ets +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct GridItemOnSelect { - @State Number: String[] = ['5', '6', '7', '8', '9'] - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear GridItemOnSelect start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear GridItemOnSelect end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("gridItem-OnSelect") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onSelectText") - - Column({ space: 5 }) { - Grid() { - ForEach(this.Number, (day: string) => { - ForEach(this.Number, (day: string) => { - GridItem() { - Text(day) - .fontSize(16) - .backgroundColor(0xF9CF93) - .width('100%') - .height('100%') - .textAlign(TextAlign.Center) - }.onSelect((isSelected:boolean)=>{ - console.info("Select:" + isSelected) - }) - }, day => day) - }, day => day) - } - .columnsTemplate('1fr 1fr 1fr 1fr 1fr') - .rowsTemplate('1fr 1fr 1fr 1fr 1fr') - .columnsGap(10) - .rowsGap(10) - .width('90%') - .backgroundColor(0xFAEEE0) - .height(300) - } - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_col.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_col.ets deleted file mode 100644 index e43c65bd0..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_col.ets +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct Grid_colSpan { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear Grid_colSpan start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear Grid_colSpan end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("grid_col-Span") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("spanText") - - Text("grid_col-Order") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("orderText") - - // GridCol({span: 10, offset:50, order: 10}){ - // - // } - // .width(100) - // .height(100) - // .backgroundColor(0x308014) - - // } - // .backgroundColor(0xf1f3f5) - // .margin({ top: 10 }) - // .key('gridContainer') - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_row.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_row.ets deleted file mode 100644 index 70ec53f70..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/grid_row.ets +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct Grid_rowOnBreakpointChange { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear Grid_rowOnBreakpointChange start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear Grid_rowOnBreakpointChange end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("grid_row-OnBreakpointChange") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onBreakpointChangeText") - - GridContainer({ sizeType: SizeType.SM }) { - GridRow({gutter: 10, columns:50, direction: GridRowDirection.Row}){ - }.width(100) - .height(100) - .backgroundColor(0xFF0000) - .onBreakpointChange((breakpoints: string) => { - console.info("onBreakpointChange=" + breakpoints) - }) - } - .backgroundColor(0xf1f3f5) - .margin({ top: 10 }) - .key('gridContainer') - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/inspector.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/inspector.ets deleted file mode 100644 index bf8417566..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/inspector.ets +++ /dev/null @@ -1,61 +0,0 @@ - -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -@Entry -@Component -export default -struct Inspector { - @State message: string = 'test' - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("inspector") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("inspector") - - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold).onClick(()=> { - console.info(JSON.stringify(getInspectorNodes())); - console.info(JSON.stringify(getInspectorNodeById(1))); - setAppBgColor('#F9CF93'); - Profiler.registerVsyncCallback((info: string) => { - console.info("VsyncCallback" + info) - }); - - Profiler.unregisterVsyncCallback(); - }) - } - .width('100%') - } - .height('100%') - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/lazyForEach.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/lazyForEach.ets deleted file mode 100644 index 951f2d098..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/lazyForEach.ets +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -class BasicDataSource implements IDataSource { - private listeners: DataChangeListener[] = [] - - public totalCount(): number { - return 0 - } - public getData(index: number): any { - return undefined - } - - registerDataChangeListener(listener: DataChangeListener): void { - if (this.listeners.indexOf(listener) < 0) { - console.info('add listener') - this.listeners.push(listener) - } - } - unregisterDataChangeListener(listener: DataChangeListener): void { - const pos = this.listeners.indexOf(listener); - if (pos >= 0) { - console.info('remove listener') - this.listeners.splice(pos, 1) - } - } - - notifyDataReload(): void { - this.listeners.forEach(listener => { - listener.onDataReloaded() - }) - } - notifyDataAdd(index: number): void { - this.listeners.forEach(listener => { - listener.onDataAdd(index) - }) - } - notifyDataChange(index: number): void { - this.listeners.forEach(listener => { - listener.onDataChange(index) - }) - } - notifyDataDelete(index: number): void { - this.listeners.forEach(listener => { - listener.onDataDelete(index) - }) - } - notifyDataMove(from: number, to: number): void { - this.listeners.forEach(listener => { - listener.onDataMove(from, to) - }) - } -} - -class MyDataSource extends BasicDataSource { - private dataArray: string[] = ['/path/image0', '/path/image1', '/path/image2', '/path/image3'] - - public totalCount(): number { - return this.dataArray.length - } - public getData(index: number): any { - return this.dataArray[index] - } - - public addData(index: number, data: string): void { - this.dataArray.splice(index, 0, data) - var datatest=this.dataArray.length - console.info('lenghth = '+ datatest) - for(var i = 0; i index2){ - var temp = this.dataArray[index1] - for(var i = index1 ; i > index2; i--){ - this.dataArray[i] = this.dataArray[i-1] - } - this.dataArray[index2] = temp - - for(var j = 0 ; j < this.dataArray.length ; j++){ - console.info('after moving :' + this.dataArray[j]) - } - } - this.notifyDataMove(index1,index2) - } - - public popData(): void { - this.dataArray.pop() - this.notifyDataDelete(this.dataArray.length) - var datatest=this.dataArray.length - console.info('lenghth = '+ datatest) - for(var i = 0; i { - ListItem() { - Row() { - Image(item).width("30%").height(50) - Text(item).fontSize(20).margin({ left: 10 }) - }.margin({ left: 10, right: 10 }) - } - .onClick(() => { - this.data.pushData('/path/image' + this.data.totalCount()) - }) - }, item => item) - } - - Text("lazyForEach-OnDataMove") - .width(300) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onDataMoveText") - - List({ space: 3 }) { - LazyForEach(this.data, (item: string) => { - ListItem() { - Row() { - Image(item).width("30%").height(50) - Text(item).fontSize(20).margin({ left: 10 }) - }.margin({ left: 10, right: 10 }) - } - .onClick(() => { - this.data.moveData(3, 1) - }) - }, item => item) - } - - Text("lazyForEach-OnDataDelete") - .width(300) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onDataDeleteText") - - List({ space: 3 }) { - LazyForEach(this.data, (item: string) => { - ListItem() { - Row() { - Image(item).width("30%").height(50) - Text(item).fontSize(20).margin({ left: 10 }) - }.margin({ left: 10, right: 10 }) - } - .onClick(() => { - this.data.popData() - }) - }, item => item) - } - - Text("lazyForEach-OnDataChange") - .width(300) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onDataChangeText") - - List({ space: 3 }) { - LazyForEach(this.data, (item: string) => { - ListItem() { - Row() { - Image(item).width("30%").height(50) - Text(item).fontSize(20).margin({ left: 10 }) - }.margin({ left: 10, right: 10 }) - } - .onClick(() => { - this.data.changeData(2) - }) - }, item => item) - } - }.width("100%").height("100%") - } - } - } - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets deleted file mode 100644 index 5cefe6ada..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/line.ets +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct LineNe { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear LineNe start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear LineNe end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("line-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - Line({ width: 50, height: 100 }).startPoint([0, 0]).endPoint([50, 100]) - Line().width(200).height(200).startPoint([50, 50]).endPoint([150, 150]) - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets deleted file mode 100644 index f828e6388..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list.ets +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct ListLanes { - - @State arr: string[] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] - @State listPosition: number = 0 // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底 - private scroller: Scroller = new Scroller() - - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear ListLanes start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear ListLanes end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("list-Lanes") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("lanesText") - - Text("list-AlignListItem") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("alignListItemText") - - Text("list-OnScrollBegin") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onScrollBeginText") - - - List({ space: 20, initialIndex: 0 }) { - ForEach(this.arr, (item) => { - ListItem() { - Text('' + item) - .width('100%') - .height(100) - .fontSize(18) - - } - .border({ width: 2, color: Color.Green }) - }, item => item) - } - - .height(300) - .width("90%") - .editMode(true) - .border({ width: 3, color: Color.Red }) - .lanes({ minLength: 40, maxLength: 60 }) - .onScrollBegin((dx: number, dy: number) => { - if ((this.listPosition == 0 && dy >= 0) || (this.listPosition == 2 && dy <= 0)) { - this.scroller.scrollBy(0, -dy) - return { dxRemain: dx, dyRemain: 0 } - } - this.listPosition = 1; - - return { dxRemain: dx, dyRemain: dy } - - }) - - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list_item.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list_item.ets deleted file mode 100644 index eb62585e1..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/list_item.ets +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct List_itemOnSelect { - - @State arr: string[] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] - @State alignListItem: ListItemAlign = ListItemAlign.Start - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear List_itemOnSelect start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear List_itemOnSelect end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("list_item-OnSelect") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onSelectText") - - List({ space: 20, initialIndex: 0 }) { - ForEach(this.arr, (item) => { - ListItem() { - Text('' + item) - .width('100%') - .height(100) - .fontSize(16) - - } - .border({ width: 2, color: Color.Green }) - .onSelect((index:boolean)=>{ - console.info("Select: " + index)}) - }, item => item) - } - .height(300) - .width("90%") - .editMode(true) - .border({ width: 3, color: Color.Red }) - .lanes({ minLength: 40, maxLength: 60 }) - //lanes(5) - .alignListItem(this.alignListItem) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/matrix2d.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/matrix2d.ets deleted file mode 100644 index 2b1334623..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/matrix2d.ets +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct Matrix2dMultiply { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear Matrix2dMultiply start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear Matrix2dMultiply end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("matrix2d-Multiply") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("multiplyText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/mediaQuery.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/mediaQuery.ets deleted file mode 100644 index a46ac667e..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/mediaQuery.ets +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -import mediaquery from '@ohos.mediaquery' -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct MediaQueryOff { - @State color: string = '#000' - @State text: string = 'Test' - listener = mediaquery.matchMediaSync('(orientation: landscape)') - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear MediaQueryOff start`) - this.listener.on('change', (mediaQueryResult) => { - if (mediaQueryResult.matches) { - this.color = '#FFD700' - this.text = 'Landscape' - } else { - this.color = '#DB7093' - this.text = 'Portrait' - } - }) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear MediaQueryOff end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - - Text("mediaQuery-Off") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("offText") - .onClick(() => { - this.listener.off('change', (mediaQueryResult) => { - console.log(JSON.stringify(mediaQueryResult)) - }) - }) - - Text("mediaQuery-MatchMediaSync") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("matchMediaSyncText") - .onClick(() => { - console.log('mediaQuery-MatchMediaSync: ' + JSON.stringify(this.listener)) - }) - - Text(this.text) - .fontSize(50) - .fontColor(this.color) - // .width(100) - // .height(70) - // .fontSize(20) - // .opacity(1) - // .align(Alignment.TopStart) - // .fontColor(0xCCCCCC) - // .lineHeight(25) - // .border({ width: 1 }) - // .padding(10) - // .textAlign(TextAlign.Center) - // .textOverflow({ overflow: TextOverflow.None }) - // .key("offText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/navigator.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/navigator.ets deleted file mode 100644 index 6f9e10c2a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/navigator.ets +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct NavigatorTarget { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear NavigatorTarget start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear NavigatorTarget end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("navigator-Target") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("targetText") - - Navigator({ target: '', type: NavigationType.Push }) { - Text('Go to target page') - .width('100%').textAlign(TextAlign.Center) - }.params({ text: 'target' }).target('pages/index') - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets deleted file mode 100644 index e74e254d0..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/page_transition.ets +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct Page_transitionSlide { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear Page_transitionSlide start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear Page_transitionSlide end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("page_transition-Slide") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("slideText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/panel.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/panel.ets deleted file mode 100644 index 102711f46..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/panel.ets +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PanelBackgroundMask { - @State show1: boolean = false - @State show2: boolean = false - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PanelBackgroundMask start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PanelBackgroundMask end`) - } - - build() { - // Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { - Column() { - Text("panel-BackgroundMask") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("backgroundMaskText") - .onClick(() => { - this.show1 = !this.show1 - }) - - Text("panel-OnHeightChange") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onHeightChangeText") - .onClick(() => { - this.show2 = !this.show2 - }) - - Panel(this.show1) { - Column() { - Text("panel-BackgroundMask").fontSize(30) - } - } - .backgroundColor('green') - .type(PanelType.Foldable) - .mode(PanelMode.Half) - .dragBar(false) - .halfHeight(300) - .onChange((width: number, height: number, mode: PanelMode) => { - Log.showInfo(TAG, `width:${width},height:${height},mode:${mode}`) - }) - //.backgroundMask('red') - - Panel(this.show2) { - Column() { - Text("panel-OnHeightChange").fontSize(30) - } - } - .backgroundColor('red') - .type(PanelType.Foldable) - .mode(PanelMode.Half) - .dragBar(false) - .halfHeight(300) - .onChange((width: number, height: number, mode: PanelMode) => { - console.log(`width:${width},height:${height},mode:${mode}`) - }) - - // .onHeightChange((value: number) => { - // Log.showInfo(TAG, 'onHeightChange: ' + value) - // }) - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets deleted file mode 100644 index 24ea146ea..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/path.ets +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PathNe { - private path: any = new Path({ - width: 100, - height: 100, - commands: 'M150 0 L300 300 L0 300 Z' - }) - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PathNe start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PathNe end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("path-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - - Path().width(100).height(100).commands('M150 0 L300 300 L0 300 Z') - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets deleted file mode 100644 index c79573983..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/pluginComponent.ets +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -import pluginComponentManager from '@ohos.pluginComponent' -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PluginComponentRequest { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PluginComponentRequest start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PluginComponentRequest end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Text("pluginComponent-Request") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("requestText") - .onClick(() => { - pluginComponentManager.request({ - want: { - bundleName: "com.example.myapplication", - abilityName: "com.example.myapplication.MainAbility", - }, - name: "plugintemplate", - data: { - "key_1": "plugin component test", - "key_2": 34234 - }, - jsonPath: "" - }, (error, data) => { - console.log("request_callback: data=" + JSON.stringify(data)) - }) - }) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets deleted file mode 100644 index eede6d4aa..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polyLine.ets +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PolyLineNe { - private polyline: PolylineAttribute = new Polyline({ - width: 100, - height: 100 - }) - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PolyLineNe start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PolyLineNe end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("polyLine-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - - Polyline().width(100).height(100).points([[0, 0], [0, 100], [100, 100]]) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets deleted file mode 100644 index 9687cd808..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/polygon.ets +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PolygonNe { - private polygon: PolygonAttribute = new Polygon({ - width: 100, - height: 100 - }) - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PolygonNe start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PolygonNe end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("polygon-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - - Polygon({ width: 100, height: 100 }).points([[0, 0], [50, 100], [100, 0]]) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/progress.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/progress.ets deleted file mode 100644 index 7f718a879..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/progress.ets +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct ProgressStyle { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear ProgressStyle start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear ProgressStyle end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("progress-Style") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("styleText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets deleted file mode 100644 index 20cf82ec0..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/prompt.ets +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) 2022 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 prompt from '@ohos.prompt' -import Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct PromptShowDialog { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear PromptShowDialog start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear PromptShowDialog end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("prompt-ShowDialog") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("showDialogText") - .onClick(() => { - prompt.showDialog({ - title: 'Title Info', - message: 'Message Info', - buttons: [ - { text: 'button1', color: 'red' }, - { text: 'button2', color: 'blue' } - ] - }).then(data => { - console.info('showDialog success, click button: ' + data.index) - }).catch(err => { - console.info('showDialog error: ' + err) - }) - }) - - Text("prompt-ShowActionMenu") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("showActionMenuText") - .onClick(() => { - prompt.showActionMenu({ - title: 'Title Info', - buttons: [ - { text: 'item1', color: '#666666' }, - { text: 'item2', color: '#000000' } - ] - }).then(data => { - console.info('showDialog success, click button: ' + data.index) - }).catch(err => { - console.info('showDialog error: ' + err) - }) - }) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets deleted file mode 100644 index 5e36464e6..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/rect.ets +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct RectNe { - private rect: RectAttribute = new Rect({ - width: '90%', - height: 50, - radiusHeight: 20, - radiusWidth: 20 - }) - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear RectNe start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear RectNe end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("rect-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - - Rect({ width: '90%', height: 50 }).radiusHeight(20).radiusWidth(20) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/router.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/router.ets deleted file mode 100644 index dbde00df9..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/router.ets +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -import router1 from '@ohos.router' -import router2 from '@system.router' -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct RouterEnableAlertBeforeBackPage { - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear RouterEnableAlertBeforeBackPage start`) - - router1.enableAlertBeforeBackPage({ - message: 'Message Info' - }) - - router2.enableAlertBeforeBackPage({ - message: 'Message Info', - success: function () { - console.log('success') - }, - cancel: function () { - console.log('fail') - }, - }) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear RouterEnableAlertBeforeBackPage end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("ohos-router-EnableAlertBeforeBackPage") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("enableAlertBeforeBackPageText") - .onClick(() => { - router1.back() - }) - - Text("router-DisableAlertBeforeBackPage") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("disableAlertBeforeBackPageText") - .onClick(() => { - router1.disableAlertBeforeBackPage() - }) - - Text("router-EnableAlertBeforeBackPage") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("enableAlertBeforeBackPageText1") - .onClick(() => { - router2.back() - }) - - Text("router-DisableAlertBeforeBackPage") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("disableAlertBeforeBackPageText") - .onClick(() => { - router2.disableAlertBeforeBackPage() - }) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/scroll.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/scroll.ets deleted file mode 100644 index cb49110d2..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/scroll.ets +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct ScrollOnScrollBegin { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear ScrollOnScrollBegin start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear ScrollOnScrollBegin end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("scroll-OnScrollBegin") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onScrollBeginText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/search.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/search.ets deleted file mode 100644 index 54f38bdc4..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/search.ets +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct SearchOnCut { - controller: SearchController = new SearchController() - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear SearchOnCut start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear SearchOnCut end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("search-OnCut") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onCutText") - - Search({ value: '', placeholder: 'search-OnCut', controller: this.controller }) - .searchButton('Search') - .textFont({ size: 20 }) - .placeholderFont({ size: 20 }) - .onCut((value: string) => { - console.log('onCut: ' + value) - }) - - Text("search-OnPaste") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onPasteText") - - Search({ value: '', placeholder: 'search-OnPaste', controller: this.controller }) - .searchButton('Search') - .textFont({ size: 20 }) - .placeholderFont({ size: 20 }) - .onPaste((value: string) => { - console.log('onPaste: ' + value) - }) - - Text("search-CopyOption") - .width(320) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("copyOptionText") - - Search({ value: '', placeholder: 'search-OnCut', controller: this.controller }) - .searchButton('Search') - .textFont({ size: 20 }) - .placeholderFont({ size: 20 }) - //.copyOption(CopyOption.None) - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/select.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/select.ets deleted file mode 100644 index 5d3d238cd..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/select.ets +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct SelectOnSelect { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear SelectOnSelect start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear SelectOnSelect end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("select-OnSelect") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onSelectText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets deleted file mode 100644 index 4e0fbba4c..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/shape.ets +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -let my_shape = new Shape() -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct ShapeNe { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear ShapeNe start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear ShapeNe end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("shape-Ne") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("neText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/sideBar.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/sideBar.ets deleted file mode 100644 index 6e574613d..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/sideBar.ets +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct SideBarShowSideBar { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear SideBarShowSideBar start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear SideBarShowSideBar end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("sideBar-ShowSideBar") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("showSideBarText") - - Text("sideBar-AutoHide") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("autoHideText") - - Text("sideBar-SideBarPosition") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("sideBarPositionText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stack.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stack.ets deleted file mode 100644 index ce1f52427..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stack.ets +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct StackAlignContent { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear StackAlignContent start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear StackAlignContent end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("stack-AlignContent") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("alignContentText") - - - Stack({ alignContent: Alignment.Bottom }) { - Text('First child, show in bottom') - - .width('95%') - - .width('90%') - - .height('100%') - .backgroundColor(0xd2cab3) - .align(Alignment.Top) - Text('Second child, show in top') - .width('70%') - .height('60%') - .backgroundColor(0xc1cbac) - .align(Alignment.Top) - }.width('100%').height(150).margin({ top: 5 }) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stateManagement.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stateManagement.ets deleted file mode 100644 index ee21eea01..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/stateManagement.ets +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -// 接口使用存在问题 页面无法加载 发生crash -//let storage = LocalStorage.GetShared() -//storage.setOrCreate('varA',1) -//storage.setAndLink('varA',2) -//storage.setAndProp('varC ',1) - -@Entry -@Component -export default -struct StateManagementGetShared { - -aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear StateManagementGetShared start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear StateManagementGetShared end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("stateManagement-GetShared") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("GetSharedText") - - Text("stateManagement-SetOrCreate") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setOrCreateText") - - Text("stateManagement-SetAndLink") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setAndLinkText") - - Text("stateManagement-SetAndProp") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setAndPropText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets deleted file mode 100644 index 43a9673ad..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/swiper.ets +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -class MyDataSource implements IDataSource { - private list: number[] = [] - private listener: DataChangeListener - - constructor(list: number[]) { - this.list = list - } - - totalCount(): number { - return this.list.length - } - - getData(index: number): any { - return this.list[index] - } - - registerDataChangeListener(listener: DataChangeListener): void { - this.listener = listener - } - - unregisterDataChangeListener() { - } -} - - -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct SwiperCurve { - - private swiperController: SwiperController = new SwiperController() - private data: MyDataSource = new MyDataSource([]) - - aboutToAppear(): void { - Log.showInfo(TAG, `aboutToAppear SwiperCurve start`) - let list = [] - for (var i = 1; i <= 10; i++) { - list.push(i.toString()); - } - this.data = new MyDataSource(list) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear SwiperCurve end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Column({ space: 5 }) { - - Swiper(this.swiperController) { - LazyForEach(this.data, (item: string) => { - Text(item).width('90%').height(160).backgroundColor(0xAFEEEE).textAlign(TextAlign.Center).fontSize(20) - }, item => item) - } - .cachedCount(2) - .index(1) - .autoPlay(true) - .interval(4000) - .indicator(true) // 默认开启指示点 - .loop(false) // 默认开启循环播放 - .duration(1000) - .vertical(false) // 默认横向切换 - .itemSpace(0) - .curve(Curve.Linear) // 动画曲线 - .onChange((index: number) => { - console.info(index.toString()) - }) - - Flex({ justifyContent: FlexAlign.SpaceAround }) { - Button('next') - .onClick(() => { - this.swiperController.showNext() - }) - Button('preview') - .onClick(() => { - this.swiperController.showPrevious() - }) - } - }.margin({ top: 5 }) - - - Text("swiper-Curve") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("curveText") - - }.width("100%").height("100%") - - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets deleted file mode 100644 index e4f3ae50a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/tabs.ets +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct TabsBarPosition { - - private controller: TabsController = new TabsController() - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear TabsBarPosition start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear TabsBarPosition end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("tabs-BarPosition") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("barPositionText") - - - Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { - TabContent() { - Column().width('100%').height('100%').backgroundColor(Color.Pink) - }.tabBar('pink') - - TabContent() { - Column().width('100%').height('100%').backgroundColor(Color.Yellow) - }.tabBar('yellow') - - } - .vertical(true).scrollable(true).barMode(BarMode.Fixed) - .barWidth(70).barHeight(150).animationDuration(400) - .onChange((index: number) => { - console.info(index.toString()) - }) - .width('90%').backgroundColor(0xF5F5F5) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/text.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/text.ets deleted file mode 100644 index dbaf1e6c6..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/text.ets +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct TextMinFontSize { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear TextMinFontSize start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear TextMinFontSize end `) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("text-MinFontSize") - .width(100) - .height(70) - .fontSize('30px') - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("minFontSizeText") - .minFontSize('50px') - - Text("text-CopyOption") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("copyOptionText") - .copyOption(0) - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets deleted file mode 100644 index a97ff5670..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textArea.ets +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct TextAreaOnCut { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear TextAreaOnCut start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear TextAreaOnCut end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - TextArea({placeholder: "textArea-OnCut" }) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //input输入框中的文字被剪切时触发 - .onCut(() => { - console.log('onCut method is triggered'); - }) - .key("onCutText") - - TextArea({placeholder: "textArea-OnPaste" }) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //input输入框中的粘贴文字时触发 - .onPaste(() => { - console.log("onPaste method is triggered") - }) - .key("onPasteText") - - TextArea({placeholder: "textArea-CopyOption" }) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - /**copyOption(value: boolean | CopyOption): - * 设置复制选项时调用 - * InApp = 0,Share in app. - * LocalDevice = 1,Share in local device. - * CrossDevice = 2,Share cross device. - */ - .copyOption(0) - .key("copyOptionText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets deleted file mode 100644 index ee290598a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textInput.ets +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct TextInputOnEditChange { - @State num: number = 0 - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear TextInputOnEditChange start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear TextInputOnEditChange end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - TextInput({placeholder: "textInput-OnEditChange" }) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .onEditChange(() => { - console.log(`Input state changed ${this.num++}`) - }) - .key("onEditChangeText") - - TextInput({placeholder:"textInput-OnCut"}) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //input输入框中的文字被剪切时触发 - .onCut(() =>{ - console.log("onCut method is triggered") - }) - .key("onCutText") - - TextInput({placeholder:"textInput-OnPaste"}) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //input输入框中的粘贴文字时触发 - .onPaste(() => { - console.log("onPaste method is triggered") - }) - .key("onPasteText") - - TextInput({placeholder:"textInput-CopyOption"}) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //设置复制选项时调用 - .copyOption(0) - .key("copyOptionText") - - TextInput({placeholder:"textInput-ShowPasswordIcon"}) - .type(InputType.Password) - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - //设置密码显示/隐藏图标时调用 - .showPasswordIcon(true) - .key("showPasswordIconText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textPicker.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textPicker.ets deleted file mode 100644 index cfc3d49e9..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/textPicker.ets +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct TextPickerDefaultPickerItemHeight { - private select: number = 1 - private fruits: string[] = ['1.apple', '2.orange','3.peach', '4.grape'] - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear TextPickerDefaultPickerItemHeight start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear TextPickerDefaultPickerItemHeight end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - TextPicker({range: this.fruits, selected: this.select}) - .onChange((value: string, index: number) => { - console.info('Picker item changed, value: ' + value + ', index: ' + index) - }) - .defaultPickerItemHeight('80px') - .key("defaultPickerItemHeightText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets deleted file mode 100644 index 99ed397e6..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/uiAppearance.ets +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; - -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct uiAppearanceSetDarkMode { - xcomponentController: XComponentController = new XComponentController() - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear uiAppearanceSetDarkMode start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear uiAppearanceSetDarkMode end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("uiAppearance-setDarkMode1") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("uiAppearance-setDarkMode1Text") - .onClick(() => { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK, (err) => { - console.info(`uiAppearance.setDarkMode: ${err}`); - }) - }) - - Text("uiAppearance-getDarkMode") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("uiAppearance-getDarkModeText") - .onClick(() => { - console.log('uiAppearance.getDarkMode: ' + JSON.stringify(uiAppearance.getDarkMode())) - }) - - Text("uiAppearance-setDarkMode2") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("uiAppearance-setDarkMode2Text") - .onClick(() => { - uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_DARK) - }) - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets deleted file mode 100644 index fdbf5edce..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/video.ets +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct VideoOnFullscreenChange { - - @State srcs: Resource = $rawfile('videoTest.mp4'); - @State currentProgressRates: number = 1; - @State autoPlays: boolean = false; - controller: VideoController = new VideoController(); - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear VideoOnFullscreenChange start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear VideoOnFullscreenChange end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Video({ - src: this.srcs, - currentProgressRate: this.currentProgressRates, - controller: this.controller - }).width(600).height(400) - .autoPlay(this.autoPlays) - .key("onFullscreenChangeText") - .onStart(() => { - console.error('onStart'); - }) - .onFullscreenChange(() => { - console.log('screen is changed') - console.info('screen is changed') - console.error('screen is changed') - console.warn('screen is changed') - }) - .onPause(() => { - console.error('onPause'); - }) - .onFinish(() => { - console.error('onFinish'); - }) - .onError(() => { - console.error('onFinish'); - }) - .onPrepared((e) => { - console.error('onPrepared is ' + e.duration); - }) - .onSeeking((e) => { - console.error('onSeeking is ' + e.time); - }) - .onSeeked((e) => { - console.error('onSeekedis ' + e.time); - }) - .onUpdate((e) => { - console.error('onUpdateis ' + e.time); - }) - Row() { - Button("FullScreen").onClick(() => { - this.controller.requestFullscreen(true) - }); - Button("ExitFullScreen").onClick(() => { - this.controller.exitFullscreen() - }); - } - - Row() { - Button("start").onClick(() => { - this.controller.start(); - }); - Button("pause").onClick(() => { - this.controller.pause(); - }); - Button("stop").onClick(() => { - this.controller.stop(); - }); - } - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/viewModel.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/viewModel.ets deleted file mode 100644 index 52badbe82..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/viewModel.ets +++ /dev/null @@ -1,598 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default -struct ViewModelMatrix { - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear ViewModelMatrix start`) - } - - aboutToDisappear(){ - Log.showInfo(TAG, `aboutToDisAppear ViewModelMatrix end`) - } - - build(){ - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,justifyContent:FlexAlign.Center }){ - - Text("viewModel-Matrix") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("matrixText") - - Text("viewModel-Matrix3d") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("matrix3dText") - - Text("viewModel-Translate3d") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("translate3dText") - - Text("viewModel-TranslateX") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("translateXText") - - Text("viewModel-TranslateY") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("translateYText") - - Text("viewModel-TranslateZ") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("translateZText") - - Text("viewModel-Scale3d") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("scale3dText") - - Text("viewModel-ScaleX") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("scaleXText") - - Text("viewModel-ScaleY") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("scaleYText") - - Text("viewModel-ScaleZ") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("scaleZText") - - Text("viewModel-Rotate3d") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("rotate3dText") - - Text("viewModel-RotateX") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("rotateXText") - - Text("viewModel-RotateY") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("rotateYText") - - Text("viewModel-RotateZ") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("rotateZText") - - Text("viewModel-Skew") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("skewText") - - Text("viewModel-SkewX") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("skewXText") - - Text("viewModel-SkewY") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("skewYText") - - Text("viewModel-Perspective") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("perspectiveText") - - Text("viewModel-Rotation") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("rotationText") - - Text("viewModel-AddChild") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("addChildText") - - Text("viewModel-SetAttribute") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setAttributeText") - - Text("viewModel-SetStyle") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setStyleText") - - Text("viewModel-ScrollArrow") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("scrollArrowText") - - Text("viewModel-TakePhoto") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("takePhotoText") - - Text("viewModel-$tc") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$tcText") - - Text("viewModel-$set") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$setText") - - Text("viewModel-$delete") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$deleteText") - - Text("viewModel-$root") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$rootText") - - Text("viewModel-$parent") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$parentText") - - Text("viewModel-$child") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$childText") - - Text("viewModel-$watch") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$watchText") - - Text("viewModel-$emit") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("$emitText") - - Text("viewModel-OnBackPress") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onBackPressText") - - Text("viewModel-OnNewRequest") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onNewRequestText") - - Text("viewModel-OnStartContinuation") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onStartContinuationText") - - Text("viewModel-OnSaveData") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onSaveDataText") - - Text("viewModel-OnRestoreData") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onRestoreDataText") - - Text("viewModel-OnCompleteContinuation") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onCompleteContinuationText") - - Text("viewModel-OnConfigurationUpdated") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("onConfigurationUpdatedText") - - Text("viewModel-ExtendViewModel") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("extendViewModelText") - - }.width("100%").height("100%") - } -} - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets deleted file mode 100644 index 4a4c1638b..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/web.ets +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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 Log from '../common/Log.ets'; - -@Entry -@Component -struct WebComponent { - @State progress: number = 0; - @State hideProgress: boolean = true; - fileAccess: boolean = true; - // 定义Web组件的控制器controller - controller: WebController = new WebController(); - webResourceResponse: WebResourceResponse = new WebResourceResponse(); - build() { - Column() { - Text('Hello world!') - .fontSize(20) - Progress({value: this.progress, total: 100}) - .color('#0000ff') - .visibility(this.hideProgress ? Visibility.None : Visibility.Visible) - // 初始化Web组件,并绑定controller - Web({ src: $rawfile('index.html'), controller: this.controller }) - .key("getTitleText") - .fileAccess(this.fileAccess) - .javaScriptAccess(true) - .height(500) - .padding(20) - .blur(2) - .userAgent("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36") - .fileFromUrlAccess(true) - .initialScale(2) - .webDebuggingAccess(true) - .onPrompt((event) => { - console.info('onPrompt url: ', event.url); - console.info('onPrompt message: ', event.message); - console.info('onPrompt result: ', event.result); - console.info('onPrompt handlePromptConfirm: ', event.result.handlePromptConfirm("confirm")); - return true; - }) - .onShowFileSelector((event) => { - console.info('onShowFileSelector getAcceptType: ', event.fileSelector.getAcceptType()); - console.info('onShowFileSelector getTitle: ', event.fileSelector.getTitle()); - console.info('onShowFileSelector getMode: ', event.fileSelector.getMode()); - console.info('onShowFileSelector isCapture: ', event.fileSelector.isCapture()); - event.result.handleFileList(["D:\DevEcoStudioProjects","D:\DevEcoStudioProjects"]) - return true; - }) - .onRenderExited((event) => { - console.info('onRenderExited getAcceptType: ', event.renderExitReason); - }) - .onProgressChange(e => { - this.progress = e.newProgress; - if (this.progress === 100) { - this.hideProgress = true; - } else { - this.hideProgress = false; - } - }) - .onResourceLoad((event) => { - console.info('onResourceLoad url: ', event.url); - return true; - }) - .onPageEnd(e => { - // test()在index.html中定义 - this.controller.runJavaScript({ script: 'test()' }); - console.info('url: ', e.url); - }) - .onHttpAuthRequest((event) => { - console.info('onHttpAuthRequest host: ', event.host); - console.info('onHttpAuthRequest realm: ', event.realm); - console.info('onHttpAuthRequest isHttpAuthInfoSaved: ', event.handler.isHttpAuthInfoSaved()); - let result = event.handler; - return true; - }) - .onInterceptRequest((event) => { - console.info('onInterceptRequest getRequestUrl: ', event.request.getRequestUrl()); - console.info('onInterceptRequest isMainFrame: ', event.request.isMainFrame()); - console.info('onInterceptRequest isRedirect: ', event.request.isRedirect()); - console.info('onInterceptRequest isRequestGesture: ', event.request.isRequestGesture()); - let result = event.request.getRequestHeader(); - console.log('The request header result size is ' + result.length); - for (let i of result) { - console.log('The request header key is : ' + i.headerKey + ' , value is : ' + i.headerValue); - } - return this.webResourceResponse; - }) -// .onContextMenuShow((event) => { -// console.info("x coord = " + event.param.x()); -// console.info("y coord = " + event.param.y()); -// console.info("link url = " + event.param.getLinkUrl()); -// console.info("unfilterendLinkUrl = " + event.param.getUnfilterendLinkUrl()); -// console.info("sourceUrl = " + event.param.getSourceUrl()); -// console.info("existsImageContents = " + event.param.existsImageContents()); -// console.info("closeContextMenu = " + event.result.closeContextMenu()); -// console.info("copyImage = " + event.result.copyImage()); -// }) -// .onPermissionRequest((event) => { -// AlertDialog.show({ -// title: 'title', -// message: 'text', -// confirm: { -// value: 'onConfirm', -// action: () => { -// event.request.grant(event.request.getAccessibleResource()); -// console.info('onPermissionRequest getAccessibleResource: ', event.request.getAccessibleResource()); -// console.info('onPermissionRequest getOrigin: ', event.request.getOrigin()); -// } -// }, -// cancel: () => { -// event.request.deny(); -// } -// }) -// }) - .onScaleChange((event) => { - console.info('onScaleChange oldScale: ', event.oldScale); - console.info('onScaleChange newScale: ', event.newScale); - }) - .onHttpErrorReceive((event) => { - console.log('url:' + event.request.getRequestUrl()); - console.log('isMainFrame:' + event.request.isMainFrame()); - console.log('isRedirect:' + event.request.isRedirect()); - console.log('isRequestGesture:' + event.request.isRequestGesture()); - console.log('getResponseData:' + event.response.getResponseData()); - console.log('getResponseEncoding:' + event.response.getResponseEncoding()); - console.log('getResponseMimeType:' + event.response.getResponseMimeType()); - console.log('getResponseCode:' + event.response.getResponseCode()); - console.log('getReasonMessage:' + event.response.getReasonMessage()); - console.log('setResponseData:' + event.response.setResponseData("ResponseData")); - console.log('setReasonMessage:' + event.response.setReasonMessage("success")); - console.log('setResponseCode:' + event.response.setResponseCode(200)); - console.log('setResponseEncoding:' + event.response.setResponseEncoding("UTF-8")); - console.log('setResponseMimeType:' + event.response.setResponseMimeType("application/json")); - console.log('setResponseHeader:' + event.response.setResponseHeader([])); - console.log('web getExtra:' + this.controller.getHitTestValue().getExtra()); - console.log('web getType:' + this.controller.getHitTestValue().getType()); - console.log('web getCookieManager:' + this.controller.getCookieManager()); - console.log('web getCookie:' + this.controller.getCookieManager().getCookie("www.baidu.com")); - console.log('web existCookie:' + this.controller.getCookieManager().existCookie()); - console.log('web deleteEntireCookie:' + this.controller.getCookieManager().deleteEntireCookie()); - console.log('web deleteExpiredCookie:' + this.controller.getCookieManager().deleteExpiredCookie()); - console.log('web deleteSessionCookie:' + this.controller.getCookieManager().deleteSessionCookie()); - console.log('web isCookieAllowed:' + this.controller.getCookieManager().isCookieAllowed()); - console.log('web isFileURICookieAllowed:' + this.controller.getCookieManager().isFileURICookieAllowed()); - console.log('web isThirdPartyCookieAllowed:' + this.controller.getCookieManager().isThirdPartyCookieAllowed()); - console.log('web putAcceptCookieEnabled:' + this.controller.getCookieManager().putAcceptCookieEnabled(true)); - console.log('web putAcceptFileURICookieEnabled:' + this.controller.getCookieManager().putAcceptFileURICookieEnabled(true)); - console.log('web putAcceptThirdPartyCookieEnabled:' + this.controller.getCookieManager().putAcceptThirdPartyCookieEnabled(true)); - console.log('web saveCookieSync:' + this.controller.getCookieManager().saveCookieSync()); - console.log('web zoomIn:' + this.controller.zoomIn()); - console.log('web zoomOut:' + this.controller.zoomOut()); - console.log('web zoom:' + this.controller.zoom(2)); - console.log('web getWebId:' + this.controller.getWebId()); - console.log('web getDefaultUserAgent:' + this.controller.getDefaultUserAgent()); - console.log('web getTitle:' + this.controller.getTitle()); - console.log('web getPageHeight:' + this.controller.getPageHeight()); - console.log('web backOrForward:' + this.controller.backOrForward(2)); - - - let result = event.request.getRequestHeader(); - console.log('The request header result size is ' + result.length); - for (let i of result) { - console.log('The request header key is : ' + i.headerKey + ' , value is : ' + i.headerValue); - } - let resph = event.response.getResponseHeader(); - console.log('The response header result size is ' + resph.length); - for (let i of resph) { - console.log('The response header key is : ' + i.headerKey + ' , value is : ' + i.headerValue); - } - }) - Text('End') - .fontSize(20) - } - } -} \ No newline at end of file diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/xcomponent.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/xcomponent.ets deleted file mode 100644 index e3c10cc7d..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/MainAbility/pages/xcomponent.ets +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2022 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 Log from '../common/Log.ets'; -const TAG = 'ets_apiLack_add'; - -@Entry -@Component -export default struct XcomponentGetXComponentContext { - xcomponentController: XComponentController = new XComponentController() - - aboutToAppear() { - Log.showInfo(TAG, `aboutToAppear XcomponentGetXComponentContext start`) - } - - aboutToDisappear() { - Log.showInfo(TAG, `aboutToDisAppear XcomponentGetXComponentContext end`) - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - - Text("xcomponent-GetXComponentContext") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("getXComponentContextText") - .onClick(() => { - Log.showInfo(TAG, 'xcomponentController.getXComponentContext' + JSON.stringify(this.xcomponentController.getXComponentContext())) - }) - - Text("xcomponent-SetXComponentSurfaceSize") - .width(100) - .height(70) - .fontSize(20) - .opacity(1) - .align(Alignment.TopStart) - .fontColor(0xCCCCCC) - .lineHeight(25) - .border({ width: 1 }) - .padding(10) - .textAlign(TextAlign.Center) - .textOverflow({ overflow: TextOverflow.None }) - .key("setXComponentSurfaceSizeText") - .onClick(() => { - this.xcomponentController.setXComponentSurfaceSize({ - surfaceWidth: 200, - surfaceHeight: 200 - }) - }) - - }.width("100%").height("100%") - } -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/Utils.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/Utils.ets deleted file mode 100644 index aa94fe4f7..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/Utils.ets +++ /dev/null @@ -1,118 +0,0 @@ -// @ts-nocheck -/** - * 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 class Utils { - static rect_left; - static rect_top; - static rect_right; - static rect_bottom; - static rect_value; - - static sleep(time) { - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve() - }, time) - }).then(() => { - console.info(`sleep ${time} over...`) - }) - } - - static getComponentRect(key) { - let strJson = getInspectorByKey(key); - let obj = JSON.parse(strJson); - console.info("[getInspectorByKey] current component obj is: " + JSON.stringify(obj)); - let rectInfo = JSON.parse('[' + obj.$rect + ']') - console.info("[getInspectorByKey] rectInfo is: " + rectInfo); - this.rect_left = JSON.parse('[' + rectInfo[0] + ']')[0] - this.rect_top = JSON.parse('[' + rectInfo[0] + ']')[1] - this.rect_right = JSON.parse('[' + rectInfo[1] + ']')[0] - this.rect_bottom = JSON.parse('[' + rectInfo[1] + ']')[1] - return this.rect_value = { - "left": this.rect_left, "top": this.rect_top, "right": this.rect_right, "bottom": this.rect_bottom - } - } - - static async swipe(downX, downY, upX, upY, steps) { - console.info('start to swipe') - this.drags(downX, downY, upX, upY, steps, false) - } - - static async drag(downX, downY, upX, upY, steps) { - console.info('start to drag') - this.drags(downX, downY, upX, upY, steps, true) - } - - static async drags(downX, downY, upX, upY, steps, drag) { - var xStep; - var yStep; - var swipeSteps; - var ret; - xStep = 0; - yStep = 0; - ret = false; - swipeSteps = steps; - if (swipeSteps == 0) { - swipeSteps = 1; - } - xStep = (upX - downX) / swipeSteps; - yStep = (upY - downY) / swipeSteps; - console.info('move step is: ' + 'xStep: ' + xStep + ' yStep: ' + yStep) - var downPonit: TouchObject = { - id: 1, - x: downX, - y: downY, - type: TouchType.Down, - } - console.info('down touch started: ' + JSON.stringify(downPonit)) - sendTouchEvent(downPonit); - console.info('start to move') - if (drag) { - await this.sleep(500) - } - for (var i = 1;i <= swipeSteps; i++) { - var movePoint: TouchObject = { - id: 1, - x: downX + (xStep * i), - y: downY + (yStep * i), - type: TouchType.Move - } - console.info('move touch started: ' + JSON.stringify(movePoint)) - ret = sendTouchEvent(movePoint) - if (ret == false) { - break; - } - await this.sleep(5) - } - console.info('start to up') - if (drag) { - await this.sleep(100) - } - var upPoint: TouchObject = { - id: 1, - x: upX, - y: upY, - type: TouchType.Up, - } - console.info('up touch started: ' + JSON.stringify(upPoint)) - sendTouchEvent(upPoint) - await this.sleep(500) - } -} - - - - diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/ellipse.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/ellipse.test.ets deleted file mode 100644 index 1e5d1d7b5..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/ellipse.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function ellipseNeJsunit() { - describe('ellipseNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/ellipse', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get ellipse state success " + JSON.stringify(pages)); - if (!("ellipse" == pages.name)) { - console.info("get ellipse state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push ellipse page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push ellipse page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("ellipseNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testellipseNe0001 - * @tc.desic aceellipseNeEtsTest0001 - */ - it('testellipseNe0001', 0, async function (done) { - console.info('ellipseNe testellipseNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testellipseNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testellipseNe0002 - * @tc.desic aceellipseNeEtsTest0002 - */ - it('testellipseNe0002', 0, async function (done) { - console.info('ellipseNe testellipseNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testellipseNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testellipseNe0003 - * @tc.desic aceellipseNeEtsTest0003 - */ - it('testellipseNe0003', 0, async function (done) { - console.info('ellipseNe testellipseNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testellipseNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testellipseNe0004 - * @tc.desic aceellipseNeEtsTest0004 - */ - it('testellipseNe0004', 0, async function (done) { - console.info('ellipseNe testellipseNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testellipseNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testellipseNe0005 - * @tc.desic aceellipseNeEtsTest0005 - */ - it('testellipseNe0005', 0, async function (done) { - console.info('ellipseNe testellipseNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testellipseNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testellipseNe0006 - * @tc.desic aceellipseNeEtsTest0006 - */ - it('testellipseNe0006', 0, async function (done) { - console.info('ellipseNe testellipseNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testellipseNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testellipseNe0007 - * @tc.desic aceellipseNeEtsTest0007 - */ - it('testellipseNe0007', 0, async function (done) { - console.info('ellipseNe testellipseNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testellipseNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testellipseNe0009 - * @tc.desic aceellipseNeEtsTest0009 - */ - it('testellipseNe0009', 0, async function (done) { - console.info('ellipseNe testellipseNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testellipseNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testellipseNe0010 - * @tc.desic aceellipseNeEtsTest0010 - */ - it('testellipseNe0010', 0, async function (done) { - console.info('ellipseNe testellipseNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testellipseNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testellipseNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/featureAbility.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/featureAbility.test.ets deleted file mode 100644 index e1c43c2e9..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/featureAbility.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function featureAbilityStartAbilityJsunit() { - describe('featureAbilityStartAbilityTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/featureAbility', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get featureAbility state success " + JSON.stringify(pages)); - if (!("featureAbility" == pages.name)) { - console.info("get featureAbility state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push featureAbility page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push featureAbility page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("featureAbilityStartAbility after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testfeatureAbilityStartAbility0001 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0001 - */ - it('testfeatureAbilityStartAbility0001', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("320.00vp"); - console.info("[testfeatureAbilityStartAbility0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testfeatureAbilityStartAbility0002 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0002 - */ - it('testfeatureAbilityStartAbility0002', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testfeatureAbilityStartAbility0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testfeatureAbilityStartAbility0003 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0003 - */ - it('testfeatureAbilityStartAbility0003', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testfeatureAbilityStartAbility0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testfeatureAbilityStartAbility0004 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0004 - */ - it('testfeatureAbilityStartAbility0004', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testfeatureAbilityStartAbility0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testfeatureAbilityStartAbility0005 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0005 - */ - it('testfeatureAbilityStartAbility0005', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testfeatureAbilityStartAbility0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testfeatureAbilityStartAbility0006 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0006 - */ - it('testfeatureAbilityStartAbility0006', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testfeatureAbilityStartAbility0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testfeatureAbilityStartAbility0007 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0007 - */ - it('testfeatureAbilityStartAbility0007', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testfeatureAbilityStartAbility0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testfeatureAbilityStartAbility0009 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0009 - */ - it('testfeatureAbilityStartAbility0009', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testfeatureAbilityStartAbility0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testfeatureAbilityStartAbility0010 - * @tc.desic acefeatureAbilityStartAbilityEtsTest0010 - */ - it('testfeatureAbilityStartAbility0010', 0, async function (done) { - console.info('featureAbilityStartAbility testfeatureAbilityStartAbility0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('startAbilityText'); - console.info("[testfeatureAbilityStartAbility0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testfeatureAbilityStartAbility0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets deleted file mode 100644 index 609d0c4e0..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gauge.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function gaugeColorsJsunit() { - describe('gaugeColorsTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/gauge', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get gauge state success " + JSON.stringify(pages)); - if (!("gauge" == pages.name)) { - console.info("get gauge state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push gauge page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push gauge page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("gaugeColors after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgaugeColors0001 - * @tc.desic acegaugeColorsEtsTest0001 - */ - it('testgaugeColors0001', 0, async function (done) { - console.info('gaugeColors testgaugeColors0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgaugeColors0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgaugeColors0002 - * @tc.desic acegaugeColorsEtsTest0002 - */ - it('testgaugeColors0002', 0, async function (done) { - console.info('gaugeColors testgaugeColors0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgaugeColors0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgaugeColors0003 - * @tc.desic acegaugeColorsEtsTest0003 - */ - it('testgaugeColors0003', 0, async function (done) { - console.info('gaugeColors testgaugeColors0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgaugeColors0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgaugeColors0004 - * @tc.desic acegaugeColorsEtsTest0004 - */ - it('testgaugeColors0004', 0, async function (done) { - console.info('gaugeColors testgaugeColors0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgaugeColors0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgaugeColors0005 - * @tc.desic acegaugeColorsEtsTest0005 - */ - it('testgaugeColors0005', 0, async function (done) { - console.info('gaugeColors testgaugeColors0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgaugeColors0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgaugeColors0006 - * @tc.desic acegaugeColorsEtsTest0006 - */ - it('testgaugeColors0006', 0, async function (done) { - console.info('gaugeColors testgaugeColors0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgaugeColors0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgaugeColors0007 - * @tc.desic acegaugeColorsEtsTest0007 - */ - it('testgaugeColors0007', 0, async function (done) { - console.info('gaugeColors testgaugeColors0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgaugeColors0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgaugeColors0009 - * @tc.desic acegaugeColorsEtsTest0009 - */ - it('testgaugeColors0009', 0, async function (done) { - console.info('gaugeColors testgaugeColors009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgaugeColors0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgaugeColors0010 - * @tc.desic acegaugeColorsEtsTest0010 - */ - it('testgaugeColors0010', 0, async function (done) { - console.info('gaugeColors testgaugeColors0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('colorsText'); - console.info("[testgaugeColors0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgaugeColors0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gesture.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gesture.test.ets deleted file mode 100644 index 58d075b5d..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gesture.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function gestureSetDirectionJsunit() { - describe('gestureSetDirectionTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/gesture', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get gesture state success " + JSON.stringify(pages)); - if (!("gesture" == pages.name)) { - console.info("get gesture state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push gesture page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push gesture page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("gestureSetDirection after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgestureSetDirection0001 - * @tc.desic acegestureSetDirectionEtsTest0001 - */ - it('testgestureSetDirection0001', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgestureSetDirection0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgestureSetDirection0002 - * @tc.desic acegestureSetDirectionEtsTest0002 - */ - it('testgestureSetDirection0002', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgestureSetDirection0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgestureSetDirection0003 - * @tc.desic acegestureSetDirectionEtsTest0003 - */ - it('testgestureSetDirection0003', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgestureSetDirection0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgestureSetDirection0004 - * @tc.desic acegestureSetDirectionEtsTest0004 - */ - it('testgestureSetDirection0004', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgestureSetDirection0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgestureSetDirection0005 - * @tc.desic acegestureSetDirectionEtsTest0005 - */ - it('testgestureSetDirection0005', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgestureSetDirection0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgestureSetDirection0006 - * @tc.desic acegestureSetDirectionEtsTest0006 - */ - it('testgestureSetDirection0006', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgestureSetDirection0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgestureSetDirection0007 - * @tc.desic acegestureSetDirectionEtsTest0007 - */ - it('testgestureSetDirection0007', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgestureSetDirection0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgestureSetDirection0009 - * @tc.desic acegestureSetDirectionEtsTest0009 - */ - it('testgestureSetDirection0009', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgestureSetDirection0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgestureSetDirection0010 - * @tc.desic acegestureSetDirectionEtsTest0010 - */ - it('testgestureSetDirection0010', 0, async function (done) { - console.info('gestureSetDirection testgestureSetDirection0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('setDirectionText'); - console.info("[testgestureSetDirection0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgestureSetDirection0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid.test.ets deleted file mode 100644 index af9e28419..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function gridMaxCountJsunit() { - describe('gridMaxCountTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/grid', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get grid state success " + JSON.stringify(pages)); - if (!("grid" == pages.name)) { - console.info("get grid state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push grid page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push grid page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("gridMaxCount after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgridMaxCount0001 - * @tc.desic acegridMaxCountEtsTest0001 - */ - it('testgridMaxCount0001', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgridMaxCount0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgridMaxCount0002 - * @tc.desic acegridMaxCountEtsTest0002 - */ - it('testgridMaxCount0002', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgridMaxCount0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgridMaxCount0003 - * @tc.desic acegridMaxCountEtsTest0003 - */ - it('testgridMaxCount0003', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgridMaxCount0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgridMaxCount0004 - * @tc.desic acegridMaxCountEtsTest0004 - */ - it('testgridMaxCount0004', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgridMaxCount0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgridMaxCount0005 - * @tc.desic acegridMaxCountEtsTest0005 - */ - it('testgridMaxCount0005', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgridMaxCount0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgridMaxCount0006 - * @tc.desic acegridMaxCountEtsTest0006 - */ - it('testgridMaxCount0006', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgridMaxCount0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgridMaxCount0007 - * @tc.desic acegridMaxCountEtsTest0007 - */ - it('testgridMaxCount0007', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgridMaxCount0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgridMaxCount0009 - * @tc.desic acegridMaxCountEtsTest0009 - */ - it('testgridMaxCount0009', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgridMaxCount0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgridMaxCount0010 - * @tc.desic acegridMaxCountEtsTest0010 - */ - it('testgridMaxCount0010', 0, async function (done) { - console.info('gridMaxCount testgridMaxCount0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('maxCountText'); - console.info("[testgridMaxCount0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgridMaxCount0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gridItem.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gridItem.test.ets deleted file mode 100644 index f534c8f39..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/gridItem.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function gridItemOnSelectJsunit() { - describe('gridItemOnSelectTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/gridItem', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get gridItem state success " + JSON.stringify(pages)); - if (!("gridItem" == pages.name)) { - console.info("get gridItem state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push gridItem page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push gridItem page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("gridItemOnSelect after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgridItemOnSelect0001 - * @tc.desic acegridItemOnSelectEtsTest0001 - */ - it('testgridItemOnSelect0001', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgridItemOnSelect0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgridItemOnSelect0002 - * @tc.desic acegridItemOnSelectEtsTest0002 - */ - it('testgridItemOnSelect0002', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgridItemOnSelect0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgridItemOnSelect0003 - * @tc.desic acegridItemOnSelectEtsTest0003 - */ - it('testgridItemOnSelect0003', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgridItemOnSelect0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgridItemOnSelect0004 - * @tc.desic acegridItemOnSelectEtsTest0004 - */ - it('testgridItemOnSelect0004', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgridItemOnSelect0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgridItemOnSelect0005 - * @tc.desic acegridItemOnSelectEtsTest0005 - */ - it('testgridItemOnSelect0005', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgridItemOnSelect0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgridItemOnSelect0006 - * @tc.desic acegridItemOnSelectEtsTest0006 - */ - it('testgridItemOnSelect0006', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgridItemOnSelect0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgridItemOnSelect0007 - * @tc.desic acegridItemOnSelectEtsTest0007 - */ - it('testgridItemOnSelect0007', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgridItemOnSelect0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgridItemOnSelect0009 - * @tc.desic acegridItemOnSelectEtsTest0009 - */ - it('testgridItemOnSelect0009', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgridItemOnSelect0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgridItemOnSelect0010 - * @tc.desic acegridItemOnSelectEtsTest0010 - */ - it('testgridItemOnSelect0010', 0, async function (done) { - console.info('gridItemOnSelect testgridItemOnSelect0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testgridItemOnSelect0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgridItemOnSelect0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_col.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_col.test.ets deleted file mode 100644 index 4e4a8e57c..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_col.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function grid_colSpanJsunit() { - describe('grid_colSpanTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/grid_col', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get grid_col state success " + JSON.stringify(pages)); - if (!("grid_col" == pages.name)) { - console.info("get grid_col state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push grid_col page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push grid_col page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("grid_colSpan after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgrid_colSpan0001 - * @tc.desic acegrid_colSpanEtsTest0001 - */ - it('testgrid_colSpan0001', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgrid_colSpan0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgrid_colSpan0002 - * @tc.desic acegrid_colSpanEtsTest0002 - */ - it('testgrid_colSpan0002', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgrid_colSpan0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgrid_colSpan0003 - * @tc.desic acegrid_colSpanEtsTest0003 - */ - it('testgrid_colSpan0003', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgrid_colSpan0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgrid_colSpan0004 - * @tc.desic acegrid_colSpanEtsTest0004 - */ - it('testgrid_colSpan0004', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgrid_colSpan0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgrid_colSpan0005 - * @tc.desic acegrid_colSpanEtsTest0005 - */ - it('testgrid_colSpan0005', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgrid_colSpan0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgrid_colSpan0006 - * @tc.desic acegrid_colSpanEtsTest0006 - */ - it('testgrid_colSpan0006', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgrid_colSpan0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgrid_colSpan0007 - * @tc.desic acegrid_colSpanEtsTest0007 - */ - it('testgrid_colSpan0007', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgrid_colSpan0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgrid_colSpan0009 - * @tc.desic acegrid_colSpanEtsTest0009 - */ - it('testgrid_colSpan0009', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgrid_colSpan0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgrid_colSpan0010 - * @tc.desic acegrid_colSpanEtsTest0010 - */ - it('testgrid_colSpan0010', 0, async function (done) { - console.info('grid_colSpan testgrid_colSpan0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('spanText'); - console.info("[testgrid_colSpan0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgrid_colSpan0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_row.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_row.test.ets deleted file mode 100644 index 67204bf3b..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/grid_row.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function grid_rowOnBreakpointChangeJsunit() { - describe('grid_rowOnBreakpointChangeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/grid_row', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get grid_row state success " + JSON.stringify(pages)); - if (!("grid_row" == pages.name)) { - console.info("get grid_row state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push grid_row page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push grid_row page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("grid_rowOnBreakpointChange after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testgrid_rowOnBreakpointChange0001 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0001 - */ - it('testgrid_rowOnBreakpointChange0001', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testgrid_rowOnBreakpointChange0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testgrid_rowOnBreakpointChange0002 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0002 - */ - it('testgrid_rowOnBreakpointChange0002', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testgrid_rowOnBreakpointChange0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testgrid_rowOnBreakpointChange0003 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0003 - */ - it('testgrid_rowOnBreakpointChange0003', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testgrid_rowOnBreakpointChange0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testgrid_rowOnBreakpointChange0004 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0004 - */ - it('testgrid_rowOnBreakpointChange0004', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testgrid_rowOnBreakpointChange0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testgrid_rowOnBreakpointChange0005 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0005 - */ - it('testgrid_rowOnBreakpointChange0005', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testgrid_rowOnBreakpointChange0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testgrid_rowOnBreakpointChange0006 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0006 - */ - it('testgrid_rowOnBreakpointChange0006', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testgrid_rowOnBreakpointChange0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testgrid_rowOnBreakpointChange0007 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0007 - */ - it('testgrid_rowOnBreakpointChange0007', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testgrid_rowOnBreakpointChange0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testgrid_rowOnBreakpointChange0009 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0009 - */ - it('testgrid_rowOnBreakpointChange0009', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testgrid_rowOnBreakpointChange0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testgrid_rowOnBreakpointChange0010 - * @tc.desic acegrid_rowOnBreakpointChangeEtsTest0010 - */ - it('testgrid_rowOnBreakpointChange0010', 0, async function (done) { - console.info('grid_rowOnBreakpointChange testgrid_rowOnBreakpointChange0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onBreakpointChangeText'); - console.info("[testgrid_rowOnBreakpointChange0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testgrid_rowOnBreakpointChange0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/lazyForEach.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/lazyForEach.test.ets deleted file mode 100644 index 46f490615..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/lazyForEach.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function lazyForEachOnDataAddJsunit() { - describe('lazyForEachOnDataAddTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/lazyForEach', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get lazyForEach state success " + JSON.stringify(pages)); - if (!("lazyForEach" == pages.name)) { - console.info("get lazyForEach state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push lazyForEach page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push lazyForEach page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("lazyForEachOnDataAdd after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testlazyForEachOnDataAdd0001 - * @tc.desic acelazyForEachOnDataAddEtsTest0001 - */ - it('testlazyForEachOnDataAdd0001', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("300.00vp"); - console.info("[testlazyForEachOnDataAdd0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testlazyForEachOnDataAdd0002 - * @tc.desic acelazyForEachOnDataAddEtsTest0002 - */ - it('testlazyForEachOnDataAdd0002', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testlazyForEachOnDataAdd0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testlazyForEachOnDataAdd0003 - * @tc.desic acelazyForEachOnDataAddEtsTest0003 - */ - it('testlazyForEachOnDataAdd0003', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testlazyForEachOnDataAdd0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testlazyForEachOnDataAdd0004 - * @tc.desic acelazyForEachOnDataAddEtsTest0004 - */ - it('testlazyForEachOnDataAdd0004', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testlazyForEachOnDataAdd0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testlazyForEachOnDataAdd0005 - * @tc.desic acelazyForEachOnDataAddEtsTest0005 - */ - it('testlazyForEachOnDataAdd0005', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testlazyForEachOnDataAdd0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testlazyForEachOnDataAdd0006 - * @tc.desic acelazyForEachOnDataAddEtsTest0006 - */ - it('testlazyForEachOnDataAdd0006', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testlazyForEachOnDataAdd0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testlazyForEachOnDataAdd0007 - * @tc.desic acelazyForEachOnDataAddEtsTest0007 - */ - it('testlazyForEachOnDataAdd0007', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testlazyForEachOnDataAdd0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testlazyForEachOnDataAdd0009 - * @tc.desic acelazyForEachOnDataAddEtsTest0009 - */ - it('testlazyForEachOnDataAdd0009', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testlazyForEachOnDataAdd0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testlazyForEachOnDataAdd0010 - * @tc.desic acelazyForEachOnDataAddEtsTest0010 - */ - it('testlazyForEachOnDataAdd0010', 0, async function (done) { - console.info('lazyForEachOnDataAdd testlazyForEachOnDataAdd0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onDataAddText'); - console.info("[testlazyForEachOnDataAdd0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testlazyForEachOnDataAdd0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets deleted file mode 100644 index 34f44eb40..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/line.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function lineNeJsunit() { - describe('lineNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/line', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get line state success " + JSON.stringify(pages)); - if (!("line" == pages.name)) { - console.info("get line state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push line page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push line page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("lineNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testlineNe0001 - * @tc.desic acelineNeEtsTest0001 - */ - it('testlineNe0001', 0, async function (done) { - console.info('lineNe testlineNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testlineNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testlineNe0002 - * @tc.desic acelineNeEtsTest0002 - */ - it('testlineNe0002', 0, async function (done) { - console.info('lineNe testlineNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testlineNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testlineNe0003 - * @tc.desic acelineNeEtsTest0003 - */ - it('testlineNe0003', 0, async function (done) { - console.info('lineNe testlineNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testlineNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testlineNe0004 - * @tc.desic acelineNeEtsTest0004 - */ - it('testlineNe0004', 0, async function (done) { - console.info('lineNe testlineNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testlineNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testlineNe0005 - * @tc.desic acelineNeEtsTest0005 - */ - it('testlineNe0005', 0, async function (done) { - console.info('lineNe testlineNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testlineNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testlineNe0006 - * @tc.desic acelineNeEtsTest0006 - */ - it('testlineNe0006', 0, async function (done) { - console.info('lineNe testlineNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testlineNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testlineNe0007 - * @tc.desic acelineNeEtsTest0007 - */ - it('testlineNe0007', 0, async function (done) { - console.info('lineNe testlineNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testlineNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testlineNe0009 - * @tc.desic acelineNeEtsTest0009 - */ - it('testlineNe0009', 0, async function (done) { - console.info('lineNe testlineNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testlineNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testlineNe0010 - * @tc.desic acelineNeEtsTest0010 - */ - it('testlineNe0010', 0, async function (done) { - console.info('lineNe testlineNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testlineNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testlineNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets deleted file mode 100644 index 863425f4b..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/list_item.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function list_itemOnSelectJsunit() { - describe('list_itemOnSelectTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/list_item', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get list_item state success " + JSON.stringify(pages)); - if (!("list_item" == pages.name)) { - console.info("get list_item state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push list_item page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push list_item page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("list_itemOnSelect after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testlist_itemOnSelect0001 - * @tc.desic acelist_itemOnSelectEtsTest0001 - */ - it('testlist_itemOnSelect0001', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testlist_itemOnSelect0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testlist_itemOnSelect0002 - * @tc.desic acelist_itemOnSelectEtsTest0002 - */ - it('testlist_itemOnSelect0002', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testlist_itemOnSelect0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testlist_itemOnSelect0003 - * @tc.desic acelist_itemOnSelectEtsTest0003 - */ - it('testlist_itemOnSelect0003', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testlist_itemOnSelect0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testlist_itemOnSelect0004 - * @tc.desic acelist_itemOnSelectEtsTest0004 - */ - it('testlist_itemOnSelect0004', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testlist_itemOnSelect0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testlist_itemOnSelect0005 - * @tc.desic acelist_itemOnSelectEtsTest0005 - */ - it('testlist_itemOnSelect0005', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testlist_itemOnSelect0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testlist_itemOnSelect0006 - * @tc.desic acelist_itemOnSelectEtsTest0006 - */ - it('testlist_itemOnSelect0006', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testlist_itemOnSelect0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testlist_itemOnSelect0007 - * @tc.desic acelist_itemOnSelectEtsTest0007 - */ - it('testlist_itemOnSelect0007', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testlist_itemOnSelect0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testlist_itemOnSelect0009 - * @tc.desic acelist_itemOnSelectEtsTest0009 - */ - it('testlist_itemOnSelect0009', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testlist_itemOnSelect0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testlist_itemOnSelect0010 - * @tc.desic acelist_itemOnSelectEtsTest0010 - */ - it('testlist_itemOnSelect0010', 0, async function (done) { - console.info('list_itemOnSelect testlist_itemOnSelect0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testlist_itemOnSelect0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testlist_itemOnSelect0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/matrix2d.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/matrix2d.test.ets deleted file mode 100644 index 28064f754..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/matrix2d.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function matrix2dMultiplyJsunit() { - describe('matrix2dMultiplyTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/matrix2d', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get matrix2d state success " + JSON.stringify(pages)); - if (!("matrix2d" == pages.name)) { - console.info("get matrix2d state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push matrix2d page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push matrix2d page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("matrix2dMultiply after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testmatrix2dMultiply0001 - * @tc.desic acematrix2dMultiplyEtsTest0001 - */ - it('testmatrix2dMultiply0001', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testmatrix2dMultiply0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testmatrix2dMultiply0002 - * @tc.desic acematrix2dMultiplyEtsTest0002 - */ - it('testmatrix2dMultiply0002', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testmatrix2dMultiply0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testmatrix2dMultiply0003 - * @tc.desic acematrix2dMultiplyEtsTest0003 - */ - it('testmatrix2dMultiply0003', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testmatrix2dMultiply0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testmatrix2dMultiply0004 - * @tc.desic acematrix2dMultiplyEtsTest0004 - */ - it('testmatrix2dMultiply0004', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testmatrix2dMultiply0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testmatrix2dMultiply0005 - * @tc.desic acematrix2dMultiplyEtsTest0005 - */ - it('testmatrix2dMultiply0005', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testmatrix2dMultiply0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testmatrix2dMultiply0006 - * @tc.desic acematrix2dMultiplyEtsTest0006 - */ - it('testmatrix2dMultiply0006', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testmatrix2dMultiply0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testmatrix2dMultiply0007 - * @tc.desic acematrix2dMultiplyEtsTest0007 - */ - it('testmatrix2dMultiply0007', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testmatrix2dMultiply0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testmatrix2dMultiply0009 - * @tc.desic acematrix2dMultiplyEtsTest0009 - */ - it('testmatrix2dMultiply0009', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testmatrix2dMultiply0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testmatrix2dMultiply0010 - * @tc.desic acematrix2dMultiplyEtsTest0010 - */ - it('testmatrix2dMultiply0010', 0, async function (done) { - console.info('matrix2dMultiply testmatrix2dMultiply0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('multiplyText'); - console.info("[testmatrix2dMultiply0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testmatrix2dMultiply0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/mediaQuery.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/mediaQuery.test.ets deleted file mode 100644 index 428387bee..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/mediaQuery.test.ets +++ /dev/null @@ -1,204 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function mediaQueryOffJsunit() { - describe('mediaQueryOffTest', function () { - - /** - * run before testcase - */ - beforeAll(async function (done) { - console.info('[mediaQueryOffTest] before each called') - - let result; - let options = { - uri: 'pages/mediaQuery' - } - try { - result = router.push(options) - console.info("push mediaQuery page success " + JSON.stringify(result)); - } catch (err) { - console.error("push mediaQuery page error " + JSON.stringify(result)); - } - await Utils.sleep(4000) - done() - }); - - /** - * run after testcase - */ - afterAll(async function () { - console.info('[mediaQueryOffTest] after each called') - await Utils.sleep(1000) - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testmediaQueryOff0001 - * @tc.desic acemediaQueryOffEtsTest0001 - */ - it('testmediaQueryOff0001', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testmediaQueryOff0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testmediaQueryOff0002 - * @tc.desic acemediaQueryOffEtsTest0002 - */ - it('testmediaQueryOff0002', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testmediaQueryOff0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testmediaQueryOff0003 - * @tc.desic acemediaQueryOffEtsTest0003 - */ - it('testmediaQueryOff0003', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testmediaQueryOff0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testmediaQueryOff0004 - * @tc.desic acemediaQueryOffEtsTest0004 - */ - it('testmediaQueryOff0004', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testmediaQueryOff0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testmediaQueryOff0005 - * @tc.desic acemediaQueryOffEtsTest0005 - */ - it('testmediaQueryOff0005', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testmediaQueryOff0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testmediaQueryOff0006 - * @tc.desic acemediaQueryOffEtsTest0006 - */ - it('testmediaQueryOff0006', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testmediaQueryOff0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testmediaQueryOff0007 - * @tc.desic acemediaQueryOffEtsTest0007 - */ - it('testmediaQueryOff0007', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testmediaQueryOff0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testmediaQueryOff0009 - * @tc.desic acemediaQueryOffEtsTest0009 - */ - it('testmediaQueryOff0009', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testmediaQueryOff0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testmediaQueryOff0010 - * @tc.desic acemediaQueryOffEtsTest0010 - */ - it('testmediaQueryOff0010', 0, async function (done) { - console.info('mediaQueryOff testmediaQueryOff0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('offText'); - console.info("[testmediaQueryOff0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testmediaQueryOff0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/navigator.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/navigator.test.ets deleted file mode 100644 index 995a2f699..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/navigator.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function navigatorTargetJsunit() { - describe('navigatorTargetTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/navigator', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get navigator state success " + JSON.stringify(pages)); - if (!("navigator" == pages.name)) { - console.info("get navigator state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push navigator page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push navigator page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("navigatorTarget after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testnavigatorTarget0001 - * @tc.desic acenavigatorTargetEtsTest0001 - */ - it('testnavigatorTarget0001', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testnavigatorTarget0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testnavigatorTarget0002 - * @tc.desic acenavigatorTargetEtsTest0002 - */ - it('testnavigatorTarget0002', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testnavigatorTarget0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testnavigatorTarget0003 - * @tc.desic acenavigatorTargetEtsTest0003 - */ - it('testnavigatorTarget0003', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testnavigatorTarget0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testnavigatorTarget0004 - * @tc.desic acenavigatorTargetEtsTest0004 - */ - it('testnavigatorTarget0004', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testnavigatorTarget0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testnavigatorTarget0005 - * @tc.desic acenavigatorTargetEtsTest0005 - */ - it('testnavigatorTarget0005', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testnavigatorTarget0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testnavigatorTarget0006 - * @tc.desic acenavigatorTargetEtsTest0006 - */ - it('testnavigatorTarget0006', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testnavigatorTarget0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testnavigatorTarget0007 - * @tc.desic acenavigatorTargetEtsTest0007 - */ - it('testnavigatorTarget0007', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testnavigatorTarget0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testnavigatorTarget0009 - * @tc.desic acenavigatorTargetEtsTest0009 - */ - it('testnavigatorTarget0009', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testnavigatorTarget0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testnavigatorTarget0010 - * @tc.desic acenavigatorTargetEtsTest0010 - */ - it('testnavigatorTarget0010', 0, async function (done) { - console.info('navigatorTarget testnavigatorTarget0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('targetText'); - console.info("[testnavigatorTarget0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testnavigatorTarget0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/page_transition.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/page_transition.test.ets deleted file mode 100644 index b4fe94332..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/page_transition.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function page_transitionSlideJsunit() { - describe('page_transitionSlideTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/page_transition', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get page_transition state success " + JSON.stringify(pages)); - if (!("page_transition" == pages.name)) { - console.info("get page_transition state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push page_transition page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push page_transition page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("page_transitionSlide after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpage_transitionSlide0001 - * @tc.desic acepage_transitionSlideEtsTest0001 - */ - it('testpage_transitionSlide0001', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpage_transitionSlide0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpage_transitionSlide0002 - * @tc.desic acepage_transitionSlideEtsTest0002 - */ - it('testpage_transitionSlide0002', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpage_transitionSlide0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpage_transitionSlide0003 - * @tc.desic acepage_transitionSlideEtsTest0003 - */ - it('testpage_transitionSlide0003', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpage_transitionSlide0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpage_transitionSlide0004 - * @tc.desic acepage_transitionSlideEtsTest0004 - */ - it('testpage_transitionSlide0004', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpage_transitionSlide0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpage_transitionSlide0005 - * @tc.desic acepage_transitionSlideEtsTest0005 - */ - it('testpage_transitionSlide0005', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpage_transitionSlide0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpage_transitionSlide0006 - * @tc.desic acepage_transitionSlideEtsTest0006 - */ - it('testpage_transitionSlide0006', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpage_transitionSlide0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpage_transitionSlide0007 - * @tc.desic acepage_transitionSlideEtsTest0007 - */ - it('testpage_transitionSlide0007', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpage_transitionSlide0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpage_transitionSlide0009 - * @tc.desic acepage_transitionSlideEtsTest0009 - */ - it('testpage_transitionSlide0009', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpage_transitionSlide0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpage_transitionSlide0010 - * @tc.desic acepage_transitionSlideEtsTest0010 - */ - it('testpage_transitionSlide0010', 0, async function (done) { - console.info('page_transitionSlide testpage_transitionSlide0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('slideText'); - console.info("[testpage_transitionSlide0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpage_transitionSlide0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/panel.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/panel.test.ets deleted file mode 100644 index 847dfd018..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/panel.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function panelBackgroundMaskJsunit() { - describe('panelBackgroundMaskTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/panel', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get panel state success " + JSON.stringify(pages)); - if (!("panel" == pages.name)) { - console.info("get panel state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push panel page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push panel page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("panelBackgroundMask after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpanelBackgroundMask0001 - * @tc.desic acepanelBackgroundMaskEtsTest0001 - */ - it('testpanelBackgroundMask0001', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpanelBackgroundMask0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpanelBackgroundMask0002 - * @tc.desic acepanelBackgroundMaskEtsTest0002 - */ - it('testpanelBackgroundMask0002', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpanelBackgroundMask0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpanelBackgroundMask0003 - * @tc.desic acepanelBackgroundMaskEtsTest0003 - */ - it('testpanelBackgroundMask0003', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpanelBackgroundMask0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpanelBackgroundMask0004 - * @tc.desic acepanelBackgroundMaskEtsTest0004 - */ - it('testpanelBackgroundMask0004', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpanelBackgroundMask0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpanelBackgroundMask0005 - * @tc.desic acepanelBackgroundMaskEtsTest0005 - */ - it('testpanelBackgroundMask0005', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpanelBackgroundMask0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpanelBackgroundMask0006 - * @tc.desic acepanelBackgroundMaskEtsTest0006 - */ - it('testpanelBackgroundMask0006', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpanelBackgroundMask0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpanelBackgroundMask0007 - * @tc.desic acepanelBackgroundMaskEtsTest0007 - */ - it('testpanelBackgroundMask0007', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpanelBackgroundMask0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpanelBackgroundMask0009 - * @tc.desic acepanelBackgroundMaskEtsTest0009 - */ - it('testpanelBackgroundMask0009', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpanelBackgroundMask0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpanelBackgroundMask0010 - * @tc.desic acepanelBackgroundMaskEtsTest0010 - */ - it('testpanelBackgroundMask0010', 0, async function (done) { - console.info('panelBackgroundMask testpanelBackgroundMask0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('backgroundMaskText'); - console.info("[testpanelBackgroundMask0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpanelBackgroundMask0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets deleted file mode 100644 index 114580960..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/path.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function pathNeJsunit() { - describe('pathNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/path', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get path state success " + JSON.stringify(pages)); - if (!("path" == pages.name)) { - console.info("get path state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push path page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push path page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("pathNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpathNe0001 - * @tc.desic acepathNeEtsTest0001 - */ - it('testpathNe0001', 0, async function (done) { - console.info('pathNe testpathNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpathNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpathNe0002 - * @tc.desic acepathNeEtsTest0002 - */ - it('testpathNe0002', 0, async function (done) { - console.info('pathNe testpathNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpathNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpathNe0003 - * @tc.desic acepathNeEtsTest0003 - */ - it('testpathNe0003', 0, async function (done) { - console.info('pathNe testpathNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpathNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpathNe0004 - * @tc.desic acepathNeEtsTest0004 - */ - it('testpathNe0004', 0, async function (done) { - console.info('pathNe testpathNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpathNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpathNe0005 - * @tc.desic acepathNeEtsTest0005 - */ - it('testpathNe0005', 0, async function (done) { - console.info('pathNe testpathNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpathNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpathNe0006 - * @tc.desic acepathNeEtsTest0006 - */ - it('testpathNe0006', 0, async function (done) { - console.info('pathNe testpathNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpathNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpathNe0007 - * @tc.desic acepathNeEtsTest0007 - */ - it('testpathNe0007', 0, async function (done) { - console.info('pathNe testpathNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpathNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpathNe0009 - * @tc.desic acepathNeEtsTest0009 - */ - it('testpathNe0009', 0, async function (done) { - console.info('pathNe testpathNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpathNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpathNe0010 - * @tc.desic acepathNeEtsTest0010 - */ - it('testpathNe0010', 0, async function (done) { - console.info('pathNe testpathNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpathNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpathNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/pluginComponent.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/pluginComponent.test.ets deleted file mode 100644 index aa9aa72c8..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/pluginComponent.test.ets +++ /dev/null @@ -1,204 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function pluginComponentRequestJsunit() { - describe('pluginComponentRequestTest', function () { - - /** - * run before testcase - */ - beforeAll(async function (done) { - console.info('[pluginComponentRequestTest] before each called') - - let result; - let options = { - uri: 'pages/pluginComponent' - } - try { - result = router.push(options) - console.info("push pluginComponentRequestTest page success " + JSON.stringify(result)); - } catch (err) { - console.error("push pluginComponentRequestTest page error " + JSON.stringify(result)); - } - await Utils.sleep(4000) - done() - }); - - /** - * run after testcase - */ - afterAll(async function () { - console.info('[pluginComponentRequestTest] after each called') - await Utils.sleep(1000) - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpluginComponentRequest0001 - * @tc.desic acepluginComponentRequestEtsTest0001 - */ - it('testpluginComponentRequest0001', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpluginComponentRequest0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpluginComponentRequest0002 - * @tc.desic acepluginComponentRequestEtsTest0002 - */ - it('testpluginComponentRequest0002', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpluginComponentRequest0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpluginComponentRequest0003 - * @tc.desic acepluginComponentRequestEtsTest0003 - */ - it('testpluginComponentRequest0003', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpluginComponentRequest0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpluginComponentRequest0004 - * @tc.desic acepluginComponentRequestEtsTest0004 - */ - it('testpluginComponentRequest0004', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpluginComponentRequest0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpluginComponentRequest0005 - * @tc.desic acepluginComponentRequestEtsTest0005 - */ - it('testpluginComponentRequest0005', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpluginComponentRequest0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpluginComponentRequest0006 - * @tc.desic acepluginComponentRequestEtsTest0006 - */ - it('testpluginComponentRequest0006', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpluginComponentRequest0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpluginComponentRequest0007 - * @tc.desic acepluginComponentRequestEtsTest0007 - */ - it('testpluginComponentRequest0007', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpluginComponentRequest0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpluginComponentRequest0009 - * @tc.desic acepluginComponentRequestEtsTest0009 - */ - it('testpluginComponentRequest0009', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpluginComponentRequest0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpluginComponentRequest0010 - * @tc.desic acepluginComponentRequestEtsTest0010 - */ - it('testpluginComponentRequest0010', 0, async function (done) { - console.info('pluginComponentRequest testpluginComponentRequest0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('requestText'); - console.info("[testpluginComponentRequest0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpluginComponentRequest0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets deleted file mode 100644 index 13b4c7665..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polyLine.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function polyLineNeJsunit() { - describe('polyLineNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/polyLine', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get polyLine state success " + JSON.stringify(pages)); - if (!("polyLine" == pages.name)) { - console.info("get polyLine state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push polyLine page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push polyLine page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("polyLineNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpolyLineNe0001 - * @tc.desic acepolyLineNeEtsTest0001 - */ - it('testpolyLineNe0001', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpolyLineNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpolyLineNe0002 - * @tc.desic acepolyLineNeEtsTest0002 - */ - it('testpolyLineNe0002', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpolyLineNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpolyLineNe0003 - * @tc.desic acepolyLineNeEtsTest0003 - */ - it('testpolyLineNe0003', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpolyLineNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpolyLineNe0004 - * @tc.desic acepolyLineNeEtsTest0004 - */ - it('testpolyLineNe0004', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpolyLineNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpolyLineNe0005 - * @tc.desic acepolyLineNeEtsTest0005 - */ - it('testpolyLineNe0005', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpolyLineNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpolyLineNe0006 - * @tc.desic acepolyLineNeEtsTest0006 - */ - it('testpolyLineNe0006', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpolyLineNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpolyLineNe0007 - * @tc.desic acepolyLineNeEtsTest0007 - */ - it('testpolyLineNe0007', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpolyLineNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpolyLineNe0009 - * @tc.desic acepolyLineNeEtsTest0009 - */ - it('testpolyLineNe0009', 0, async function (done) { - console.info('polyLineNe testpolyLineNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpolyLineNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpolyLineNe0010 - * @tc.desic acepolyLineNeEtsTest0010 - */ - it('testpolyLineNe0010', 0, async function (done) { - console.info('polyLineNe testpolyLineNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolyLineNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpolyLineNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets deleted file mode 100644 index 2fde02e41..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/polygon.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function polygonNeJsunit() { - describe('polygonNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/polygon', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get polygon state success " + JSON.stringify(pages)); - if (!("polygon" == pages.name)) { - console.info("get polygon state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push polygon page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push polygon page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("polygonNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpolygonNe0001 - * @tc.desic acepolygonNeEtsTest0001 - */ - it('testpolygonNe0001', 0, async function (done) { - console.info('polygonNe testpolygonNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpolygonNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpolygonNe0002 - * @tc.desic acepolygonNeEtsTest0002 - */ - it('testpolygonNe0002', 0, async function (done) { - console.info('polygonNe testpolygonNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpolygonNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpolygonNe0003 - * @tc.desic acepolygonNeEtsTest0003 - */ - it('testpolygonNe0003', 0, async function (done) { - console.info('polygonNe testpolygonNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpolygonNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpolygonNe0004 - * @tc.desic acepolygonNeEtsTest0004 - */ - it('testpolygonNe0004', 0, async function (done) { - console.info('polygonNe testpolygonNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpolygonNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpolygonNe0005 - * @tc.desic acepolygonNeEtsTest0005 - */ - it('testpolygonNe0005', 0, async function (done) { - console.info('polygonNe testpolygonNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpolygonNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpolygonNe0006 - * @tc.desic acepolygonNeEtsTest0006 - */ - it('testpolygonNe0006', 0, async function (done) { - console.info('polygonNe testpolygonNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpolygonNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpolygonNe0007 - * @tc.desic acepolygonNeEtsTest0007 - */ - it('testpolygonNe0007', 0, async function (done) { - console.info('polygonNe testpolygonNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpolygonNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpolygonNe0009 - * @tc.desic acepolygonNeEtsTest0009 - */ - it('testpolygonNe0009', 0, async function (done) { - console.info('polygonNe testpolygonNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpolygonNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpolygonNe0010 - * @tc.desic acepolygonNeEtsTest0010 - */ - it('testpolygonNe0010', 0, async function (done) { - console.info('polygonNe testpolygonNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testpolygonNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpolygonNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/progress.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/progress.test.ets deleted file mode 100644 index f1777b604..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/progress.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function progressStyleJsunit() { - describe('progressStyleTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/progress', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get progress state success " + JSON.stringify(pages)); - if (!("progress" == pages.name)) { - console.info("get progress state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push progress page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push progress page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("progressStyle after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testprogressStyle0001 - * @tc.desic aceprogressStyleEtsTest0001 - */ - it('testprogressStyle0001', 0, async function (done) { - console.info('progressStyle testprogressStyle0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testprogressStyle0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testprogressStyle0002 - * @tc.desic aceprogressStyleEtsTest0002 - */ - it('testprogressStyle0002', 0, async function (done) { - console.info('progressStyle testprogressStyle0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testprogressStyle0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testprogressStyle0003 - * @tc.desic aceprogressStyleEtsTest0003 - */ - it('testprogressStyle0003', 0, async function (done) { - console.info('progressStyle testprogressStyle0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testprogressStyle0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testprogressStyle0004 - * @tc.desic aceprogressStyleEtsTest0004 - */ - it('testprogressStyle0004', 0, async function (done) { - console.info('progressStyle testprogressStyle0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testprogressStyle0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testprogressStyle0005 - * @tc.desic aceprogressStyleEtsTest0005 - */ - it('testprogressStyle0005', 0, async function (done) { - console.info('progressStyle testprogressStyle0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testprogressStyle0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testprogressStyle0006 - * @tc.desic aceprogressStyleEtsTest0006 - */ - it('testprogressStyle0006', 0, async function (done) { - console.info('progressStyle testprogressStyle0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testprogressStyle0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testprogressStyle0007 - * @tc.desic aceprogressStyleEtsTest0007 - */ - it('testprogressStyle0007', 0, async function (done) { - console.info('progressStyle testprogressStyle0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testprogressStyle0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testprogressStyle0009 - * @tc.desic aceprogressStyleEtsTest0009 - */ - it('testprogressStyle0009', 0, async function (done) { - console.info('progressStyle testprogressStyle009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testprogressStyle0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testprogressStyle0010 - * @tc.desic aceprogressStyleEtsTest0010 - */ - it('testprogressStyle0010', 0, async function (done) { - console.info('progressStyle testprogressStyle0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('styleText'); - console.info("[testprogressStyle0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testprogressStyle0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/prompt.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/prompt.test.ets deleted file mode 100644 index cc93514c4..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/prompt.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function promptShowDialogJsunit() { - describe('promptShowDialogTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/prompt', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get prompt state success " + JSON.stringify(pages)); - if (!("prompt" == pages.name)) { - console.info("get prompt state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push prompt page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push prompt page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("promptShowDialog after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testpromptShowDialog0001 - * @tc.desic acepromptShowDialogEtsTest0001 - */ - it('testpromptShowDialog0001', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testpromptShowDialog0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testpromptShowDialog0002 - * @tc.desic acepromptShowDialogEtsTest0002 - */ - it('testpromptShowDialog0002', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testpromptShowDialog0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testpromptShowDialog0003 - * @tc.desic acepromptShowDialogEtsTest0003 - */ - it('testpromptShowDialog0003', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testpromptShowDialog0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testpromptShowDialog0004 - * @tc.desic acepromptShowDialogEtsTest0004 - */ - it('testpromptShowDialog0004', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testpromptShowDialog0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testpromptShowDialog0005 - * @tc.desic acepromptShowDialogEtsTest0005 - */ - it('testpromptShowDialog0005', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testpromptShowDialog0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testpromptShowDialog0006 - * @tc.desic acepromptShowDialogEtsTest0006 - */ - it('testpromptShowDialog0006', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testpromptShowDialog0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testpromptShowDialog0007 - * @tc.desic acepromptShowDialogEtsTest0007 - */ - it('testpromptShowDialog0007', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testpromptShowDialog0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testpromptShowDialog0009 - * @tc.desic acepromptShowDialogEtsTest0009 - */ - it('testpromptShowDialog0009', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testpromptShowDialog0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testpromptShowDialog0010 - * @tc.desic acepromptShowDialogEtsTest0010 - */ - it('testpromptShowDialog0010', 0, async function (done) { - console.info('promptShowDialog testpromptShowDialog0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showDialogText'); - console.info("[testpromptShowDialog0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testpromptShowDialog0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets deleted file mode 100644 index 28de1ca3e..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/rect.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function rectNeJsunit() { - describe('rectNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/rect', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get rect state success " + JSON.stringify(pages)); - if (!("rect" == pages.name)) { - console.info("get rect state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push rect page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push rect page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("rectNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testrectNe0001 - * @tc.desic acerectNeEtsTest0001 - */ - it('testrectNe0001', 0, async function (done) { - console.info('rectNe testrectNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testrectNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testrectNe0002 - * @tc.desic acerectNeEtsTest0002 - */ - it('testrectNe0002', 0, async function (done) { - console.info('rectNe testrectNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testrectNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testrectNe0003 - * @tc.desic acerectNeEtsTest0003 - */ - it('testrectNe0003', 0, async function (done) { - console.info('rectNe testrectNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testrectNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testrectNe0004 - * @tc.desic acerectNeEtsTest0004 - */ - it('testrectNe0004', 0, async function (done) { - console.info('rectNe testrectNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testrectNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testrectNe0005 - * @tc.desic acerectNeEtsTest0005 - */ - it('testrectNe0005', 0, async function (done) { - console.info('rectNe testrectNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testrectNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testrectNe0006 - * @tc.desic acerectNeEtsTest0006 - */ - it('testrectNe0006', 0, async function (done) { - console.info('rectNe testrectNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testrectNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testrectNe0007 - * @tc.desic acerectNeEtsTest0007 - */ - it('testrectNe0007', 0, async function (done) { - console.info('rectNe testrectNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testrectNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testrectNe0009 - * @tc.desic acerectNeEtsTest0009 - */ - it('testrectNe0009', 0, async function (done) { - console.info('rectNe testrectNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testrectNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testrectNe0010 - * @tc.desic acerectNeEtsTest0010 - */ - it('testrectNe0010', 0, async function (done) { - console.info('rectNe testrectNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testrectNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testrectNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/router.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/router.test.ets deleted file mode 100644 index bf5b0692a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/router.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function routerEnableAlertBeforeBackPageJsunit() { - describe('routerEnableAlertBeforeBackPageTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/router', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get router state success " + JSON.stringify(pages)); - if (!("router" == pages.name)) { - console.info("get router state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push router page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push router page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("routerEnableAlertBeforeBackPage after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testrouterEnableAlertBeforeBackPage0001 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0001 - */ - it('testrouterEnableAlertBeforeBackPage0001', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testrouterEnableAlertBeforeBackPage0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testrouterEnableAlertBeforeBackPage0002 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0002 - */ - it('testrouterEnableAlertBeforeBackPage0002', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testrouterEnableAlertBeforeBackPage0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testrouterEnableAlertBeforeBackPage0003 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0003 - */ - it('testrouterEnableAlertBeforeBackPage0003', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testrouterEnableAlertBeforeBackPage0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testrouterEnableAlertBeforeBackPage0004 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0004 - */ - it('testrouterEnableAlertBeforeBackPage0004', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testrouterEnableAlertBeforeBackPage0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testrouterEnableAlertBeforeBackPage0005 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0005 - */ - it('testrouterEnableAlertBeforeBackPage0005', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testrouterEnableAlertBeforeBackPage0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testrouterEnableAlertBeforeBackPage0006 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0006 - */ - it('testrouterEnableAlertBeforeBackPage0006', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testrouterEnableAlertBeforeBackPage0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testrouterEnableAlertBeforeBackPage0007 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0007 - */ - it('testrouterEnableAlertBeforeBackPage0007', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testrouterEnableAlertBeforeBackPage0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testrouterEnableAlertBeforeBackPage0009 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0009 - */ - it('testrouterEnableAlertBeforeBackPage0009', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testrouterEnableAlertBeforeBackPage0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testrouterEnableAlertBeforeBackPage0010 - * @tc.desic acerouterEnableAlertBeforeBackPageEtsTest0010 - */ - it('testrouterEnableAlertBeforeBackPage0010', 0, async function (done) { - console.info('routerEnableAlertBeforeBackPage testrouterEnableAlertBeforeBackPage0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('enableAlertBeforeBackPageText'); - console.info("[testrouterEnableAlertBeforeBackPage0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testrouterEnableAlertBeforeBackPage0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets deleted file mode 100644 index 459817005..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/scroll.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function scrollOnScrollBeginJsunit() { - describe('scrollOnScrollBeginTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/scroll', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get scroll state success " + JSON.stringify(pages)); - if (!("scroll" == pages.name)) { - console.info("get scroll state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push scroll page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push scroll page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("scrollOnScrollBegin after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testscrollOnScrollBegin0001 - * @tc.desic acescrollOnScrollBeginEtsTest0001 - */ - it('testscrollOnScrollBegin0001', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testscrollOnScrollBegin0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testscrollOnScrollBegin0002 - * @tc.desic acescrollOnScrollBeginEtsTest0002 - */ - it('testscrollOnScrollBegin0002', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testscrollOnScrollBegin0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testscrollOnScrollBegin0003 - * @tc.desic acescrollOnScrollBeginEtsTest0003 - */ - it('testscrollOnScrollBegin0003', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testscrollOnScrollBegin0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testscrollOnScrollBegin0004 - * @tc.desic acescrollOnScrollBeginEtsTest0004 - */ - it('testscrollOnScrollBegin0004', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testscrollOnScrollBegin0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testscrollOnScrollBegin0005 - * @tc.desic acescrollOnScrollBeginEtsTest0005 - */ - it('testscrollOnScrollBegin0005', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testscrollOnScrollBegin0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testscrollOnScrollBegin0006 - * @tc.desic acescrollOnScrollBeginEtsTest0006 - */ - it('testscrollOnScrollBegin0006', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testscrollOnScrollBegin0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testscrollOnScrollBegin0007 - * @tc.desic acescrollOnScrollBeginEtsTest0007 - */ - it('testscrollOnScrollBegin0007', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testscrollOnScrollBegin0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testscrollOnScrollBegin0009 - * @tc.desic acescrollOnScrollBeginEtsTest0009 - */ - it('testscrollOnScrollBegin0009', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testscrollOnScrollBegin0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testscrollOnScrollBegin0010 - * @tc.desic acescrollOnScrollBeginEtsTest0010 - */ - it('testscrollOnScrollBegin0010', 0, async function (done) { - console.info('scrollOnScrollBegin testscrollOnScrollBegin0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onScrollBeginText'); - console.info("[testscrollOnScrollBegin0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testscrollOnScrollBegin0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/search.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/search.test.ets deleted file mode 100644 index 567a45048..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/search.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function searchOnCutJsunit() { - describe('searchOnCutTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/search', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get search state success " + JSON.stringify(pages)); - if (!("search" == pages.name)) { - console.info("get search state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push search page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push search page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("searchOnCut after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testsearchOnCut0001 - * @tc.desic acesearchOnCutEtsTest0001 - */ - it('testsearchOnCut0001', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("320.00vp"); - console.info("[testsearchOnCut0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testsearchOnCut0002 - * @tc.desic acesearchOnCutEtsTest0002 - */ - it('testsearchOnCut0002', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testsearchOnCut0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testsearchOnCut0003 - * @tc.desic acesearchOnCutEtsTest0003 - */ - it('testsearchOnCut0003', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testsearchOnCut0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testsearchOnCut0004 - * @tc.desic acesearchOnCutEtsTest0004 - */ - it('testsearchOnCut0004', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testsearchOnCut0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testsearchOnCut0005 - * @tc.desic acesearchOnCutEtsTest0005 - */ - it('testsearchOnCut0005', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testsearchOnCut0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testsearchOnCut0006 - * @tc.desic acesearchOnCutEtsTest0006 - */ - it('testsearchOnCut0006', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testsearchOnCut0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testsearchOnCut0007 - * @tc.desic acesearchOnCutEtsTest0007 - */ - it('testsearchOnCut0007', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testsearchOnCut0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testsearchOnCut0009 - * @tc.desic acesearchOnCutEtsTest0009 - */ - it('testsearchOnCut0009', 0, async function (done) { - console.info('searchOnCut testsearchOnCut009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testsearchOnCut0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testsearchOnCut0010 - * @tc.desic acesearchOnCutEtsTest0010 - */ - it('testsearchOnCut0010', 0, async function (done) { - console.info('searchOnCut testsearchOnCut0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testsearchOnCut0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testsearchOnCut0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/select.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/select.test.ets deleted file mode 100644 index c7d6fe67c..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/select.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function selectOnSelectJsunit() { - describe('selectOnSelectTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/select', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get select state success " + JSON.stringify(pages)); - if (!("select" == pages.name)) { - console.info("get select state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push select page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push select page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("selectOnSelect after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testselectOnSelect0001 - * @tc.desic aceselectOnSelectEtsTest0001 - */ - it('testselectOnSelect0001', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testselectOnSelect0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testselectOnSelect0002 - * @tc.desic aceselectOnSelectEtsTest0002 - */ - it('testselectOnSelect0002', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testselectOnSelect0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testselectOnSelect0003 - * @tc.desic aceselectOnSelectEtsTest0003 - */ - it('testselectOnSelect0003', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testselectOnSelect0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testselectOnSelect0004 - * @tc.desic aceselectOnSelectEtsTest0004 - */ - it('testselectOnSelect0004', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testselectOnSelect0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testselectOnSelect0005 - * @tc.desic aceselectOnSelectEtsTest0005 - */ - it('testselectOnSelect0005', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testselectOnSelect0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testselectOnSelect0006 - * @tc.desic aceselectOnSelectEtsTest0006 - */ - it('testselectOnSelect0006', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testselectOnSelect0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testselectOnSelect0007 - * @tc.desic aceselectOnSelectEtsTest0007 - */ - it('testselectOnSelect0007', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testselectOnSelect0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testselectOnSelect0009 - * @tc.desic aceselectOnSelectEtsTest0009 - */ - it('testselectOnSelect0009', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testselectOnSelect0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testselectOnSelect0010 - * @tc.desic aceselectOnSelectEtsTest0010 - */ - it('testselectOnSelect0010', 0, async function (done) { - console.info('selectOnSelect testselectOnSelect0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onSelectText'); - console.info("[testselectOnSelect0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testselectOnSelect0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/shape.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/shape.test.ets deleted file mode 100644 index ff05b8a6b..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/shape.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function shapeNeJsunit() { - describe('shapeNeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/shape', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get shape state success " + JSON.stringify(pages)); - if (!("shape" == pages.name)) { - console.info("get shape state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push shape page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push shape page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("shapeNe after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testshapeNe0001 - * @tc.desic aceshapeNeEtsTest0001 - */ - it('testshapeNe0001', 0, async function (done) { - console.info('shapeNe testshapeNe0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testshapeNe0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testshapeNe0002 - * @tc.desic aceshapeNeEtsTest0002 - */ - it('testshapeNe0002', 0, async function (done) { - console.info('shapeNe testshapeNe0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testshapeNe0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testshapeNe0003 - * @tc.desic aceshapeNeEtsTest0003 - */ - it('testshapeNe0003', 0, async function (done) { - console.info('shapeNe testshapeNe0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testshapeNe0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testshapeNe0004 - * @tc.desic aceshapeNeEtsTest0004 - */ - it('testshapeNe0004', 0, async function (done) { - console.info('shapeNe testshapeNe0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testshapeNe0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testshapeNe0005 - * @tc.desic aceshapeNeEtsTest0005 - */ - it('testshapeNe0005', 0, async function (done) { - console.info('shapeNe testshapeNe0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testshapeNe0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testshapeNe0006 - * @tc.desic aceshapeNeEtsTest0006 - */ - it('testshapeNe0006', 0, async function (done) { - console.info('shapeNe testshapeNe0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testshapeNe0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testshapeNe0007 - * @tc.desic aceshapeNeEtsTest0007 - */ - it('testshapeNe0007', 0, async function (done) { - console.info('shapeNe testshapeNe0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testshapeNe0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testshapeNe0009 - * @tc.desic aceshapeNeEtsTest0009 - */ - it('testshapeNe0009', 0, async function (done) { - console.info('shapeNe testshapeNe009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testshapeNe0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testshapeNe0010 - * @tc.desic aceshapeNeEtsTest0010 - */ - it('testshapeNe0010', 0, async function (done) { - console.info('shapeNe testshapeNe0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('neText'); - console.info("[testshapeNe0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testshapeNe0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets deleted file mode 100644 index e065ee022..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/sideBar.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function sideBarShowSideBarJsunit() { - describe('sideBarShowSideBarTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/sideBar', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get sideBar state success " + JSON.stringify(pages)); - if (!("sideBar" == pages.name)) { - console.info("get sideBar state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push sideBar page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push sideBar page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("sideBarShowSideBar after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testsideBarShowSideBar0001 - * @tc.desic acesideBarShowSideBarEtsTest0001 - */ - it('testsideBarShowSideBar0001', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testsideBarShowSideBar0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testsideBarShowSideBar0002 - * @tc.desic acesideBarShowSideBarEtsTest0002 - */ - it('testsideBarShowSideBar0002', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testsideBarShowSideBar0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testsideBarShowSideBar0003 - * @tc.desic acesideBarShowSideBarEtsTest0003 - */ - it('testsideBarShowSideBar0003', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testsideBarShowSideBar0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testsideBarShowSideBar0004 - * @tc.desic acesideBarShowSideBarEtsTest0004 - */ - it('testsideBarShowSideBar0004', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testsideBarShowSideBar0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testsideBarShowSideBar0005 - * @tc.desic acesideBarShowSideBarEtsTest0005 - */ - it('testsideBarShowSideBar0005', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testsideBarShowSideBar0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testsideBarShowSideBar0006 - * @tc.desic acesideBarShowSideBarEtsTest0006 - */ - it('testsideBarShowSideBar0006', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testsideBarShowSideBar0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testsideBarShowSideBar0007 - * @tc.desic acesideBarShowSideBarEtsTest0007 - */ - it('testsideBarShowSideBar0007', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testsideBarShowSideBar0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testsideBarShowSideBar0009 - * @tc.desic acesideBarShowSideBarEtsTest0009 - */ - it('testsideBarShowSideBar0009', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testsideBarShowSideBar0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testsideBarShowSideBar0010 - * @tc.desic acesideBarShowSideBarEtsTest0010 - */ - it('testsideBarShowSideBar0010', 0, async function (done) { - console.info('sideBarShowSideBar testsideBarShowSideBar0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('showSideBarText'); - console.info("[testsideBarShowSideBar0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testsideBarShowSideBar0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stack.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stack.test.ets deleted file mode 100644 index bc1051c0a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stack.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function stackAlignContentJsunit() { - describe('stackAlignContentTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/stack', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get stack state success " + JSON.stringify(pages)); - if (!("stack" == pages.name)) { - console.info("get stack state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push stack page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push stack page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("stackAlignContent after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name teststackAlignContent0001 - * @tc.desic acestackAlignContentEtsTest0001 - */ - it('teststackAlignContent0001', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[teststackAlignContent0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name teststackAlignContent0002 - * @tc.desic acestackAlignContentEtsTest0002 - */ - it('teststackAlignContent0002', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[teststackAlignContent0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name teststackAlignContent0003 - * @tc.desic acestackAlignContentEtsTest0003 - */ - it('teststackAlignContent0003', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[teststackAlignContent0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name teststackAlignContent0004 - * @tc.desic acestackAlignContentEtsTest0004 - */ - it('teststackAlignContent0004', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[teststackAlignContent0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name teststackAlignContent0005 - * @tc.desic acestackAlignContentEtsTest0005 - */ - it('teststackAlignContent0005', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[teststackAlignContent0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name teststackAlignContent0006 - * @tc.desic acestackAlignContentEtsTest0006 - */ - it('teststackAlignContent0006', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[teststackAlignContent0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name teststackAlignContent0007 - * @tc.desic acestackAlignContentEtsTest0007 - */ - it('teststackAlignContent0007', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[teststackAlignContent0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name teststackAlignContent0009 - * @tc.desic acestackAlignContentEtsTest0009 - */ - it('teststackAlignContent0009', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[teststackAlignContent0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name teststackAlignContent0010 - * @tc.desic acestackAlignContentEtsTest0010 - */ - it('teststackAlignContent0010', 0, async function (done) { - console.info('stackAlignContent teststackAlignContent0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('alignContentText'); - console.info("[teststackAlignContent0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[teststackAlignContent0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets deleted file mode 100644 index 48453fb3e..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/stateManagement.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function stateManagementGetSharedJsunit() { - describe('stateManagementGetSharedTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/stateManagement', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get stateManagement state success " + JSON.stringify(pages)); - if (!("stateManagement" == pages.name)) { - console.info("get stateManagement state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push stateManagement page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push stateManagement page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("stateManagementGetShared after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name teststateManagementGetShared0001 - * @tc.desic acestateManagementGetSharedEtsTest0001 - */ - it('teststateManagementGetShared0001', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[teststateManagementGetShared0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name teststateManagementGetShared0002 - * @tc.desic acestateManagementGetSharedEtsTest0002 - */ - it('teststateManagementGetShared0002', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[teststateManagementGetShared0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name teststateManagementGetShared0003 - * @tc.desic acestateManagementGetSharedEtsTest0003 - */ - it('teststateManagementGetShared0003', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[teststateManagementGetShared0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name teststateManagementGetShared0004 - * @tc.desic acestateManagementGetSharedEtsTest0004 - */ - it('teststateManagementGetShared0004', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[teststateManagementGetShared0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name teststateManagementGetShared0005 - * @tc.desic acestateManagementGetSharedEtsTest0005 - */ - it('teststateManagementGetShared0005', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[teststateManagementGetShared0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name teststateManagementGetShared0006 - * @tc.desic acestateManagementGetSharedEtsTest0006 - */ - it('teststateManagementGetShared0006', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[teststateManagementGetShared0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name teststateManagementGetShared0007 - * @tc.desic acestateManagementGetSharedEtsTest0007 - */ - it('teststateManagementGetShared0007', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[teststateManagementGetShared0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name teststateManagementGetShared0009 - * @tc.desic acestateManagementGetSharedEtsTest0009 - */ - it('teststateManagementGetShared0009', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[teststateManagementGetShared0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name teststateManagementGetShared0010 - * @tc.desic acestateManagementGetSharedEtsTest0010 - */ - it('teststateManagementGetShared0010', 0, async function (done) { - console.info('stateManagementGetShared teststateManagementGetShared0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('GetSharedText'); - console.info("[teststateManagementGetShared0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[teststateManagementGetShared0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets deleted file mode 100644 index 4c83f088f..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/swiper.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function swiperCurveJsunit() { - describe('swiperCurveTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/swiper', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get swiper state success " + JSON.stringify(pages)); - if (!("swiper" == pages.name)) { - console.info("get swiper state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push swiper page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push swiper page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("swiperCurve after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testswiperCurve0001 - * @tc.desic aceswiperCurveEtsTest0001 - */ - it('testswiperCurve0001', 0, async function (done) { - console.info('swiperCurve testswiperCurve0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testswiperCurve0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testswiperCurve0002 - * @tc.desic aceswiperCurveEtsTest0002 - */ - it('testswiperCurve0002', 0, async function (done) { - console.info('swiperCurve testswiperCurve0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testswiperCurve0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testswiperCurve0003 - * @tc.desic aceswiperCurveEtsTest0003 - */ - it('testswiperCurve0003', 0, async function (done) { - console.info('swiperCurve testswiperCurve0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testswiperCurve0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testswiperCurve0004 - * @tc.desic aceswiperCurveEtsTest0004 - */ - it('testswiperCurve0004', 0, async function (done) { - console.info('swiperCurve testswiperCurve0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testswiperCurve0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testswiperCurve0005 - * @tc.desic aceswiperCurveEtsTest0005 - */ - it('testswiperCurve0005', 0, async function (done) { - console.info('swiperCurve testswiperCurve0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testswiperCurve0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testswiperCurve0006 - * @tc.desic aceswiperCurveEtsTest0006 - */ - it('testswiperCurve0006', 0, async function (done) { - console.info('swiperCurve testswiperCurve0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testswiperCurve0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testswiperCurve0007 - * @tc.desic aceswiperCurveEtsTest0007 - */ - it('testswiperCurve0007', 0, async function (done) { - console.info('swiperCurve testswiperCurve0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testswiperCurve0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testswiperCurve0009 - * @tc.desic aceswiperCurveEtsTest0009 - */ - it('testswiperCurve0009', 0, async function (done) { - console.info('swiperCurve testswiperCurve009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testswiperCurve0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testswiperCurve0010 - * @tc.desic aceswiperCurveEtsTest0010 - */ - it('testswiperCurve0010', 0, async function (done) { - console.info('swiperCurve testswiperCurve0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('curveText'); - console.info("[testswiperCurve0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testswiperCurve0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/tabs.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/tabs.test.ets deleted file mode 100644 index b65cbfd51..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/tabs.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function tabsBarPositionJsunit() { - describe('tabsBarPositionTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/tabs', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get tabs state success " + JSON.stringify(pages)); - if (!("tabs" == pages.name)) { - console.info("get tabs state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push tabs page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push tabs page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("tabsBarPosition after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testtabsBarPosition0001 - * @tc.desic acetabsBarPositionEtsTest0001 - */ - it('testtabsBarPosition0001', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testtabsBarPosition0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testtabsBarPosition0002 - * @tc.desic acetabsBarPositionEtsTest0002 - */ - it('testtabsBarPosition0002', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testtabsBarPosition0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testtabsBarPosition0003 - * @tc.desic acetabsBarPositionEtsTest0003 - */ - it('testtabsBarPosition0003', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testtabsBarPosition0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testtabsBarPosition0004 - * @tc.desic acetabsBarPositionEtsTest0004 - */ - it('testtabsBarPosition0004', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testtabsBarPosition0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testtabsBarPosition0005 - * @tc.desic acetabsBarPositionEtsTest0005 - */ - it('testtabsBarPosition0005', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testtabsBarPosition0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testtabsBarPosition0006 - * @tc.desic acetabsBarPositionEtsTest0006 - */ - it('testtabsBarPosition0006', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testtabsBarPosition0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testtabsBarPosition0007 - * @tc.desic acetabsBarPositionEtsTest0007 - */ - it('testtabsBarPosition0007', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testtabsBarPosition0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testtabsBarPosition0009 - * @tc.desic acetabsBarPositionEtsTest0009 - */ - it('testtabsBarPosition0009', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testtabsBarPosition0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testtabsBarPosition0010 - * @tc.desic acetabsBarPositionEtsTest0010 - */ - it('testtabsBarPosition0010', 0, async function (done) { - console.info('tabsBarPosition testtabsBarPosition0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('barPositionText'); - console.info("[testtabsBarPosition0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testtabsBarPosition0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/text.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/text.test.ets deleted file mode 100644 index 8e28cd905..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/text.test.ets +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function textMinFontSizeJsunit() { - describe('textMinFontSizeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/text', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get text state success " + JSON.stringify(pages)); - if (!("text" == pages.name)) { - console.info("get text state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push text page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push text page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("textMinFontSize after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testtextMinFontSize0001 - * @tc.desic acetextMinFontSizeEtsTest0001 - */ - it('testtextMinFontSize0001', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testtextMinFontSize0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testtextMinFontSize0002 - * @tc.desic acetextMinFontSizeEtsTest0002 - */ - it('testtextMinFontSize0002', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testtextMinFontSize0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testtextMinFontSize0003 - * @tc.desic acetextMinFontSizeEtsTest0003 - */ - it('testtextMinFontSize0003', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("30.00px"); - console.info("[testtextMinFontSize0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testtextMinFontSize0004 - * @tc.desic acetextMinFontSizeEtsTest0004 - */ - it('testtextMinFontSize0004', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testtextMinFontSize0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testtextMinFontSize0005 - * @tc.desic acetextMinFontSizeEtsTest0005 - */ - it('testtextMinFontSize0005', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testtextMinFontSize0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testtextMinFontSize0006 - * @tc.desic acetextMinFontSizeEtsTest0006 - */ - it('testtextMinFontSize0006', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testtextMinFontSize0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testtextMinFontSize0007 - * @tc.desic acetextMinFontSizeEtsTest0007 - */ - it('testtextMinFontSize0007', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testtextMinFontSize0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testtextMinFontSize0009 - * @tc.desic acetextMinFontSizeEtsTest0009 - */ - it('testtextMinFontSize0009', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testtextMinFontSize0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testtextMinFontSize0010 - * @tc.desic acetextMinFontSizeEtsTest0010 - */ - it('testtextMinFontSize0010', 0, async function (done) { - console.info('textMinFontSize testtextMinFontSize0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('minFontSizeText'); - console.info("[testtextMinFontSize0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testtextMinFontSize0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets deleted file mode 100644 index 8e8b7f850..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textArea.test.ets +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function textAreaOnCutJsunit() { - describe('textAreaOnCutTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/textArea', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get textArea state success " + JSON.stringify(pages)); - if (!("textArea" == pages.name)) { - console.info("get textArea state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push textArea page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push textArea page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("textAreaOnCut after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testtextAreaOnCut0001 - * @tc.desic acetextAreaOnCutEtsTest0001 - */ - it('testtextAreaOnCut0001', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testtextAreaOnCut0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testtextAreaOnCut0002 - * @tc.desic acetextAreaOnCutEtsTest0002 - */ - it('testtextAreaOnCut0002', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testtextAreaOnCut0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testtextAreaOnCut0003 - * @tc.desic acetextAreaOnCutEtsTest0003 - */ - it('testtextAreaOnCut0003', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testtextAreaOnCut0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testtextAreaOnCut0004 - * @tc.desic acetextAreaOnCutEtsTest0004 - */ - it('testtextAreaOnCut0004', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testtextAreaOnCut0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testtextAreaOnCut0005 - * @tc.desic acetextAreaOnCutEtsTest0005 - */ - it('testtextAreaOnCut0005', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testtextAreaOnCut0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testtextAreaOnCut0006 - * @tc.desic acetextAreaOnCutEtsTest0006 - */ - it('testtextAreaOnCut0006', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testtextAreaOnCut0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testtextAreaOnCut0007 - * @tc.desic acetextAreaOnCutEtsTest0007 - */ - it('testtextAreaOnCut0007', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.lineHeight).assertEqual(undefined); - console.info("[testtextAreaOnCut0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testtextAreaOnCut0009 - * @tc.desic acetextAreaOnCutEtsTest0009 - */ - it('testtextAreaOnCut0009', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.padding).assertEqual("0.00px"); - console.info("[testtextAreaOnCut0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testtextAreaOnCut0010 - * @tc.desic acetextAreaOnCutEtsTest0010 - */ - it('testtextAreaOnCut0010', 0, async function (done) { - console.info('textAreaOnCut testtextAreaOnCut0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onCutText'); - console.info("[testtextAreaOnCut0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextArea'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Center"); - console.info("[testtextAreaOnCut0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - - - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets deleted file mode 100644 index a860bd99a..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textInput.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function textInputOnEditChangeJsunit() { - describe('textInputOnEditChangeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/textInput', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get textInput state success " + JSON.stringify(pages)); - if (!("textInput" == pages.name)) { - console.info("get textInput state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push textInput page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push textInput page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("textInputOnEditChange after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testtextInputOnEditChange0001 - * @tc.desic acetextInputOnEditChangeEtsTest0001 - */ - it('testtextInputOnEditChange0001', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testtextInputOnEditChange0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testtextInputOnEditChange0002 - * @tc.desic acetextInputOnEditChangeEtsTest0002 - */ - it('testtextInputOnEditChange0002', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testtextInputOnEditChange0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testtextInputOnEditChange0003 - * @tc.desic acetextInputOnEditChangeEtsTest0003 - */ - it('testtextInputOnEditChange0003', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testtextInputOnEditChange0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testtextInputOnEditChange0004 - * @tc.desic acetextInputOnEditChangeEtsTest0004 - */ - it('testtextInputOnEditChange0004', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testtextInputOnEditChange0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testtextInputOnEditChange0005 - * @tc.desic acetextInputOnEditChangeEtsTest0005 - */ - it('testtextInputOnEditChange0005', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testtextInputOnEditChange0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testtextInputOnEditChange0006 - * @tc.desic acetextInputOnEditChangeEtsTest0006 - */ - it('testtextInputOnEditChange0006', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testtextInputOnEditChange0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testtextInputOnEditChange0007 - * @tc.desic acetextInputOnEditChangeEtsTest0007 - */ - it('testtextInputOnEditChange0007', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.lineHeight).assertEqual(undefined); - console.info("[testtextInputOnEditChange0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testtextInputOnEditChange0009 - * @tc.desic acetextInputOnEditChangeEtsTest0009 - */ - it('testtextInputOnEditChange0009', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.padding).assertEqual("0.00px"); - console.info("[testtextInputOnEditChange0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testtextInputOnEditChange0010 - * @tc.desic acetextInputOnEditChangeEtsTest0010 - */ - it('testtextInputOnEditChange0010', 0, async function (done) { - console.info('textInputOnEditChange testtextInputOnEditChange0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onEditChangeText'); - console.info("[testtextInputOnEditChange0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextInput'); - expect(obj.$attrs.textAlign).assertEqual(undefined); - console.info("[testtextInputOnEditChange0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets deleted file mode 100644 index da74d1508..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/textPicker.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function textPickerDefaultPickerItemHeightJsunit() { - describe('textPickerDefaultPickerItemHeightTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/textPicker', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get textPicker state success " + JSON.stringify(pages)); - if (!("textPicker" == pages.name)) { - console.info("get textPicker state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push textPicker page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push textPicker page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("textPickerDefaultPickerItemHeight after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testtextPickerDefaultPickerItemHeight0001 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0001 - */ - it('testtextPickerDefaultPickerItemHeight0001', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.width).assertEqual("-"); - console.info("[testtextPickerDefaultPickerItemHeight0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testtextPickerDefaultPickerItemHeight0002 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0002 - */ - it('testtextPickerDefaultPickerItemHeight0002', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.height).assertEqual("-"); - console.info("[testtextPickerDefaultPickerItemHeight0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testtextPickerDefaultPickerItemHeight0003 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0003 - */ - it('testtextPickerDefaultPickerItemHeight0003', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.fontSize).assertEqual(undefined); - console.info("[testtextPickerDefaultPickerItemHeight0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testtextPickerDefaultPickerItemHeight0004 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0004 - */ - it('testtextPickerDefaultPickerItemHeight0004', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testtextPickerDefaultPickerItemHeight0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testtextPickerDefaultPickerItemHeight0005 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0005 - */ - it('testtextPickerDefaultPickerItemHeight0005', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.align).assertEqual("Alignment.Center"); - console.info("[testtextPickerDefaultPickerItemHeight0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testtextPickerDefaultPickerItemHeight0006 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0006 - */ - it('testtextPickerDefaultPickerItemHeight0006', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.fontColor).assertEqual(undefined); - console.info("[testtextPickerDefaultPickerItemHeight0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testtextPickerDefaultPickerItemHeight0007 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0007 - */ - it('testtextPickerDefaultPickerItemHeight0007', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.lineHeight).assertEqual(undefined); - console.info("[testtextPickerDefaultPickerItemHeight0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testtextPickerDefaultPickerItemHeight0009 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0009 - */ - it('testtextPickerDefaultPickerItemHeight0009', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.padding).assertEqual("0.00px"); - console.info("[testtextPickerDefaultPickerItemHeight0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testtextPickerDefaultPickerItemHeight0010 - * @tc.desic acetextPickerDefaultPickerItemHeightEtsTest0010 - */ - it('testtextPickerDefaultPickerItemHeight0010', 0, async function (done) { - console.info('textPickerDefaultPickerItemHeight testtextPickerDefaultPickerItemHeight0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('defaultPickerItemHeightText'); - console.info("[testtextPickerDefaultPickerItemHeight0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('TextPicker'); - expect(obj.$attrs.textAlign).assertEqual(undefined); - console.info("[testtextPickerDefaultPickerItemHeight0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets deleted file mode 100644 index 85ae48faa..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/video.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function videoOnFullscreenChangeJsunit() { - describe('videoOnFullscreenChangeTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/video', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get video state success " + JSON.stringify(pages)); - if (!("video" == pages.name)) { - console.info("get video state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push video page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push video page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("videoOnFullscreenChange after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testvideoOnFullscreenChange0001 - * @tc.desic acevideoOnFullscreenChangeEtsTest0001 - */ - it('testvideoOnFullscreenChange0001', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.width).assertEqual("600.00vp"); - console.info("[testvideoOnFullscreenChange0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testvideoOnFullscreenChange0002 - * @tc.desic acevideoOnFullscreenChangeEtsTest0002 - */ - it('testvideoOnFullscreenChange0002', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.height).assertEqual("400.00vp"); - console.info("[testvideoOnFullscreenChange0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testvideoOnFullscreenChange0003 - * @tc.desic acevideoOnFullscreenChangeEtsTest0003 - */ - it('testvideoOnFullscreenChange0003', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.fontSize).assertEqual(undefined); - console.info("[testvideoOnFullscreenChange0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testvideoOnFullscreenChange0004 - * @tc.desic acevideoOnFullscreenChangeEtsTest0004 - */ - it('testvideoOnFullscreenChange0004', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testvideoOnFullscreenChange0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testvideoOnFullscreenChange0005 - * @tc.desic acevideoOnFullscreenChangeEtsTest0005 - */ - it('testvideoOnFullscreenChange0005', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.align).assertEqual("Alignment.Center"); - console.info("[testvideoOnFullscreenChange0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testvideoOnFullscreenChange0006 - * @tc.desic acevideoOnFullscreenChangeEtsTest0006 - */ - it('testvideoOnFullscreenChange0006', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.fontColor).assertEqual(undefined); - console.info("[testvideoOnFullscreenChange0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testvideoOnFullscreenChange0007 - * @tc.desic acevideoOnFullscreenChangeEtsTest0007 - */ - it('testvideoOnFullscreenChange0007', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.lineHeight).assertEqual(undefined); - console.info("[testvideoOnFullscreenChange0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testvideoOnFullscreenChange0009 - * @tc.desic acevideoOnFullscreenChangeEtsTest0009 - */ - it('testvideoOnFullscreenChange0009', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.padding).assertEqual("0.00px"); - console.info("[testvideoOnFullscreenChange0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testvideoOnFullscreenChange0010 - * @tc.desic acevideoOnFullscreenChangeEtsTest0010 - */ - it('testvideoOnFullscreenChange0010', 0, async function (done) { - console.info('videoOnFullscreenChange testvideoOnFullscreenChange0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('onFullscreenChangeText'); - console.info("[testvideoOnFullscreenChange0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Video'); - expect(obj.$attrs.textAlign).assertEqual(undefined); - console.info("[testvideoOnFullscreenChange0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/viewModel.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/viewModel.test.ets deleted file mode 100644 index 231e37cd4..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/viewModel.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function viewModelMatrixJsunit() { - describe('viewModelMatrixTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/viewModel', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get viewModel state success " + JSON.stringify(pages)); - if (!("viewModel" == pages.name)) { - console.info("get viewModel state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push viewModel page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push viewModel page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("viewModelMatrix after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testviewModelMatrix0001 - * @tc.desic aceviewModelMatrixEtsTest0001 - */ - it('testviewModelMatrix0001', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testviewModelMatrix0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testviewModelMatrix0002 - * @tc.desic aceviewModelMatrixEtsTest0002 - */ - it('testviewModelMatrix0002', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testviewModelMatrix0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testviewModelMatrix0003 - * @tc.desic aceviewModelMatrixEtsTest0003 - */ - it('testviewModelMatrix0003', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testviewModelMatrix0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testviewModelMatrix0004 - * @tc.desic aceviewModelMatrixEtsTest0004 - */ - it('testviewModelMatrix0004', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testviewModelMatrix0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testviewModelMatrix0005 - * @tc.desic aceviewModelMatrixEtsTest0005 - */ - it('testviewModelMatrix0005', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testviewModelMatrix0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testviewModelMatrix0006 - * @tc.desic aceviewModelMatrixEtsTest0006 - */ - it('testviewModelMatrix0006', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testviewModelMatrix0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testviewModelMatrix0007 - * @tc.desic aceviewModelMatrixEtsTest0007 - */ - it('testviewModelMatrix0007', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testviewModelMatrix0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testviewModelMatrix0009 - * @tc.desic aceviewModelMatrixEtsTest0009 - */ - it('testviewModelMatrix0009', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testviewModelMatrix0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testviewModelMatrix0010 - * @tc.desic aceviewModelMatrixEtsTest0010 - */ - it('testviewModelMatrix0010', 0, async function (done) { - console.info('viewModelMatrix testviewModelMatrix0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('matrixText'); - console.info("[testviewModelMatrix0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testviewModelMatrix0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/web.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/web.test.ets deleted file mode 100644 index f1ee01eaa..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/web.test.ets +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function webGetTitleJsunit() { - describe('webGetTitleTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/web', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get web state success " + JSON.stringify(pages)); - if (!("web" == pages.name)) { - console.info("get web state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push web page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push web page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("webGetTitle after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testwebGetTitle0002 - * @tc.desic acewebGetTitleEtsTest0002 - */ - it('testwebGetTitle0002', 0, async function (done) { - console.info('webGetTitle testwebGetTitle0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getTitleText'); - console.info("[testwebGetTitle0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("500.00vp"); - console.info("[testwebGetTitle0002] height value :" + obj.$attrs.height); - done(); - }); - }) -} diff --git a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets b/arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets deleted file mode 100644 index a43743a03..000000000 --- a/arkui/ace_ets_component_apilack/entry/src/main/ets/test/xcomponent.test.ets +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2022 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 router from '@system.router'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "hypium/index" -import Utils from './Utils.ets' - -export default function xcomponentGetXComponentContextJsunit() { - describe('xcomponentGetXComponentContextTest', function () { - beforeAll(async function (done) { - console.info("flex beforeEach start"); - let options = { - uri: 'pages/xcomponent', - } - try { - router.clear(); - let pages = router.getState(); - console.info("get xcomponent state success " + JSON.stringify(pages)); - if (!("xcomponent" == pages.name)) { - console.info("get xcomponent state success " + JSON.stringify(pages.name)); - let result = await router.push(options); - await Utils.sleep(2000); - console.info("push xcomponent page success " + JSON.stringify(result)); - } - } catch (err) { - console.error("push xcomponent page error: " + err); - } - done() - }); - - afterEach(async function () { - await Utils.sleep(1000); - console.info("xcomponentGetXComponentContext after each called"); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0001 - * @tc.name testxcomponentGetXComponentContext0001 - * @tc.desic acexcomponentGetXComponentContextEtsTest0001 - */ - it('testxcomponentGetXComponentContext0001', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0001 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0001] component width strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.width).assertEqual("100.00vp"); - console.info("[testxcomponentGetXComponentContext0001] width value :" + obj.$attrs.width); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0002 - * @tc.name testxcomponentGetXComponentContext0002 - * @tc.desic acexcomponentGetXComponentContextEtsTest0002 - */ - it('testxcomponentGetXComponentContext0002', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0002 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0002] component height strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.height).assertEqual("70.00vp"); - console.info("[testxcomponentGetXComponentContext0002] height value :" + obj.$attrs.height); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0003 - * @tc.name testxcomponentGetXComponentContext0003 - * @tc.desic acexcomponentGetXComponentContextEtsTest0003 - */ - it('testxcomponentGetXComponentContext0003', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0003 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0003] component fontSize strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontSize).assertEqual("20.00fp"); - console.info("[testxcomponentGetXComponentContext0003] fontSize value :" + obj.$attrs.fontSize); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0004 - * @tc.name testxcomponentGetXComponentContext0004 - * @tc.desic acexcomponentGetXComponentContextEtsTest0004 - */ - it('testxcomponentGetXComponentContext0004', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0004 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0004] component opacity strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.opacity).assertEqual(1); - console.info("[testxcomponentGetXComponentContext0004] opacity value :" + obj.$attrs.opacity); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0005 - * @tc.name testxcomponentGetXComponentContext0005 - * @tc.desic acexcomponentGetXComponentContextEtsTest0005 - */ - it('testxcomponentGetXComponentContext0005', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0005 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0005] component align strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.align).assertEqual("Alignment.TopStart"); - console.info("[testxcomponentGetXComponentContext0005] align value :" + obj.$attrs.align); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0006 - * @tc.name testxcomponentGetXComponentContext0006 - * @tc.desic acexcomponentGetXComponentContextEtsTest0006 - */ - it('testxcomponentGetXComponentContext0006', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0006 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0006] component fontColor strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.fontColor).assertEqual("#FFCCCCCC"); - console.info("[testxcomponentGetXComponentContext0006] fontColor value :" + obj.$attrs.fontColor); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0007 - * @tc.name testxcomponentGetXComponentContext0007 - * @tc.desic acexcomponentGetXComponentContextEtsTest0007 - */ - it('testxcomponentGetXComponentContext0007', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0007 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0007] component lineHeight strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.lineHeight).assertEqual("25.00fp"); - console.info("[testxcomponentGetXComponentContext0007] lineHeight value :" + obj.$attrs.lineHeight); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0009 - * @tc.name testxcomponentGetXComponentContext0009 - * @tc.desic acexcomponentGetXComponentContextEtsTest0009 - */ - it('testxcomponentGetXComponentContext0009', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext009 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0009] component padding strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.padding).assertEqual("10.00vp"); - console.info("[testxcomponentGetXComponentContext0009] padding value :" + obj.$attrs.padding); - done(); - }); - - /* - * @tc.number SUB_ACE_BASIC_ETS_API_0010 - * @tc.name testxcomponentGetXComponentContext0010 - * @tc.desic acexcomponentGetXComponentContextEtsTest0010 - */ - it('testxcomponentGetXComponentContext0010', 0, async function (done) { - console.info('xcomponentGetXComponentContext testxcomponentGetXComponentContext0010 START'); - await Utils.sleep(2000); - let strJson = getInspectorByKey('getXComponentContextText'); - console.info("[testxcomponentGetXComponentContext0010] component textAlign strJson:" + strJson); - let obj = JSON.parse(strJson); - expect(obj.$type).assertEqual('Text'); - expect(obj.$attrs.textAlign).assertEqual("TextAlign.Left"); - console.info("[testxcomponentGetXComponentContext0010] textAlign value :" + obj.$attrs.textAlign); - done(); - }); - }) -} -- GitLab