diff --git a/function/ui_compare_rh/README.md b/function/ui_compare_rh/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c4522b53d50850a5eeee1376030ef71e71d67665 --- /dev/null +++ b/function/ui_compare_rh/README.md @@ -0,0 +1,136 @@ +# UI对比测试开发指南 + +## 0、需求(文本用例) + +用例举例,开发如下用例: + +| 用例_名称 | 用例_编号 | 创建版本 |预置条件| 测试步骤|预期结果|自动化类型| +|-----|------|-------|------|------|------|------| +| 文本样式fontColor:Color类型 | SUB_ACE_UI_ATTRIBUTES_FONT_INTERFACE_0010 | OpenHarmony V400R001 |新建eTS页面|1、添加文本组件2、设置fontColor为Color.Blue 3、编译测试demo|3、编译通过,文本显示蓝色|UI对比| + +## 1、编写工程和代码 + +### 1.1 新建或导入已有工程,创建目录和页面 + +以从DevEco导入本目录下的uicompare工程为例: + +在testability目录下创建页面,命名规则,用例编号除数字外,相同的用例在pages下创建一个同名子目录,每个编号的用例创建一个ets文件,文件名采用大驼峰如下: + +![image](figures/1.png) + +### 1.2 创建测试用例目录和文件 + +在test目录下创建用例目录,目录名称和2\.1中的页面相同并在后面加Test,用例文件和页面ets文件相同,后缀多了\.test,如下图: + +![image](figures/2.png) + +### 1.3 编写页面 + +按用例要求编写页面,创建文本组件,并设置颜色为Blue。 + +结构名称和文件名相同,组件需要设置id的,使用本文件名加"_001"按递增使用,避免和别的文件中的id重名。 + +![image](figures/3.png) + +### 1.4 编写用例 + +修改类名,注释,测试套名称,用例名称,和测试用例文件及用例文档中对应,修改调用的页面文件路由,和页面路径对应: + +![image](figures/4.png) + +![image](figures/5.png) + +### 1.5 在List.test.ets中添加测试套和页面路由 +注意:这里的页面是写在ohosTest模块下,不要写到main模块里。 + +![image](figures/6.png) + +![image](figures/7.png) + +## 2、编译运行 +### 2.1 编译 + +因为工程使用了截屏接口,需要系统权限,在SDK的sdk\12\toolchains\lib\UnsgnedReleasedProfileTemplate.json文件中修改应用级别:"apl":"system_core", +"app-feature":"hos_system_app"。 + +在IDE的file -> Project Structure 中自动签名: + +![image](figures/8.png) + +Build-> Rebuild 编译hap: + +![image](figures/9.png) + +### 2.2 执行用例 +右键xxxxx.test.ets 文件执行用例,或右键test目录执行全部用例: + +![image](figures/10.png) + +观察设备是否正常显示测试页面,显示了蓝色的文字: + +![image](figures/11.png) + +测试结果: + +![image](figures/12.png) + +### 2.3 检查截屏图片: + +![image](figures/13.png) + +用hdc从设备拉取截屏图片: + +![image](figures/14.png) + +打开检查截图是否正确: + +![image](figures/15.png) + +用例开发完成,且调试成功。 + +## 3、对比UI图片 + +使用uicompare_tools目录下的python对比工具脚本。 + +使用对比脚本前需要安装python环境,安装依赖包:需安装三个包:openpyxl、numpy、pillow。 + +hdc配置到系统环境变量。 + +### 3.1 将编译的hap包拷贝到ui对比工具的hap目录下 + +![image](figures/16.png) + +![image](figures/17.png) + +### 3.2 在excel表中添加测试用例 + +excel文件名和hap名必须相同,一个excel对应一个hap。 + +![image](figures/18.png) + +![image](figures/19.png) + +### 3.3 生成基线图片: + +![image](figures/20.png) + +![image](figures/21.png) + +### 3.4 对此测试 + +指定基线图片目录和上中路径一致: + +![image](figures/22.png) + +测试显示用例执行通过: + +![image](figures/23.png) + +### 3.5 测试报告 + +![image](figures/24.png) + +![image](figures/25.png) + + + diff --git a/function/ui_compare_rh/figures/1.png b/function/ui_compare_rh/figures/1.png new file mode 100644 index 0000000000000000000000000000000000000000..5424b7902c69330ffe5f6dd97aadefda3091164f Binary files /dev/null and b/function/ui_compare_rh/figures/1.png differ diff --git a/function/ui_compare_rh/figures/10.png b/function/ui_compare_rh/figures/10.png new file mode 100644 index 0000000000000000000000000000000000000000..a3e91a1b1164e13c1a4032e9ec4619944a533e5f Binary files /dev/null and b/function/ui_compare_rh/figures/10.png differ diff --git a/function/ui_compare_rh/figures/11.png b/function/ui_compare_rh/figures/11.png new file mode 100644 index 0000000000000000000000000000000000000000..7dbbbb8680139cc82151b17593d7fd2bd5e42402 Binary files /dev/null and b/function/ui_compare_rh/figures/11.png differ diff --git a/function/ui_compare_rh/figures/12.png b/function/ui_compare_rh/figures/12.png new file mode 100644 index 0000000000000000000000000000000000000000..4ccf7d44417f7d93f94ddda5b18be9517348269f Binary files /dev/null and b/function/ui_compare_rh/figures/12.png differ diff --git a/function/ui_compare_rh/figures/13.png b/function/ui_compare_rh/figures/13.png new file mode 100644 index 0000000000000000000000000000000000000000..2024a8115867c326dee5efaa621ce962521f434a Binary files /dev/null and b/function/ui_compare_rh/figures/13.png differ diff --git a/function/ui_compare_rh/figures/14.png b/function/ui_compare_rh/figures/14.png new file mode 100644 index 0000000000000000000000000000000000000000..633a80c80bc310cd66deb08f2473918db9ba2eb7 Binary files /dev/null and b/function/ui_compare_rh/figures/14.png differ diff --git a/function/ui_compare_rh/figures/15.png b/function/ui_compare_rh/figures/15.png new file mode 100644 index 0000000000000000000000000000000000000000..08c41aa20d552bfaddd2a40e90ea4eafc0fbadc3 Binary files /dev/null and b/function/ui_compare_rh/figures/15.png differ diff --git a/function/ui_compare_rh/figures/16.png b/function/ui_compare_rh/figures/16.png new file mode 100644 index 0000000000000000000000000000000000000000..61a4c79840404a664181de7eaab0637b38c9f9b2 Binary files /dev/null and b/function/ui_compare_rh/figures/16.png differ diff --git a/function/ui_compare_rh/figures/17.png b/function/ui_compare_rh/figures/17.png new file mode 100644 index 0000000000000000000000000000000000000000..b3c346c1220ee4529f0b60752b9996e16485617d Binary files /dev/null and b/function/ui_compare_rh/figures/17.png differ diff --git a/function/ui_compare_rh/figures/18.png b/function/ui_compare_rh/figures/18.png new file mode 100644 index 0000000000000000000000000000000000000000..68d8881e20e301488b1cd85fb33bf3b106dad5c7 Binary files /dev/null and b/function/ui_compare_rh/figures/18.png differ diff --git a/function/ui_compare_rh/figures/19.png b/function/ui_compare_rh/figures/19.png new file mode 100644 index 0000000000000000000000000000000000000000..ac58da7cc49e6f0957fbadc50a1927becfc4e2c9 Binary files /dev/null and b/function/ui_compare_rh/figures/19.png differ diff --git a/function/ui_compare_rh/figures/2.png b/function/ui_compare_rh/figures/2.png new file mode 100644 index 0000000000000000000000000000000000000000..6c3dde1577ddb12f63061e4ddfd380d1f32d167a Binary files /dev/null and b/function/ui_compare_rh/figures/2.png differ diff --git a/function/ui_compare_rh/figures/20.png b/function/ui_compare_rh/figures/20.png new file mode 100644 index 0000000000000000000000000000000000000000..f1168f94ca1a07da6b8d4573040f440e19a37811 Binary files /dev/null and b/function/ui_compare_rh/figures/20.png differ diff --git a/function/ui_compare_rh/figures/21.png b/function/ui_compare_rh/figures/21.png new file mode 100644 index 0000000000000000000000000000000000000000..62c5318d417bd4616d52857c7661c12a768f840e Binary files /dev/null and b/function/ui_compare_rh/figures/21.png differ diff --git a/function/ui_compare_rh/figures/22.png b/function/ui_compare_rh/figures/22.png new file mode 100644 index 0000000000000000000000000000000000000000..03ce77ab89e45415079f6239d53cde66e1bbc37a Binary files /dev/null and b/function/ui_compare_rh/figures/22.png differ diff --git a/function/ui_compare_rh/figures/23.png b/function/ui_compare_rh/figures/23.png new file mode 100644 index 0000000000000000000000000000000000000000..8efdb1a39de83730abec3a4b7f0f5fb740c2389a Binary files /dev/null and b/function/ui_compare_rh/figures/23.png differ diff --git a/function/ui_compare_rh/figures/24.png b/function/ui_compare_rh/figures/24.png new file mode 100644 index 0000000000000000000000000000000000000000..ba25f3a4b3ba91274b7eccf5051a158261b23a55 Binary files /dev/null and b/function/ui_compare_rh/figures/24.png differ diff --git a/function/ui_compare_rh/figures/25.png b/function/ui_compare_rh/figures/25.png new file mode 100644 index 0000000000000000000000000000000000000000..5277cf722abb4f1d7943c2deffaf90e4d33dab39 Binary files /dev/null and b/function/ui_compare_rh/figures/25.png differ diff --git a/function/ui_compare_rh/figures/3.png b/function/ui_compare_rh/figures/3.png new file mode 100644 index 0000000000000000000000000000000000000000..f67097e20179919a3ff91dd8c6c209773538a1cb Binary files /dev/null and b/function/ui_compare_rh/figures/3.png differ diff --git a/function/ui_compare_rh/figures/4.png b/function/ui_compare_rh/figures/4.png new file mode 100644 index 0000000000000000000000000000000000000000..fb62a3cf06c8afe812c7caebef4d2283a3e46e13 Binary files /dev/null and b/function/ui_compare_rh/figures/4.png differ diff --git a/function/ui_compare_rh/figures/5.png b/function/ui_compare_rh/figures/5.png new file mode 100644 index 0000000000000000000000000000000000000000..b728087c47ad5e2f7ef28dc1de3566165b1604ce Binary files /dev/null and b/function/ui_compare_rh/figures/5.png differ diff --git a/function/ui_compare_rh/figures/6.png b/function/ui_compare_rh/figures/6.png new file mode 100644 index 0000000000000000000000000000000000000000..ba08042c823ef71f49e76a4b3e1ea812d5c8432f Binary files /dev/null and b/function/ui_compare_rh/figures/6.png differ diff --git a/function/ui_compare_rh/figures/7.png b/function/ui_compare_rh/figures/7.png new file mode 100644 index 0000000000000000000000000000000000000000..276823adc1fa505f57d4059d768357654fc9d992 Binary files /dev/null and b/function/ui_compare_rh/figures/7.png differ diff --git a/function/ui_compare_rh/figures/8.png b/function/ui_compare_rh/figures/8.png new file mode 100644 index 0000000000000000000000000000000000000000..93d2547bf903a0b37a8b8f6706789558b95bcea2 Binary files /dev/null and b/function/ui_compare_rh/figures/8.png differ diff --git a/function/ui_compare_rh/figures/9.png b/function/ui_compare_rh/figures/9.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab1b3c96fb2d320093889235d364fc651e2238b Binary files /dev/null and b/function/ui_compare_rh/figures/9.png differ diff --git a/function/ui_compare_rh/uicompare/.gitignore b/function/ui_compare_rh/uicompare/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..fbabf771011fe78f9919db0b1195ab6cadffc2b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/.gitignore @@ -0,0 +1,11 @@ +/node_modules +/oh_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/AppScope/app.json5 b/function/ui_compare_rh/uicompare/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..eabf71557eadee20c8a9913b10b8e25e6e5347a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/AppScope/app.json5 @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.example.uicompare", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name" + } +} diff --git a/function/ui_compare_rh/uicompare/AppScope/resources/base/element/string.json b/function/ui_compare_rh/uicompare/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..c102b07cf38bd502d548f44266affbd1267ade12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "uicompare" + } + ] +} diff --git a/function/ui_compare_rh/uicompare/AppScope/resources/base/media/app_icon.png b/function/ui_compare_rh/uicompare/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/function/ui_compare_rh/uicompare/AppScope/resources/base/media/app_icon.png differ diff --git a/function/ui_compare_rh/uicompare/build-profile.json5 b/function/ui_compare_rh/uicompare/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..25255c09b22c8ee5c92dd996d086837b3ccb6982 --- /dev/null +++ b/function/ui_compare_rh/uicompare/build-profile.json5 @@ -0,0 +1,29 @@ +{ + "app": { + "signingConfigs": [ + ], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compileSdkVersion": 12, + "compatibleSdkVersion": 12, + "runtimeOS": "OpenHarmony" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/.gitignore b/function/ui_compare_rh/uicompare/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/build-profile.json5 b/function/ui_compare_rh/uicompare/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..f8f03407f77914b43168aeca6bb0929efd6700b4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/build-profile.json5 @@ -0,0 +1,13 @@ +{ + "apiType": 'stageMode', + "buildOption": { + }, + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/hvigorfile.ts b/function/ui_compare_rh/uicompare/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..80e4ec5b81689f238c34614b167a0b9e9c83e8d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/hvigorfile.ts @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { hapTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/function/ui_compare_rh/uicompare/entry/oh-package.json5 b/function/ui_compare_rh/uicompare/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..225946cb11a2c405c8dc81eea89c22f923556638 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "license": "", + "devDependencies": {}, + "author": "", + "name": "entry", + "description": "Please describe the basic information.", + "main": "", + "version": "1.0.0", + "dependencies": {} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/main/ets/entryability/EntryAbility.ts b/function/ui_compare_rh/uicompare/entry/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..c239c7738e12c1bc2e5a24b151d2ec5842e760ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 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 UIAbility from '@ohos.app.ability.UIAbility'; +import hilog from '@ohos.hilog'; +import window from '@ohos.window'; + +export default class EntryAbility extends UIAbility { + onCreate(want, launchParam) { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage) { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err, data) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); + }); + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground() { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground() { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/main/ets/pages/Index.ets b/function/ui_compare_rh/uicompare/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e4b0390777d039b0993caeeff4c0deab3384c57 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 message: string = 'Hello World' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/main/module.json5 b/function/ui_compare_rh/uicompare/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..9b07af70a189c0165e30b9f4bedc3bfd22b53cda --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/module.json5 @@ -0,0 +1,37 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ts", + "description": "$string:EntryAbility_desc", + "icon": "$media:icon", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/color.json b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/string.json b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/base/media/icon.png b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/media/icon.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/base/profile/main_pages.json b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/en_US/element/string.json b/function/ui_compare_rh/uicompare/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/main/resources/zh_CN/element/string.json b/function/ui_compare_rh/uicompare/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..597ecf95e61d7e30367c22fe2f8638008361b044 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/2.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/2.png new file mode 100644 index 0000000000000000000000000000000000000000..382ac7dc322871219388ca27f7c637447e8c9e77 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/2.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/cat.jpg b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/cat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..382ac7dc322871219388ca27f7c637447e8c9e77 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/cat.jpg differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/Ability.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..76e140bc60b9e19df3e40c0c70b172198360e76b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 hilog from '@ohos.hilog'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d89467b99a7287b4e324254418403c0ea6ed57e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface from './UIAttributesBorderInterfaceTest/UIAttributesBorderInterface.test'; +import UIComponentBorderDashedDashgapDashwidth from './UIComponentBorderDashedDashgapDashwidthTest/UIComponentBorderDashedDashgapDashwidth.test'; +import UIComponentCanvasResetTest from './UIComponentCanvasResetTest/UIComponentCanvasReset.test'; +import UIAttributesKeyboardavoidmodeSetup from './UIAttributesKeyboardavoidmodeSetupTest/UIAttributesKeyboardavoidmodeSetup.test'; +import UIComponentLayoutGridrowgridcolInterface from './UIComponentLayoutGridrowgridcolInterfaceTest/UIComponentLayoutGridrowgridcolInterface.test'; +import UIComponentLayoutGridrowgridcolLayout from './UIComponentLayoutGridrowgridcolLayoutTest/UIComponentLayoutGridrowgridcolLayout.test'; +import UIAttributesKeyboardavoidmodeTransitionanimationTest from "./UIAttributesKeyboardavoidmodeTransitionanimationTest/UIAttributesKeyboardavoidmodeTransitionanimation.test"; +import UIRelativecontainerJingxiang from './UIRelativecontainerJingxiangTest/UIRelativecontainerJingxiang.test'; +import UIRelativecontainerBias from './UIRelativecontainerBiasTest/UIRelativecontainerBias.test'; +import TSBaseComponentRelativecontaineer from "./TSBaseComponentRelativecontaineerTest/TSBaseComponentRelativecontaineer.test" +import UIAttributesKeyboardavoidmodeLayoutTest from "./UIAttributesKeyboardavoidmodeLayoutTest/UIAttributesKeyboardavoidmodeLayout.test" +import UIRelativecontainerCollaboration from './UIRelativecontainerCollaborationTest/UIRelativecontainerCollaboration.test'; +import UIComponentGraphicCanvasThread from './UIComponentGraphicCanvasThreadTest/UIComponentGraphicCanvasThread.test'; +import UIComponentCanvas0ffscreencanvas + from './UIComponentCanvas0ffscreencanvasTest/UIComponentCanvas0ffscreencanvas.test'; +import UIComponentCanvasOffecreencanvasGpuDraw + from './UIComponentCanvasOffecreencanvasGpuDrawTest/UIComponentCanvasOffecreencanvasGpuDraw.test'; +import UICustomDrawingSafeareaScene from './UICustomDrawingSafeareaSceneTest/UICustomDrawingSafeareaScene.test'; + +export default function testsuite() { + UIComponentCanvasResetTest(); + UIAttributesBorderInterface(); + UIComponentLayoutGridrowgridcolInterface(); + UIAttributesKeyboardavoidmodeSetup(); + UIComponentBorderDashedDashgapDashwidth(); + UIComponentLayoutGridrowgridcolLayout(); + UIAttributesKeyboardavoidmodeTransitionanimationTest(); + UIRelativecontainerJingxiang(); + UIRelativecontainerBias(); + TSBaseComponentRelativecontaineer(); + UIAttributesKeyboardavoidmodeLayoutTest(); + UIRelativecontainerCollaboration(); + UIComponentGraphicCanvasThread(); + UIComponentCanvas0ffscreencanvas(); + UIComponentCanvasOffecreencanvasGpuDraw(); + UICustomDrawingSafeareaScene(); +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TSBaseComponentRelativecontaineerTest/TSBaseComponentRelativecontaineer.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TSBaseComponentRelativecontaineerTest/TSBaseComponentRelativecontaineer.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e529b92dc3b19ac3e90d1fcb28bc585a70c05d1c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/TSBaseComponentRelativecontaineerTest/TSBaseComponentRelativecontaineer.test.ets @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function TSBaseComponentRelativecontaineer() { + + describe('TSBaseComponentRelativecontaineer', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0010 + * @tc.name RELATIVECONTAINEER_0010 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0010 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0040 + * @tc.name RELATIVECONTAINEER_0040 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0040 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0050 + * @tc.name RELATIVECONTAINEER_0050 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0050 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0050"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0060 + * @tc.name RELATIVECONTAINEER_0060 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0060 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0060"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0070 + * @tc.name RELATIVECONTAINEER_0070 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0070 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0070"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0110 + * @tc.name RELATIVECONTAINEER_0110 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0110 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0110"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0120 + * @tc.name RELATIVECONTAINEER_0120 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0120 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0120"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0130 + * @tc.name RELATIVECONTAINEER_0130 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0130 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0130"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0220 + * @tc.name RELATIVECONTAINEER_0220 + */ + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0220 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0220"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0220 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0030 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0030 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0020 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0020"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0020 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0140 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0140"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0140 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0090 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0090"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0090 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0100 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0100"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0100 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0080 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0080"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0080 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0170 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0170"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0170 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0150 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0150"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0150 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0160 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0160"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0160 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0180 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0180"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0180 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0190 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0190"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0190 finish.`); + done(); + }) + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0200 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0200"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0200 finish.`); + done(); + }) + + it('SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0210 start.`); + Settings.createWindow("testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0210"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_TS_BASE_COMPONENT_RELATIVECONTAINEER_0210 finish.`); + done(); + }) + + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesBorderInterfaceTest/UIAttributesBorderInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesBorderInterfaceTest/UIAttributesBorderInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..674f5b985310411aa2e7a10e85823a5e08b59438 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesBorderInterfaceTest/UIAttributesBorderInterface.test.ets @@ -0,0 +1,767 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIAttributesBorderInterface() { + + describe('UIAttributesBorderInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0160 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0160") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0160 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0150 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0150") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0150 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0140 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0140") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0140 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0130 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0130") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0130 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0120 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0120") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0120 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0110 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0110") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0110 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0170 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0170") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0170 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0180 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0180") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0180 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0190 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0190") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0190 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0200 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0200") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0200 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0210 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0210") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0210 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0220 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0220") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0220 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0230 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0230") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0230 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0240 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0240") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0240 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0250 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0250") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0250 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0260 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0260") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0260 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0270 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0270") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0270 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0280 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0280") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0280 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0290 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0290") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0290 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0300 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0300") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0300 finish.`); + done() + }) + + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0010") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0010 finish.`); + done() + }) + + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0020") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0020 finish.`); + done() + }) + + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0030") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0030 finish.`); + done() + }) + + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0040") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0040 finish.`); + done() + }) + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0100 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0100") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0100 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0480 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0480 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0480") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0480 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0490 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0490 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0490") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0490 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0500 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0500 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0500") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0500 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0510 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0510 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0510") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0510 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0520 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0520") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0520 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0530 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0530 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0530") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0530 finish.`); + done() + }) + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0540 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0540 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0540") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0540 finish.`); + done() + }) + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0550 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0550") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0550 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0560 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0560 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0560") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0560 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0570 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0570 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0570") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0570 finish.`); + done() + }) + + /** + ** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0580 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0580 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0580") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0580 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0310 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0310") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0310 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0320 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0320") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0320 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0330 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0330") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0330 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0340 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0340") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0340 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0350 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0350") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0350 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0360 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0360") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0360 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0370 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0370") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0370 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0380 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0380") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0380 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0390 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0390 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0390") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0390 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0400 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0400") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0400 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0410 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0410") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0410 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0420 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0420") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0420 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0430 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0430 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0430") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0430 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0440 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0440") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0440 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0450 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0450 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0450") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0450 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0460 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0460 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0460") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0460 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0470 + */ + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0470 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0470") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0470 finish.`); + done() + }) + + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0050"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0050 finish.`); + done(); + }) + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0060"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0060 finish.`); + done(); + }) + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0070"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0070 finish.`); + done(); + }) + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0080"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0080 finish.`); + done(); + }) + it('SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0090"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_BORDER_INTERFACE_0090 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeLayoutTest/UIAttributesKeyboardavoidmodeLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeLayoutTest/UIAttributesKeyboardavoidmodeLayout.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f12dca6d22f0842b9be1d7cae9b941525f91e60 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeLayoutTest/UIAttributesKeyboardavoidmodeLayout.test.ets @@ -0,0 +1,937 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIAttributesKeyboardavoidmodeLayout() { + + describe('UIAttributesKeyboardavoidmodeLayout', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0010 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0010"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(1000); + let showDialodBtn = await driver.findComponent(ON.id("showDialod")); + await showDialodBtn.click(); + await Utils.sleep(1000); + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0010 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0020"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0030 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0030"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let showPanelBtn = await driver.findComponent(ON.id("showPanel")); + await showPanelBtn.click(); + await Utils.sleep(1000); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + await showPanelBtn.click(); + await showPanelBtn.click(); + await Utils.sleep(1000); + + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0030 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0040 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0040"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0040 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0050 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0050"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(1000); + + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0050 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0060 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0060"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let testInput = await driver.findComponent(ON.id("textInput")); + await testInput.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0060 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0070 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0070"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testArea = await driver.findComponent(ON.id("textArea")); + await testArea.click(); + await Utils.sleep(800); + + let point = await testArea.getBoundsCenter(); + await driver.fling({x: point.x, y: point.y+80}, {x: point.x, y: point.y-80}, 5, 2000) + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0070 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0080 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0080"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + + let testArea = await driver.findComponent(ON.id("textArea")); + let point = await testArea.getBoundsCenter(); + await driver.fling({x: point.x, y: point.y+80}, {x: point.x, y: point.y-80}, 5, 2000) + await Utils.sleep(1000); + await driver.mouseClick({ + x: point.x+100, y: point.y+100 + }, MouseButton.MOUSE_BUTTON_LEFT) + + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0080 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0090 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0090"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("textInput2")); + await testInput2.click(); + await Utils.sleep(1000); + let testInput1 = await driver.findComponent(ON.id("textInput1")); + await testInput1.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0090 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0100 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0100"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let resizeBtn = await driver.findComponent(ON.id("changePage")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem10_1")); + await testInput2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0100 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0110 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0110"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem10_1")); + await testInput2.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0110 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0120 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let showToastBtn = await driver.findComponent(ON.id("showToast")); + await showToastBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem10_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0120 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0130 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem10_2")); + await testInput2.click(); + await Utils.sleep(800); + + let showToastBtn = await driver.findComponent(ON.id("showToast")); + await showToastBtn.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0130 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0140 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("offset")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem1_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0140 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0150 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem1_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0150 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0160 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("next")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem16_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0160 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0170 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0170"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem2_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0170 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0180 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0180"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem2_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0180 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0190 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0190"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem2_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0190 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0200 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0200"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem2_2")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0200 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0210 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0210"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem9_2")); + await testInput2.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem9_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0210 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0220 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0220"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem9_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0220 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0230 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0230"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem7_2")); + await testInput1.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem7_1")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0230 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0240 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0240 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0240"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("resize")); + await testInput1.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem7_1")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0230 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0250 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0250"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem6_2")); + await testInput2.click(); + + let testInput1 = await driver.findComponent(ON.id("ListItem6_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0250 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0260 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0260"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("resize")); + await testInput1.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem6_1")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0260 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0270 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0270"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("showPanel")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("textInput")); + await testInput2.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0270 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0280 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0280"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem14_2")); + await testInput2.click(); + await Utils.sleep(800); + + await driver.pressBack(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem14_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0280 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0290 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0290"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem14_2")); + await testInput2.click(); + await Utils.sleep(800); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0290 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0300 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0300 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0300"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem8_2")); + await testInput2.click(); + await Utils.sleep(800); + + await driver.pressBack(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem8_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0300 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0310 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0310"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem8_2")); + await testInput2.click(); + await Utils.sleep(800); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0310 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0320 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0320"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem13_2")); + await testInput2.click(); + await Utils.sleep(800); + + await driver.pressBack(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem13_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0320 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0330 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0330"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem13_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0330 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0340 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0340"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem15_2")); + await testInput2.click(); + await Utils.sleep(800); + + await driver.pressBack(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem15_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0340 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0350 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0350"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let testInput2 = await driver.findComponent(ON.id("ListItem12_2")); + await testInput2.click(); + await Utils.sleep(800); + + await driver.pressBack(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem12_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0350 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0360 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0360"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let changePageBtn = await driver.findComponent(ON.id("changePage")); + await changePageBtn.click(); + await Utils.sleep(800); + + let resizeBtn = await driver.findComponent(ON.id("resize")); + await resizeBtn.click(); + await Utils.sleep(800); + + let testInput1 = await driver.findComponent(ON.id("ListItem12_1")); + await testInput1.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_LAYOUT_0360 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeSetupTest/UIAttributesKeyboardavoidmodeSetup.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeSetupTest/UIAttributesKeyboardavoidmodeSetup.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ec18a05bb49664ea859277872bc1a39c4967d0f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeSetupTest/UIAttributesKeyboardavoidmodeSetup.test.ets @@ -0,0 +1,1271 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIAttributesKeyboardavoidmodeSetup() { + + describe('UIAttributesKeyboardavoidmodeSetup', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0060"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0060_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0070 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0070"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0070_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0080 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0080"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0080_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0080 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0090 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0090"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0090_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0090 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0100 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0100"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0100_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0110 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0110"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0110_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0110 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0120 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0120"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0120_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0120 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0130 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0130"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0130_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0130 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0140 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0140"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0140_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0140 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0150 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0150"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0150_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0150 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0160 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0160"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0160_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0160 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0170 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0170"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0170 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0180 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0180"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0180 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0190 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0190"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0190 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0200 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0200"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0200 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0210 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0210"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0210 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0220 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0220"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0220 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0230 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0230"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0230 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0240 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0240 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0240"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0240 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0250 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0250"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0250 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0260 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0260"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0260 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0270 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0270"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0010 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0020 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0020"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0030 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0040 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0050 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0050"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0530 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0530 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0530"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0530 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0540 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0540 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0540"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0540 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0550 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0550 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0550"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0560 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0560 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0560"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0570 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0570 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0570"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0570 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0580 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0580 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0580"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0580 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0590 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0590 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0590"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0590 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0600 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0600 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0600"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0600 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0610 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0610 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0610"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100); + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0610')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0610 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0620 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0620 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0620"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100); + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0620')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0630 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0630 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0630"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100); + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0630')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0630 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0640 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0640 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0640"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0640 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0650 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0650 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0650"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0650 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0660 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0660 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0660"); + await Utils.sleep(2000); + await windowSnap.snapShot() + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0660 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0670 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0670 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0670"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0670 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0680 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0680 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0680"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100); + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0680')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0680 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0690 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0690 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0690"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100); + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0690')); + await button.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0690 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0700 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0700 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0700"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0700 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0710 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0710 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0710"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0710 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0720 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0720 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0720"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0720 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0730 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0730', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0730 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0730"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0730 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0730 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0740', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0740 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0740"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0740 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0750 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0750 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0750"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0750 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0760 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0760 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0760"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0760 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0770 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0770', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0770 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0770"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0770 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0780 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0780 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0780"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0780 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0790 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0790 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0790"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0790 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0800 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0800 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0800"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0800 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0810 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0810 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0810"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0810 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0820 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0820 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0820"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0820 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0830 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0830 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0830"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0830 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0840 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0840 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0840"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0840 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0280 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0280"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0280_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0280 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0290 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0290"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0290_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0290 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0300 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0300"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0300_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0300 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0310 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0310"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0310 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0320 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0320"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0320 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0330 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0330"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0330 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0340 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0340"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0340 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0350 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0350"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0350_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0350 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0360 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0360"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0360_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0360 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0370 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0370 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0370"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0370 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0380 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0380 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0380"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0380 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0390 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0390 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0390"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0390_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0390 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0400 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0400 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0400"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0400_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0400 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0410 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0410 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0410"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0410_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0410 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0420 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0420 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0420"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0420_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0420 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0430 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0430 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0430"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0430_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0430 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0440 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0440 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0440"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0440_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0440 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0450 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0450 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0450"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0450 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0460 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0460 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0460"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0460_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0460 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0470 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0470 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0470"); + await Utils.sleep(2000); + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIAttributesKeyboardavoidmodeSetup0470_text')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0470 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0480 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0480 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0480"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0480 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0490 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0490 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0490"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0490 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0500 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0500 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0500"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0500 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0510 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0510 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0510"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0510 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0520 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0520 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0520"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_SETUP_0520 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeTransitionanimationTest/UIAttributesKeyboardavoidmodeTransitionanimation.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeTransitionanimationTest/UIAttributesKeyboardavoidmodeTransitionanimation.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e51720b49472b230702057ff84646f25f6183ec7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesKeyboardavoidmodeTransitionanimationTest/UIAttributesKeyboardavoidmodeTransitionanimation.test.ets @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIAttributesKeyboardavoidmodeTransitionanimation() { + + describe('UIAttributesKeyboardavoidmodeTransitionanimation', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0010 + * @tc.name KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0010 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0010"); + await Utils.sleep(1000); + let driver2: Driver = Driver.create(); + let btntransitionanimation = await driver2.findComponent(ON.id("btntransitionanimation_0010")); + await btntransitionanimation.click(); + await Utils.sleep(2000); + let inputtransitionanimation = await driver2.findComponent(ON.id("transitionanimation_0010")); + await inputtransitionanimation.click(); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0010 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0020 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0020"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btnResize = await driver.findComponent(ON.id("resize")); + await btnResize.click(); + await Utils.sleep(1000); + let textArea = await driver.findComponent(ON.id("TextArea")); + await textArea.click(); + await Utils.sleep(1000); + let btnMode = await driver.findComponent(ON.id("getMode")); + await btnMode.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0030 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0030"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btn1 = await driver.findComponent(ON.id("hengtransitionanimation_0030")); + await btn1.click(); + await Utils.sleep(1000); + let textArea = await driver.findComponent(ON.id("transitionanimation_0030")); + await textArea.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + await btn1.click(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_1 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_1 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btnunshow = await driver.findComponent(ON.id("unshow")); + await btnunshow.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_1 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_2 + */ + it('SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_2 start.`); + Settings.createWindow("testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let btnshow = await driver.findComponent(ON.id("show")); + await btnshow.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_ATTRIBUTES_KEYBOARDAVOIDMODE_TRANSITIONANIMATION_0040_2 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentBorderDashedDashgapDashwidthTest/UIComponentBorderDashedDashgapDashwidth.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentBorderDashedDashgapDashwidthTest/UIComponentBorderDashedDashgapDashwidth.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..239fce0f895be0b543155cfe485b6d2d9d0f32fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentBorderDashedDashgapDashwidthTest/UIComponentBorderDashedDashgapDashwidth.test.ets @@ -0,0 +1,493 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentBorderDashedDashgapDashwidth() { + + describe('UIComponentBorderDashedDashgapDashwidth', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0040 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0040 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0040") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0040 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0050 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0050 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0050") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0050 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0060 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0060 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0060") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0060 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0070 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0070 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0070") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0070 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0110 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0110 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0110") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0110 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0120 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0120 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0120") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0120 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0150 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0150 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0150") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0190 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0190 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0190") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0190 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0170 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0170 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0170") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0170 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0140 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0140 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0140") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0140 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0130 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0130 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0130") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0130 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0030 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0030 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0030") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0030 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_1 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_1 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_1 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_2 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_2 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0160')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0160_2 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_1 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_1 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_1 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_2 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_2 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0020_2')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_2 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_6 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_6 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0020_6')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_6 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_3 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_3 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0020_3')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_3 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_4 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_4 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0020_4')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_4 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_5 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_5 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0020_5')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_5 finish.`); + done() + }) + + + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_1 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_1 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_1 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0020_2 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_2 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0010_2')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_2 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_6 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_6 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0010_6')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_6 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_3 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_3 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0010_3')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_3 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_4 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_4 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0010_4')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_4 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_5 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_5 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010") + await Utils.sleep(2000) + // 多图 + let driver : Driver = Driver.create(); + await Utils.sleep(100) + let button:Component = await driver.findComponent(ON.id('UIComponentBorderDashedDashgapDashwidth0010_5')); + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0010_5 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0080 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0080 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0080") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0080 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0090 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0090 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0090") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0100 + */ + it('SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0100 start.`); + Settings.createWindow("testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0100") + await Utils.sleep(2000) + await windowSnap.snapShot(); + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_BORDER_DASHED_DASHGAP_DASHWIDTH_0100 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvas0ffscreencanvasTest/UIComponentCanvas0ffscreencanvas.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvas0ffscreencanvasTest/UIComponentCanvas0ffscreencanvas.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b30f82764143e42501864586d8acb6dbde1809d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvas0ffscreencanvasTest/UIComponentCanvas0ffscreencanvas.test.ets @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentCanvas0ffscreencanvas() { + + describe('UIComponentCanvas0ffscreencanvas', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0130 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0130") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0130 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0120 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0120 start.`); + Settings.createWindow("testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0120") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0120 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0110") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_0FFSCREENCANVAS_0110 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasOffecreencanvasGpuDrawTest/UIComponentCanvasOffecreencanvasGpuDraw.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasOffecreencanvasGpuDrawTest/UIComponentCanvasOffecreencanvasGpuDraw.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..66111384b3f76b422d26e9b2d4c8b04d53b5a568 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasOffecreencanvasGpuDrawTest/UIComponentCanvasOffecreencanvasGpuDraw.test.ets @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentCanvasOffecreencanvasGpuDraw() { + + describe('UIComponentCanvasOffecreencanvasGpuDraw', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_0690 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_0690 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw0690"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_0690 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1360 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1360 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1360") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1360 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2590 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2590 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2590") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2590 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2600 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2600") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2600 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2770', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2770 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2770") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2770 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2780 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2780") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2780 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2790 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2790") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_2790 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1620 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1620 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1620 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1620"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_OFFECREENCANVAS_GPU_DRAW_1620 finish.`); + done(); + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f2eba219e742a567ec84e5afdd3de2f7e873d3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets @@ -0,0 +1,526 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentCanvasReset() { + + describe('UIComponentCanvasReset', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0010 + * @tc.name CANVAS_RESET_0010 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0010 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0020 + * @tc.name CANVAS_RESET_0020 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0020 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0020"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0030 + * @tc.name CANVAS_RESET_0030 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0030 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0040 + * @tc.name CANVAS_RESET_0040 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0040 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0050 + * @tc.name CANVAS_RESET_0050 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0050 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0050"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0060 + * @tc.name CANVAS_RESET_0060 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0060 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0060"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0060 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0070 + * @tc.name CANVAS_RESET_0070 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0070 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0070"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0080 + * @tc.name CANVAS_RESET_0080 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0080 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0080"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0090 + * @tc.name CANVAS_RESET_0090 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0090 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0090"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0100 + * @tc.name CANVAS_RESET_0100 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0100 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0100"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0110 + * @tc.name CANVAS_RESET_0110 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0110"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0110 + * @tc.name CANVAS_RESET_0110 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0120 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0120"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0130 + * @tc.name CANVAS_RESET_0130 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0130"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0140 + * @tc.name CANVAS_RESET_0140 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0140 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0140"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0150 + * @tc.name CANVAS_RESET_0150 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0150 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0150"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0160 + * @tc.name CANVAS_RESET_0160 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0160 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0160"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0170 + * @tc.name CANVAS_RESET_0170 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0170 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0170"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0180 + * @tc.name CANVAS_RESET_0180 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0180 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0180"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0180 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0190 + * @tc.name CANVAS_RESET_0190 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0190 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0190"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0200 + * @tc.name CANVAS_RESET_0200 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0200 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0200"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0220 + * @tc.name CANVAS_RESET_0220 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0220 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0220"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0230 + * @tc.name CANVAS_RESET_0230 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0230 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0230"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0230 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0210 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0210"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0210 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0240 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0240"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0240 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0250 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0250"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0250 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0260 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0260"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0260 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0270 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0270"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0270 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0280 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0280"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0280 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0290 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0290"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0290 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0300 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0300"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0300 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0310 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0310"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0310 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0320 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0320"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0320 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0330 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0330"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0330 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0340 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0340"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0340 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0350"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0350 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0360"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0360 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0370 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0370"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0370 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0380 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0380"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0380 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGraphicCanvasThreadTest/UIComponentGraphicCanvasThread.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGraphicCanvasThreadTest/UIComponentGraphicCanvasThread.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ed0c54dece9f4ba3d0c8dbb798bb71be0845df3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGraphicCanvasThreadTest/UIComponentGraphicCanvasThread.test.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentGraphicCanvasThread() { + + describe('UIComponentGraphicCanvasThread', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRAPHIC_CANVAS_THREAD_0040 + * @tc.name SUB_ACE_UI_COMPONENT_GRAPHIC_CANVAS_THREAD_0040 + */ + it('SUB_ACE_UI_COMPONENT_GRAPHIC_CANVAS_THREAD_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRAPHIC_CANVAS_THREAD_0040 start.`); + Settings.createWindow("testability/pages/UIComponentGraphicCanvasThread/UIComponentGraphicCanvasThread0040"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRAPHIC_CANVAS_THREAD_0040 finish.`); + done(); + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolInterfaceTest/UIComponentLayoutGridrowgridcolInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolInterfaceTest/UIComponentLayoutGridrowgridcolInterface.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ebf3cbf91c4491d85d73c9f2816ba0ca920ea9f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolInterfaceTest/UIComponentLayoutGridrowgridcolInterface.test.ets @@ -0,0 +1,939 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentLayoutGridrowgridcolInterface() { + + describe('UIComponentLayoutGridrowgridcolInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0010 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0010 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0010"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0020 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0020 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0020"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0020 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0030 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0030 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0030"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0040 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0040 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0040"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0050 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0050 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0050"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0060 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0060 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0060"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0070 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0070 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0070"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0080 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0080 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0080"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0080 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0090 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0090 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0090"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0100 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0100 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0100"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0110 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0110 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0110"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0120 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0120 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0120 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0120"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0130 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0130 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0130 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0130"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0140 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0140 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0140"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0150 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0150 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0150 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0150"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0160 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0160 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0160 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0160"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0170 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0170 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0170 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0170"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0170 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0180 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0180 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0180"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0190 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0190 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0190"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0200 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0200 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0200"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0210 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0210 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0210"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0210 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0500 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0500"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0500 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0510 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0510"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0510 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0520 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0520"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0520 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0530 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0530"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0530 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0540 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0540"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0540 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0550 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0550"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0550 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0420 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0420 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0420"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0420 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0430 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0430 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0430"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0430 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0440 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0440 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0440"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0440 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0450 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0450 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0450"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0450 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0460 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0460 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0460"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0460 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0470 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0470 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0470"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0470 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0480 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0480 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0480"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0480 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0590 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0590 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0590"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0590 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0220 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0220 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0220 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0220"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0230 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0230 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0230"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0240 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0240 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0240"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0240 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0250 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0250 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0250 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0250"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0260 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0260 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0260"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0260 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0270 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0270 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0270"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0270 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0280 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0280 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0280 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0280"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0280 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0290 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0290 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0290 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0290"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0300 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0300 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0300 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0300"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0300 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0310 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0310 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0310 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0310"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0320 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0320 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0320 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0320"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0320 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0330 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0330 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0330 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0330"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0340 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0340 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0340 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0340"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0350 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0350 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0350"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0360 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0360 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0360 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0360"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0370 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0370 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0370 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0370"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0370 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0380 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0380 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0380 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0380"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0390 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0390 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0390 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0390"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0400 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0400 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0400 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0400"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0490 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0490 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0490 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0490"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0490 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0560 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0560 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0560 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0560"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0570 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0570"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0580 + * @tc.name GRIDROWGRIDCOL_INTERFACE_0580 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0580"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0570 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0600 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0600"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0600 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0610 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0610"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0610 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0620 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0620"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0620 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0630 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0630"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0630 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0640 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0640"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0640 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0650 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0650"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0650 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0660 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0660"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0660 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0670 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0670"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0670 finish.`); + done(); + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0680 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0680"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0680 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0410 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0410 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0410"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_INTERFACE_0410 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolLayoutTest/UIComponentLayoutGridrowgridcolLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolLayoutTest/UIComponentLayoutGridrowgridcolLayout.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..153a0a3aae9a87b5d6994c2f3dfa01fb945b7952 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutGridrowgridcolLayoutTest/UIComponentLayoutGridrowgridcolLayout.test.ets @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIComponentLayoutGridrowgridcolLayout() { + + describe('UIComponentLayoutGridrowgridcolLayout', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0010 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0010 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0010") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0010 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0020 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0020") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0020 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0030 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0030") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0030 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0040 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0040") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0040 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0050 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0050") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0050 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0060 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0060") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0060 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0070 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0070") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0070 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0080 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0080") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_GRIDROWGRIDCOL_LAYOUT_0080 finish.`); + done() + }) + + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UICustomDrawingSafeareaSceneTest/UICustomDrawingSafeareaScene.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UICustomDrawingSafeareaSceneTest/UICustomDrawingSafeareaScene.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d33e82f5caa7c3cc5de4178751bdf75c7285b89 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UICustomDrawingSafeareaSceneTest/UICustomDrawingSafeareaScene.test.ets @@ -0,0 +1,146 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UICustomDrawingSafeareaScene() { + + describe('UICustomDrawingSafeareaScene', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0600 + */ + it('SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0600 start.`); + Settings.createWindow("testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0600") + await Utils.sleep(2000) + let driver = Driver.create(); + let button = await driver.findComponent(ON.id("btn")); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0600 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0610 + */ + it('SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0610 start.`); + Settings.createWindow("testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0610") + await Utils.sleep(2000) + let driver = Driver.create(); + let button = await driver.findComponent(ON.id("btn")); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0610 finish.`); + done() + }) + + it('SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0620 start.`); + Settings.createWindow("testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0620") + await Utils.sleep(2000) + let driver = Driver.create(); + let button = await driver.findComponent(ON.id("btn")); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0620 finish.`); + done() + }) + it('SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0630 start.`); + Settings.createWindow("testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0630") + await Utils.sleep(2000) + let driver = Driver.create(); + let button = await driver.findComponent(ON.id("btn")); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0630 finish.`); + done() + }) + + it('SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0640 start.`); + Settings.createWindow("testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0640") + await Utils.sleep(2000) + let driver = Driver.create(); + let button = await driver.findComponent(ON.id("btn")); + await button.click(); + await Utils.sleep(3000); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_CUSTOM_DRAWING_SAFEAREA_SCENE_0640 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerBiasTest/UIRelativecontainerBias.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerBiasTest/UIRelativecontainerBias.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1e3d584e16afcd48603e7426ba61dacd7e3413c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerBiasTest/UIRelativecontainerBias.test.ets @@ -0,0 +1,443 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIRelativecontainerBias() { + + describe('UIRelativecontainerBias', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + /** + * @tc.number SUB_ACE_UI_RELATIVECONTAINER_BIAS_0310 + * @tc.name RELATIVECONTAINER_BIAS_0310 + */ + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0310 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0310"); + await Utils.sleep(1000); + let driver2: Driver = Driver.create(); + let btnrelativecontainer = await driver2.findComponent(ON.id("btnrelativecontainer_bias_310")); + await btnrelativecontainer.click(); + await Utils.sleep(500); + await btnrelativecontainer.click(); + await Utils.sleep(500); + await btnrelativecontainer.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_RELATIVECONTAINER_BIAS_0320 + * @tc.name RELATIVECONTAINER_BIAS_0320 + */ + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0320 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0320"); + await Utils.sleep(1000); + let driver2: Driver = Driver.create(); + let btnrelativecontainer = await driver2.findComponent(ON.id("btnrelativecontainer_bias_320")); + await btnrelativecontainer.click(); + await Utils.sleep(500); + await btnrelativecontainer.click(); + await Utils.sleep(500); + await btnrelativecontainer.click(); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0320 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_RELATIVECONTAINER_BIAS_0380 + * @tc.name RELATIVECONTAINER_BIAS_0380 + */ + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0380 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0380"); + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(4000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0380 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0180 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0180") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0180 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0190 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0190") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0190 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0200 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0200") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0200 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0210 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0210") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0210_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0210 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0220 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0220") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonAdd = await driver.findComponent(ON.id("UIRelativecontainerBias0220_1")); + await buttonAdd.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0220 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0230 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0230") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0230_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0230 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0240 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0240") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0240 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0260 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0260") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0260 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0340 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0340") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0340 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0390 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0390") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0390 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0350 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0350") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0350_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0350 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0270 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0270") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0270_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0270 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0250 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0250") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0250 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0330 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0330") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0330 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0400 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0400") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0400 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0170 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0170") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0170_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0170 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0140 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelete = await driver.findComponent(ON.id("UIRelativecontainerBias0140_1")); + await buttonDelete.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0140 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0070 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0070") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0070 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0090 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0090") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0090 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0080 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0080") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0080 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0030 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0030") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0030 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0040 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0040") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0040 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0050 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0050") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0050 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0370 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0370") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0370 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0280 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0280") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0280 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0290 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0290") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0290 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0300 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0300") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0300 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0010 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0010") + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0010 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0020 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0020") + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0020 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0060 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0060") + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0060 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_BIAS_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0360 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0360") + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_BIAS_0360 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerCollaborationTest/UIRelativecontainerCollaboration.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerCollaborationTest/UIRelativecontainerCollaboration.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..87e23e8f0c0dd55ee67d56169d83137ef3a982be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerCollaborationTest/UIRelativecontainerCollaboration.test.ets @@ -0,0 +1,758 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, Component, UiWindow, ResizeDirection, UiDriver, MouseButton } from '@ohos.UiTest'; +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIRelativecontainerCollaboration() { + + describe('UIRelativecontainerCollaboration', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0010 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0010") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0010 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0020 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0020") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0020 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0030 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0030") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0030 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0040 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0040") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0040 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0050 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0050") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0050 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0060 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0060") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0060 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0080 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0080") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0080 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0090 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0090") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0090 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0100 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0100") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0100 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0110 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0110") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0110 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0120 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0120") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0120 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0130 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0130") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0130 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0140 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0140") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0140 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0630 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0630") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0630 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0380 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0380") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0380 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0390 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0390") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0390 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0360 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0360") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0360 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0490 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0490") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0490 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0660 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let paddingBtn = await driver.findComponent(ON.id("padding")); + await paddingBtn.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0660 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0070 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0070") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0070 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0150 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0150") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0150 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0160 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0160") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0160 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0170 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0170") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0170 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0180 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0180") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0180 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0190 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0190") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0190 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0280 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0280") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0280 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0290 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0290") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0290 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0300 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0300") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0300 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0310 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0310") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0310 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0330 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0330") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0330 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0340 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0340") + await Utils.sleep(1000); + let driver : Driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0340_1')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0340 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0350 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0350") + await Utils.sleep(2000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0350 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0640 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0640") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0640 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0650 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0650") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0650 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0200 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0200") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0200 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0210 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0210") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0210 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0220 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0220") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0220 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0230 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0230") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0230 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0240 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0240") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0240 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0250 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0250") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0250 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0260 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0260") + await Utils.sleep(1000); + let driver : Driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0260_1')); + let button2 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0260_2')); + let button3 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0260_3')); + await button.click(); + await Utils.sleep(1000); + await button2.click(); + await Utils.sleep(1000); + await button3.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0260 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0270 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0270") + await Utils.sleep(1000); + let driver : Driver = Driver.create(); + let button2 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_2')); + let button3 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_3')); + let button4 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_4')); + let button5 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_5')); + let button6 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_6')); + let button7 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0270_7')); + await button2.click(); + await Utils.sleep(1000); + await button3.click(); + await Utils.sleep(1000); + await button4.click(); + await Utils.sleep(1000); + await button5.click(); + await Utils.sleep(1000); + await button6.click(); + await Utils.sleep(1000); + await button7.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0270 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0510 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0510") + await Utils.sleep(1000); + let driver : Driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0510_1')); + let button2 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0510_2')); + await button.click(); + await Utils.sleep(1000); + await button2.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0510 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0520 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0520") + await Utils.sleep(1000); + let driver : Driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0520_1')); + let button2 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0520_2')); + await button.click(); + await Utils.sleep(1000); + await button2.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0520 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0530 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0530") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0530 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0540 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0540") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0540 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0550 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0550") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0550 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0560 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0560") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0560 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0580 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0580") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0580 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0590 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0590") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0590 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0620 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0620") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0620 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0610 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0610") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0610 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0600 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0600") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0600 finish.`); + done(); + }) + + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0420 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0420") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0420 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0430 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0430") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0430 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0410 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0410") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0410 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0400 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0400") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0400 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0370 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0370") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0370 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0570 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0570") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0570 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0500 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0500") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0500 finish.`); + done(); + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0670 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + + let paddingBtn = await driver.findComponent(ON.id("boardwidth")); + await paddingBtn.click(); + await Utils.sleep(2000); + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0670 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0320 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0320") + await Utils.sleep(1000); + let driver = Driver.create(); + let button = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0320_1')); + let button2 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0320_2')); + let button3 = await driver.findComponent(ON.id('UIRelativecontainerCollaboration0320_3')); + await button3.click(); + await Utils.sleep(500); + await button2.click(); + await Utils.sleep(500); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0320 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0440 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0440") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0440 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0450 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0450") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0450 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0460 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0460") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0460 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0470 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0470") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0470 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0480 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0480") + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_COLLABORATION_0480 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerJingxiangTest/UIRelativecontainerJingxiang.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerJingxiangTest/UIRelativecontainerJingxiang.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..219093482266c144d5e2cb01d83a45f22fc634c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIRelativecontainerJingxiangTest/UIRelativecontainerJingxiang.test.ets @@ -0,0 +1,447 @@ +/* + * Copyright (C) 2024 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Driver, ON, MouseButton } from '@ohos.UiTest' +import uiAppearance from '@ohos.uiAppearance' +import i18n from '@ohos.i18n' + +export default function UIRelativecontainerJingxiang() { + + describe('UIRelativecontainerJingxiang', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0010 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0010") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0010_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0010_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0010 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0020 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0020") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0020_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0020_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0020 finish.`); + done() + }) + + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0030 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0030") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0030_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0030_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0030 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0040 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0040") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0040_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0040_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0040 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0050 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0050") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0050_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0050_rtl")); + let buttonAdd = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0050_add")); + await buttonAdd.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0050 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0060 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0060") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0060_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0060_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0060 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0070 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0070") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0070_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0070_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0070 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0080 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0080") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0080_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0080_rtl")); + let buttonBorder = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0080_border")); + await buttonBorder.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0080 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0090 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0090") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0090_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0090_rtl")); + let buttonPacked = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0090_packed")); + let buttonIns= await driver.findComponent(ON.id("UIRelativecontainerJingxiang0090_ins")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonIns.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await buttonPacked.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0090 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0100 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0100") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonPa = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0100_packed")); + let buttonPaIn = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0100_ins")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0100_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0100_rtl")); + await buttonRtl.click(); + await buttonLtr.click(); + await buttonPaIn.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await buttonLtr.click(); + await buttonPa.click(); + await buttonRtl.click(); + await buttonLtr.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0100 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0110 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0110") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonIns = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0110_ins")); + let buttonPacked = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0110_packed")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0110_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0110_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonIns.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonPacked.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0110 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0120 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0120") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0120_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0120_rtl")); + let buttonFlex = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0120_flexAlign")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonFlex.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0120 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0130 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0130") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0130_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0130_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0130 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0140 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0140") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0140_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0140_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0140 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0150 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0150") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonChangeDir = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0150_changeDir")); + let buttonChangeID = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0150_changeld")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0150_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0150_rtl")); + await buttonRtl.click(); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonChangeDir.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await buttonLtr.click(); + await Utils.sleep(1000); + await buttonChangeID.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0150 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0160 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0160") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonEnd = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0160_end")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0160_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0160_rtl")); + await buttonEnd.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0160 finish.`); + done() + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0170 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0170") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonDelPos = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0170_delPos")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0170_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0170_rtl")); + await buttonDelPos.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0170 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0180 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0180") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonStart = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0180_start")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0180_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0180_rtl")); + await buttonStart.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0180 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0190 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0190") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0190_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0190_rtl")); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0190 finish.`); + done(); + }) + it('SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0200 start.`); + Settings.createWindow("testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0200") + await Utils.sleep(1000); + let driver = Driver.create(); + let buttonPadding = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0200_padding")); + let buttonLtr = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0200_ltr")); + let buttonRtl = await driver.findComponent(ON.id("UIRelativecontainerJingxiang0200_rtl")); + await buttonPadding.click(); + await Utils.sleep(1000); + await buttonRtl.click(); + await Utils.sleep(1000); + await buttonLtr.click(); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_RELATIVECONTAINER_JINGXIANG_0200 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Logger.ts b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Logger.ts new file mode 100644 index 0000000000000000000000000000000000000000..d8e65ace14fe8912c61a0b31c60ba5c767f116f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Logger.ts @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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 hilog from '@ohos.hilog'; + +class Logger { + private domain: number; + private prefix: string; + private format: string = "%{public}s, %{public}s"; + + constructor(prefix: string) { + this.prefix = prefix; + this.domain = 0xFF00; + } + + debug(...args: any[]) { + hilog.debug(this.domain, this.prefix, this.format, args); + } + + info(...args: any[]) { + hilog.info(this.domain, this.prefix, this.format, args); + } + + warn(...args: any[]) { + hilog.warn(this.domain, this.prefix, this.format, args); + } + + error(...args: any[]) { + hilog.error(this.domain, this.prefix, this.format, args); + } +} + +export default new Logger('[Screenshot]'); \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets new file mode 100644 index 0000000000000000000000000000000000000000..692d6f937f14b5b4c1e4f3cdffbe2fb47a26257f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets @@ -0,0 +1,336 @@ +/* + * Copyright (C) 2024 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 screen from '@ohos.screen'; +import window from '@ohos.window'; +import Logger from './Logger'; +import { GlobalThis } from './globalThis' +import { BusinessError } from '@ohos.base' +import Window from '@ohos.window' +import common from '@ohos.app.ability.common'; +import { i18n } from '@kit.LocalizationKit'; +import { router, uiAppearance } from '@kit.ArkUI'; + +const TAG: string = '[TEST]'; + +async function sleep(time: number): Promise { + const result: string = await new Promise((resolve: Function) => { + setTimeout(() => { + resolve('sleep ok') + }, time) + }); + console.info(result); +} + +class Settings { + isPhone: boolean = false; + windowClass: window.Window | undefined = undefined + windowCreateType: string = "changeWindow"; + private static DEFAULT_WIDTH: number = 720; + private static DEFAULT_HEIGHT: number = 1412; + private static DEFAULT_DPI: number = 240; + private static DEFAULT_OFFSET_X: number = 100; + private static DEFAULT_OFFSET_Y: number = 132; + private portrait: boolean = true + + changeWindowPosition(windowClass: window.Window, X: number | undefined, Y: number | undefined) { + //为悬浮窗设置位置 + windowClass.moveWindowTo(X, Y, (err) => { + if (err.code) { + Logger.error(TAG, `Failed to move the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, 'Succeed moveWindowTo.'); + }) + } + + changeWindowSize(windowClass: window.Window, width: number | undefined, height: number | undefined) { + //为悬浮窗设置大小 + windowClass.resize(width, height, (err) => { + if (err.code) { + Logger.error(TAG, `Failed to change the window size. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, 'Succeed changeWindowSize'); + }) + } + + loadContent(windowClass: window.Window, pageURI: string) { + //为悬浮窗加载对应的目标页面 + windowClass.setUIContent(pageURI, (err) => { + if (err.code) { + Logger.error(TAG, `Failed to load the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in loading the content.`); + + //显示悬浮窗 + windowClass.showWindow((err) => { + if (err.code) { + Logger.error(TAG, `Failed to show the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in showing the window.`); + }) + }) + } + + loadContentChange(windowClass: window.Window, pageURI: string) { + //为悬浮窗加载对应的目标页面 + windowClass.setUIContent(pageURI, (err) => { + if (err.code) { + Logger.error(TAG, `Failed to load the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in loading the content.`); + + }) + } + + changeDpi(dpi: number) { + let screenClass: screen.Screen; + screen.getAllScreens((err: BusinessError, data: Array) => { + if (err.code) { + Logger.error(TAG, `Failed to get all screens. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info(TAG, `Succeeded in getting all screens. Data:${JSON.stringify(data)}`); + + screenClass = data[0]; + //设置设备dpi + screenClass.setDensityDpi(dpi, (err: BusinessError) => { + if (err.code) { + Logger.error(TAG, `Failed to set the pixel density. Code : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in setting the pixel density`); + }) + }) + } + + setWindowSystemBarEnable(windowClass: window.Window, names: Array<'status' | 'navigation'>) { + windowClass.setWindowSystemBarEnable(names, (err: BusinessError) => { + const errCode: number = err.code; + if (errCode) { + Logger.error(TAG, 'Failed to set the system bar to be invisible. Cause:' + JSON.stringify(err)) + return; + } + Logger.info(TAG, `Succeeded in set the system bar to be invisible`); + }); + } + + destroyWindow(windowClass: window.Window) { + if (!this.isPhone) { + //销毁窗口 + windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error(TAG, `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in destroy the window.`); + }) + } + } + + async initEnv() { + let context = getContext() + let promise = await Window.getLastWindow(context); + let orientation = Window.Orientation.PORTRAIT; + await promise.setPreferredOrientation(orientation); + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT); + try { + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + } catch (error) { + let err: BusinessError = error as BusinessError; + console.error(`call System.setAppPreferredLanguage failed, error code: ${err.code}, message: ${err.message}.`); + } + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + } + + /* + * 窗口页面更新 + * Setting.createWindow(pageURI: String, {X,Y,width,height,dpi}?:{X?:number,Y?:number,width?:number,height?:number,dpi?:number}):void + * 必填: + * pageURI:页面路由 + * 选填: + * X,Y:窗口相对于左上角的位置,默认X=100,Y=100 单位为px + * width,height:窗口宽高,默认width=600,height=1250 可配置范围:[0,2560],单位为vp + * dpi:像素密度,默认dpi=330,可配置范围:80-640 + * */ + + createWindow(pageURI: string, X?: number | undefined, Y?: number | undefined, width?: number | undefined, + height?: number | undefined, dpi?: number | undefined) { + if (!this.isPhone) { + this.windowCreateType = "createWindow" + if (X == undefined) { + X = Settings.DEFAULT_OFFSET_X; + } + if (Y == undefined) { + Y = Settings.DEFAULT_OFFSET_Y; + } + if (width == undefined) { + width = Settings.DEFAULT_WIDTH; + } + if (height == undefined) { + height = Settings.DEFAULT_HEIGHT - Settings.DEFAULT_OFFSET_Y; + } + if (dpi == undefined) { + dpi = Settings.DEFAULT_DPI; + } + Logger.info(TAG, `params,pageURI=${pageURI},X=${X},Y=${Y},width=${width},height=${height},dpi=${dpi}`) + this.changeDpi(dpi) + sleep(1000) + let config: window.Configuration = { + name: "floatWindow", + windowType: window.WindowType.TYPE_FLOAT, + ctx: GlobalThis.getInstance().getContext('context') + }; + + window.createWindow(config, (err, data) => { + if (err.code) { + Logger.error(TAG, `Failed to create the floatWindow. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info(TAG, `Succeeded in creating the floatWindow. Data : ${JSON.stringify(err)}`); + this.windowClass = data; + this.changeWindowPosition(this.windowClass, X, Y); + this.changeWindowSize(this.windowClass, width, height); + this.loadContent(this.windowClass, pageURI) + }) + } else { + try { + router.pushUrl({ + url: pageURI + }) + Logger.info(TAG, `params,pageURI=${pageURI}`) + } catch (e) { + Logger.error(TAG, `params,pageURI=${pageURI} errpr ${e}`) + } + } + } + + async changeWindow(pageURI: string, width?: number | undefined, height?: number | undefined, + dpi?: number | undefined) { + if (!this.isPhone) { + this.windowCreateType = "changeWindow" + if (width == undefined) { + width = Settings.DEFAULT_WIDTH; + } + if (height == undefined) { + height = Settings.DEFAULT_HEIGHT - Settings.DEFAULT_OFFSET_Y; + } + if (dpi == undefined) { + dpi = Settings.DEFAULT_DPI; + } + Logger.info(TAG, `params,pageURI=${pageURI},width=${width},height=${height},dpi=${dpi}`) + this.changeDpi(dpi) + await sleep(500) + window.getLastWindow(GlobalThis.getInstance().getContext('context'), async (err: BusinessError, data) => { + const errCode: number = err.code; + if (errCode) { + Logger.error(TAG, 'Failed to obtain the top Window. Cause : ' + JSON.stringify(err)); + return; + } + Logger.info(TAG, 'succeed to obtain the top Window. Cause : ' + JSON.stringify(err)); + this.windowClass = data; + await sleep(200) + this.loadContent(this.windowClass, pageURI) + await sleep(200) + this.changeWindowSize(this.windowClass, width, height); + await sleep(200) + this.setWindowSystemBarEnable(this.windowClass, []); + }); + } else { + await router.pushUrl({ url: pageURI }) + } + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch Locales,appPreferredLanguage2=${appPreferredLanguage2}`); + } + + /** + * 切换应用内部语言 + */ + switchLocales() { + let currentLanguages = i18n.System.getSystemLanguages(); + let systemLocale: string = i18n.System.getSystemLocale(); // 获取系统当前Locale + let systemRegion: string = i18n.System.getSystemRegion(); // 获取系统当前地区设置 + let appPreferredLanguage: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch Locales,current currentLanguages=${currentLanguages} + ,systemLocale=${systemLocale},systemRegion=${systemRegion},appPreferredLanguage=${appPreferredLanguage}`); + try { + i18n.System.setAppPreferredLanguage('ug-CN'); // 设置系统当前Locale为 "zh-CN" + } catch (error) { + let err: BusinessError = error as BusinessError; + console.error(`call System.setAppPreferredLanguage failed, error code: ${err.code}, message: ${err.message}.`); + } + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch Locales,appPreferredLanguage2=${appPreferredLanguage2}`); + } + + changeOrientation(object?: Object) { + // 获取上下文,使用common模块 + let context = getContext() + let promise = Window.getLastWindow(context); + promise.then((data) => { + let windowClass = data; + if (this.portrait) { + //切换成横屏 + let orientation = Window.Orientation.LANDSCAPE; + windowClass.setPreferredOrientation(orientation, (err) => { + + }); + // windowSnap.snapShot() + this.portrait = !this.portrait + console.info('LANDSCAPE Succeeded in obtaining the top window. Data: ' + JSON.stringify(data)); + } else { + //切换成竖屏 + let orientation = Window.Orientation.PORTRAIT; + windowClass.setPreferredOrientation(orientation, (err) => { + }); + this.portrait = !this.portrait + console.info('PORTRAIT Succeeded in obtaining the top window. Data: ' + JSON.stringify(data)); + } + }).catch((err: BusinessError) => { + console.error('Failed to obtain the top window. Cause: ' + JSON.stringify(err)); + }); + } + + setOrientation() { + try { + window.getLastWindow(getContext(this), (err, data) => { // 获取window实例 + if (err.code) { + return; + } + let windowClass = data; + + let orientation = window.Orientation.LANDSCAPE; // 设置窗口方向为传感器自动旋转模式。 + try { + windowClass.setPreferredOrientation(orientation, (err) => { + if (err.code) { + return; + } + }); + } catch (exception) { + } + ; + }); + } catch (exception) { + } + ; + } +} + +export default new Settings() \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f06aa4d872061e0682441fd8f47b33730bc78c1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Utils.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 {Driver , ON} from '@ohos.UiTest' + +export default class Utils { + + static async sleep(time : number) :Promise { + const result:string = await new Promise((resolve:Function)=>{ + setTimeout(()=> { + resolve('sleep ok') + },time) + }); + console.info(result); + } + static async waitAsync (ms:number):Promise{ + return new Promise((resolve)=>{ + setTimeout(resolve,ms) + }) + + } + + static async clickComponentByKey (componentKey :string){ + let driver = Driver.create(); + let component = await driver.findComponent(ON.id(componentKey)) + await component.click(); + + } + + +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/globalThis.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/globalThis.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fa18fbd244d65f4c78213b89d9d01e29e01eae6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/globalThis.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 common from '@ohos.app.ability.common' + +// 构造单例对象 + +export class GlobalThis { + + private constructor() { + } + + private static instance:GlobalThis; + + private _uiContexts = new Map (); + + public static getInstance():GlobalThis { + + if (!GlobalThis.instance) { + GlobalThis.instance = new GlobalThis(); + + } + + return GlobalThis.instance + + } + getContext(key:string):common.UIAbilityContext | undefined { + + return this._uiContexts.get(key); + } + + setContext(key:string, value:common.UIAbilityContext) :void { + this._uiContexts.set(key,value); + } + + // 其他需要传递的类依次扩展 +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/snapShot.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/snapShot.ets new file mode 100644 index 0000000000000000000000000000000000000000..773f21352336973e8a11bce347632a45bd62dd62 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/snapShot.ets @@ -0,0 +1,268 @@ +/* + * Copyright (C) 2024 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 window from '@ohos.window'; +import Logger from './Logger'; +import image from '@ohos.multimedia.image'; +import fs from '@ohos.file.fs'; +import common from '@ohos.app.ability.common' +import { GlobalThis } from './globalThis' +import screenshot from '@ohos.screenshot' +import { BusinessError } from '@ohos.base' +import Settings from './Settings'; +import { Driver } from '@kit.TestKit'; +import { display } from '@kit.ArkUI'; + +const TAG: string = '[TEST]'; + + +class windowSnap { + filePath(suffix: string, pageName ?: string) { + let context: common.UIAbilityContext | undefined = GlobalThis.getInstance().getContext('context') + Logger.info(TAG, 'deleteFile start'); + let pathDir = context ? context.filesDir : "/" + Logger.info(TAG, `deleteFile pathDir = ${pathDir}`) + // let name = pageName ? pageName : "test" + let name = "test" + if (suffix == null) { + suffix = 'webp' + } + let displayName = `IMG_${name}.${suffix}` + let filePath: string = pathDir + "/" + displayName; + Logger.info(TAG, 'createFile filePath = ${filePath}') + return filePath; + + } + + async deleteFile(filePath: string) { + let exists = await fs.access(filePath) + Logger.info(TAG, `oldFile exists = ${exists}`) + if (exists) { + fs.unlinkSync(filePath) + Logger.info(TAG, `remove file succeed`) + } + } + + createFile(filePath: string) { + return fs.openSync(filePath, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE) + } + + async save(filePath: string, data: image.PixelMap) { + let packOpts: image.PackingOption = { + format: "image/webp", quality: 100 + } + let imagePackerApi = image.createImagePacker() + let arrayBuffer = await imagePackerApi.packing(data, packOpts) + let file: fs.File | null = null; + while (file == null) { + file = this.createFile(filePath) + } + let exists = await fs.access(file.path) + Logger.info(TAG, `createFile exists = ${exists}`) + let fd = file.fd + Logger.info(TAG, `createFile fd = ${fd}`) + imagePackerApi.release() + try { + await fs.write(fd, arrayBuffer) + } catch (err) { + Logger.error(TAG, `write failed code is ${err.code},message is ${err.message}`) + } + fs.closeSync(file) + Logger.info(TAG, `write picture done`) + } + + async saveLog(content: string, name: string) { + let context: common.UIAbilityContext | undefined = GlobalThis.getInstance().getContext('context') + Logger.info(TAG, 'deleteFile start'); + let pathDir = context ? context.filesDir : "/" + Logger.info(TAG, `deleteFile pathDir = ${pathDir}`) + let displayName = `${name}.txt` + let filePath: string = pathDir + "/" + displayName; + let exists = await fs.access(filePath) + Logger.info(TAG, `oldFile exists = ${exists}`) + if (exists) { + fs.unlinkSync(filePath) + Logger.info(TAG, `remove file succeed`) + } + let file: fs.File | null = null; + while (file == null) { + file = this.createFile(filePath) + } + Logger.info(TAG, `createFile exists = ${exists}`) + let fd = file.fd + Logger.info(TAG, `createFile fd = ${fd}`) + try { + await fs.write(fd, content) + } catch (err) { + Logger.error(TAG, `write failed code is ${err.code},message is ${err.message}`) + } + fs.closeSync(file) + Logger.info(TAG, `write picture done`) + } + + /* + * 获取窗口结合&文件保存 + * 入参必填 ability的context + + * snapShot + * save:设备端保存路径:/data/app/el2/100/base/{bundle_name}/haps/entry_test/files/IMG_test.webp + * 查看命令:hdc_st shell ,cd + **/ + async snapShot(pageName?: string) { + Logger.info(TAG, 'start snapshot') + if (Settings.isPhone) { + try { + let filePath = "/data/storage/el2/base/haps/entry_test/files/IMG_test.png" + let webpFilePath = "/data/storage/el2/base/haps/entry_test/files/IMG_test.webp" + await this.deleteFile(filePath); + await this.deleteFile(webpFilePath); + let driver = Driver.create(); + let orientation = display.getDefaultDisplaySync().orientation; + //竖屏 + let captureRes: boolean; + if (orientation == window.Orientation.PORTRAIT || orientation == window.Orientation.UNSPECIFIED) { + captureRes = await driver.screenCapture(filePath, { + left: 0, + top: 100, + right: 1260, + bottom: 2720 + }) + + } else { + //横屏 + captureRes = await driver.screenCapture(filePath, { + left: 0, + top: 0, + right: 2720, + bottom: 1260 + }) + } + if (captureRes) { + Logger.info(TAG, 'Succeed screenCapture.') + } else { + Logger.info(TAG, 'failed screenCapture.') + } + await fs.copyFile(filePath, webpFilePath); + } catch (exception) { + Logger.error(TAG, 'failed to screenCapture .Cause : ' + JSON.stringify(exception)) + } + } else { + if (Settings.windowClass == undefined) { + Logger.info(TAG, 'getWindowClass error') + return; + } + Logger.info(TAG, 'find window success') + let filePath = this.filePath('webp', pageName) + await this.deleteFile(filePath); + Settings.windowClass.snapshot((err, data: image.PixelMap) => { + if (err.code) { + Logger.info('failed to snap window .cause : ' + JSON.stringify(err)) + return; + } + Logger.info(TAG, 'Succeed in saving screenshot. Pixel bytes number: ' + data.getPixelBytesNumber()) + this.save(filePath, data) + data.release(); + }); + } + } + + /* + * 获取窗口结合&文件保存 + * 入参必填 ability的context + * screenShot + * save:设备端保存路径:/data/app/el2/100/base/{bundle_name}/haps/entry_test/files/IMG_test.webp + * 查看命令:hdc_st shell ,cd + **/ + + async screenShot(pageName?: string) { + Logger.info(TAG, 'start screen shot') + if (Settings.isPhone) { + let filePath = "/data/storage/el2/base/haps/entry_test/files/IMG_test.png" + let webpFilePath = "/data/storage/el2/base/haps/entry_test/files/IMG_test.webp" + await this.deleteFile(filePath); + await this.deleteFile(webpFilePath); + let driver = Driver.create(); + try { + let orientation = display.getDefaultDisplaySync().orientation; + //竖屏 + let captureRes: boolean; + if (orientation == window.Orientation.PORTRAIT || orientation == window.Orientation.UNSPECIFIED) { + captureRes = await driver.screenCapture(filePath, { + left: 0, + top: 100, + right: 1260, + bottom: 2720 + }) + + } else { + //横屏 + captureRes = await driver.screenCapture(filePath, { + left: 0, + top: 0, + right: 2720, + bottom: 1260 + }) + } + if (captureRes) { + Logger.info(TAG, 'Succeed screenCapture.') + } else { + Logger.info(TAG, 'failed screenCapture.') + } + await fs.copyFile(filePath, webpFilePath); + } catch (exception) { + Logger.error(TAG, 'failed to screenCapture .Cause : ' + JSON.stringify(exception)) + } + } else { + if (Settings.windowClass == undefined) { + Logger.info(TAG, 'getWindowClass error') + return; + } + Logger.info(TAG, 'find window success') + let filePath = this.filePath('webp', pageName) + await this.deleteFile(filePath) + try { + let properties = Settings.windowClass.getWindowProperties(); + Logger.info(TAG, 'properties.windowRect = ' + JSON.stringify(properties)) + + let screenshotOptions: screenshot.ScreenshotOptions = { + "screenRect": properties.windowRect, + "imageSize": { + "width": properties.windowRect.width, + "height": properties.windowRect.height + } + }; + Logger.info(TAG, 'screenshotOptions: ' + JSON.stringify(screenshotOptions)); + try { + screenshot.save(screenshotOptions, (err: BusinessError, pixelMap: image.PixelMap) => { + if (err) { + Logger.info('failed to save screenshot .Code : ' + JSON.stringify(err)) + return; + } + Logger.info(TAG, 'Succeed in saving screenshot. Pixel bytes number: ' + pixelMap.getPixelBytesNumber()) + this.save(filePath, pixelMap) //pixelMap 保存生成文件 + pixelMap.release(); + }); + } catch (exception) { + Logger.error(TAG, 'failed to : save screenshot. code: ' + JSON.stringify(exception)); + } + + } catch (exception) { + Logger.error(TAG, 'failed to obtain the window properties .Cause : ' + JSON.stringify(exception)) + } + } + } +} + +export default new windowSnap() \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..956959276850fafb640ee420bd6cad3d971d7f05 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundleManager from '@ohos.bundle.bundleManager'; +import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; +import UIAbility from '@ohos.app.ability.UIAbility'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; +import hilog from '@ohos.hilog'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../test/List.test'; +import window from '@ohos.window'; +import Logger from '../test/model/Logger' +import { GlobalThis } from '../test/model/globalThis' +import Want from '@ohos.app.ability.Want' +import AbilityConstant from '@ohos.app.ability.AbilityConstant'; + + +const TAG: string = '[TEST]' + +async function sleep(time: number): Promise { + const result: string = await new Promise((resolve: Function) => { + setTimeout(() => { + resolve('sleep ok') + }, time) + }); + console.info(result); +} + +export default class TestAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onCreate'); + hilog.info(0x0000, 'testTag', '%{public}s', 'want param:' + JSON.stringify(want) ?? ''); + hilog.info(0x0000, 'testTag', '%{public}s', 'launchParam:' + JSON.stringify(launchParam) ?? ''); + let abilityDelegator: AbilityDelegatorRegistry.AbilityDelegator + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + let abilityDelegatorArguments: AbilityDelegatorRegistry.AbilityDelegatorArgs + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + hilog.info(0x0000, 'testTag', '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + onDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage) { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageCreate'); + GlobalThis.getInstance().setContext("context", this.context) + + // + let atManager = abilityAccessCtrl.createAtManager(); + let appFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION; + let permissionFlags = 0; + bundleManager.getBundleInfoForSelf(appFlags, (err, data) => { + if (err) { + Logger.error(TAG, 'getAllApplicationInfo failed: %{public}s', err.message); + console.error("") + } + let tokenID = + data.appInfo.accessTokenId; //系统应用可以通过bundleManager.getApplicationInfo获取,普通应用可以通过bundleManager.getBundleInfoForSelf获取 + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.READ_MEDIA', permissionFlags, (err, data) => { + if (err) { + Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`) + } + }) + atManager.grantUserGrantedPermission(tokenID, 'ohos.permission.WRITE_MEDIA', permissionFlags, (err, data) => { + if (err) { + Logger.info(TAG, `grantUserGrantedPermission fail, err->${JSON.stringify(err)}`) + } + }) + }) + + } + + onWindowStageDestroy() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onWindowStageDestroy'); + } + + onForeground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onForeground'); + } + + onBackground() { + hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility onBackground'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/Index.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e4b0390777d039b0993caeeff4c0deab3384c57 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/Index.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 message: string = 'Hello World' + + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..b08edce174e75fd2c5f9aa1792f455347bbcdf54 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0010.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0010 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom}, + top: { anchor: "bt0050", align: VerticalAlign.Bottom }, + right: { anchor: "bt0050", align: HorizontalAlign.Center }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(250) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..babe351506c53557913c8dcc39f61609f45be09f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0020.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0020 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom}, + top: { anchor: "bt1", align: VerticalAlign.Bottom }, + right: { anchor: "bt1", align: HorizontalAlign.Start }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(250) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..324904b95c806c58bfc000ef2e9cffa933e6eb68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0030.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0030 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom}, + top: { anchor: "bt1", align: VerticalAlign.Bottom }, + right: { anchor: "bt1", align: HorizontalAlign.End }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(250) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..097487d0489da8ca2b35d427802f8256082450ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0040.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0040 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .id("bt0050") + .borderWidth(5) + .borderColor(Color.Black) + + Text("创建一个RelativeContainer,大小为200 ·200,在RelativeContainer里放置一个Button和一个Text组件。Text组件宽度500") + .fontSize(20) + .padding({ top: 30 }) + .height(30) + .width(500) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..37ff0254b24b9ed31f9d9d136f0dbd034271c477 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0050.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0050 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20).padding(20) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom}, + top: { anchor: "bt0050", align: VerticalAlign.Bottom }, + right: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).id("tx2").borderWidth(2).borderColor(Color.Green) + .height(30).width(50) + }.width(200).height(200) + + }.margin({left:100,top:20}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad254d0ffcc50bf62182083fd201fde86292b4dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0060.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0060 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20).padding(20) + .alignRules({ + top: { anchor: "bt0050", align: VerticalAlign.Center }, + middle: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).id("tx2").borderWidth(2).borderColor(Color.Green) + .height(30).width(50) + }.width(200).height(200) + }.margin({left:100,top:20}) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e20ea885e95a48fd4fc68bed09683cf8aecc77c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0070.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0070 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20).padding(20) + .alignRules({ + top: { anchor: "bt0050", align: VerticalAlign.Top }, + middle: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).id("tx2").borderWidth(2).borderColor(Color.Green) + .height(30).width(50) + }.width(200).height(200) + }.margin({left:100,top:20}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..0796cfeec9def7aa7c9572f75dda8c7f0087dd6b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0080.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0080 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20) + .alignRules({ + top: { anchor: "bt0050", align: VerticalAlign.Top }, + middle: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).borderWidth(2).borderColor(Color.Green) + }.width(200).height(200) + }.margin({left:100,top:20}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..dadbd617529a0bf12e997e500fdc864ccbc93913 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0090.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0090 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20) + .alignRules({ + top: { anchor: "bt0050", align: VerticalAlign.Top }, + middle: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).id(null).borderWidth(2).borderColor(Color.Green) + }.width(200).height(200) + }.margin({left:100,top:20}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..95862b171f81d528c24e32bd33490a0b2e489eec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0100.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0100 { + build() { + Column() { + RelativeContainer() { + Button("button1").width(120).height(30) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text2").fontSize(20) + .alignRules({ + top: { anchor: "bt0050", align: VerticalAlign.Top }, + middle: { anchor: "bt0050", align: HorizontalAlign.Center }, + }).id(undefined).borderWidth(2).borderColor(Color.Green) + }.width(200).height(200) + }.margin({left:100,top:20}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..e592c2599db35e851cefb84b907820727e518489 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0110.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0110 { + build() { + Column() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF66FF") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top}, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + }) + .id("row1") + } + .width(300).height(300) + .border({width:2, color: "#6699FF"}) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd78d1d90d4ae423ec6ca3e81f0158bb824da681 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0120.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0120 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + right: { anchor: "bt0050", align: HorizontalAlign.Center }, + top: { anchor: "__container__", align: VerticalAlign.Top}, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + center: { anchor: "__container__", align: VerticalAlign.Center }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(150) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..876f51a8a28cbd6a88ef87d40c74f04661221357 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0130.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0130 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt0050").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + right: { anchor: "bt0050", align: HorizontalAlign.Center }, + top: { anchor: "__container__", align: VerticalAlign.Top}, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + center: { anchor: "__container__", align: VerticalAlign.Center }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(150) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..e751b2a983d0e7b608e8d0e97126db9e8687844e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0140.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0140 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + right: { anchor: "bt1", align: HorizontalAlign.Center }, + top: { anchor: "bt1", align: VerticalAlign.Bottom}, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(150).offset({x:50,y:0}) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b64d238d3715100278458f2efe75951abe8cfdf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0150.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0150 { + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + top: {anchor: "__container__", align : VerticalAlign.Top}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + .position({top:0,left:0}) + + } + .width(200).height(200) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d388ec7d059889234f2bec7a3f94dbc791e0e67 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0160.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0160 { + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + top: {anchor: "__container__", align : VerticalAlign.Top}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + .position({top:0,left:0}) + + } + .width(200).height(200) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + .padding(50) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..9dd043b3b12247b833f497d8d630ac41d13705a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0170.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0170 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(120) + .height(30) + .alignRules({ + middle: { anchor: "__container__", align: HorizontalAlign.Center } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + Text("this is text") + .fontSize(20) + .padding(10) + .alignRules({ + right: { anchor: "bt1", align: HorizontalAlign.Center }, + top: { anchor: "bt1", align: VerticalAlign.Bottom}, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + }) + .borderWidth(2).borderColor(Color.Green).height(30).width(150) + }.width(200).height(200).borderColor(Color.Red).borderWidth(3) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..0aca896b3223426db465462b03d6e6376e1c6ddd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0180.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0180 { + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "row3", align: HorizontalAlign.Start}, + top: {anchor: "row3", align : VerticalAlign.Top}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row3", align: HorizontalAlign.End}, + top: {anchor: "row3", align: VerticalAlign.Top} + }) + .id("row2") + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..598061be079a8ec87aab027e4eb0a561aa1bc6be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0190.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0190 { + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "row3", align: HorizontalAlign.Start}, + top: {anchor: "row3", align : VerticalAlign.Top}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + + Row(){Text('row3')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row2", align: HorizontalAlign.End}, + top: {anchor: "row2", align: VerticalAlign.Top} + }) + .id("row3") + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a5c5d124533c3fefdbac053a5207178eaba4166 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0200.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0200 { + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "row2", align: HorizontalAlign.Start}, + top: {anchor: "row2", align : VerticalAlign.Top}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..84521d4c98eac7d37de121f1ad4488d5ee8974c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0210.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0210 { + build() { + Row() { + RelativeContainer() { + Row().width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + Row().width(100).height(100) + .backgroundColor("#FFCC00") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + right: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row2") + Row().height(100) + .backgroundColor("#FF6633") + .alignRules({ + top: {anchor: "row1", align: VerticalAlign.Bottom}, + left: {anchor: "row1", align: HorizontalAlign.End}, + right: {anchor: "row2", align: HorizontalAlign.Start} + }) + .id("row3") + .visibility(Visibility.None) + Row() + .backgroundColor("#FF9966") + .alignRules({ + top: {anchor: "row3", align: VerticalAlign.Bottom}, + bottom: {anchor: "__container__", align: VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row1", align: HorizontalAlign.End} + }) + .id("row4") + Row() + .backgroundColor("#FF66FF") + .alignRules({ + top: {anchor: "row3", align: VerticalAlign.Bottom}, + bottom: {anchor: "__container__", align: VerticalAlign.Bottom}, + left: {anchor: "row2", align: HorizontalAlign.Start}, + right: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row5") + } + .width(300).height(300) + .border({width:2, color: "#6699FF"}) + .border({ width: 2, color: "#6699FF" }) + .margin({left:50,top:80}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..83829dfe5f9cc0fb6c918972e2d55438ed57d993 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0220.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 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 TSBaseComponentRelativecontaineer0220 { + build() { + Column() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + + Row(){Text('row3')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.Start}, + top: {anchor: "row1", align: VerticalAlign.Bottom} + }) + .visibility(Visibility.Hidden) + .id("row3") + + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF9966") + .alignRules({ + left: {anchor: "row3", align: HorizontalAlign.End}, + top: {anchor: "row2", align: VerticalAlign.Bottom} + }) + .id("row4") + } + .width("auto").height("auto") + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..467d630bf8f6d01d48b627ac5122d86a142007e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0010.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0010 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height(50).width(200) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f56982e0d7ea054bf25560b5d654642ac501ade --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0020.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0020 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height(50).width(200) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + width: 20, + slice: { top: '30%', bottom: '20px', left: '20%', right: 20 }, + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..2fc8106dc5b4bc1330ec3ee1394d5e67c9c4205b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0030.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0030 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height(50).width(200) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + width: 20, + slice: { top: '30%', bottom: '20px', left: '20%', right: 20 }, + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..56ac914c9d598d04017bb976f1d5d118f0df832d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0040.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0040 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height('100%').width('100%') + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + width: 20, + slice: { top: '30%', bottom: '20px', left: '20%', right: 20 }, + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..34eec605c4ee540271c220ee6ccc2ead5ae37227 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0050.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0050 { + build() { + Row() { + Column() { + // 线段 + Text('dashed') + .border({ + style: BorderStyle.Dashed, + color: 0xAFEEEE, + radius: 10 + }) + .width(120) + .height(120) + .textAlign(TextAlign.Center) + .fontSize(16) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..143b43878f21512cd528302c10ffbfb80e799604 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0060.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0060 { + + build() { + Row() { + Column() { + // 线段 + Text('dashed') + .borderStyle(BorderStyle.Dashed).borderWidth(5).borderColor(0xAFEEEE) + .width(120).height(120).textAlign(TextAlign.Center).fontSize(16) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..a79240cad9e585e1f905f0792704b5422c58b96a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0070.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0070 { + build() { + Row() { + Column() { + Text('.border') + .fontSize(50) + .width(300) + .height(300) + .border({ + width: { left: 3, right: 6, top: 10, bottom: 15 }, + radius: { topLeft: 10, topRight: 20, bottomLeft: 40, bottomRight: 80 }, + style: { + left: BorderStyle.Dotted, + right: BorderStyle.Dotted, + top: BorderStyle.Solid, + bottom: BorderStyle.Dashed + } + }) + .textAlign(TextAlign.Center) + } + } + .width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e217cb1f490494e60f2dc81ce087ba0e89e351a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0080.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0080 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height(50).width(200) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { top: 10, bottom: 10, left: 10, right: 10 }, + width: { top: "10px", bottom: "10px", left: "10px", right: "10px" }, + repeat: RepeatMode.Stretch, + fill: false, + outset: {top:"50px",bottom:"10",left:10, right:"5%"} + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..474de06dc467dcddf6a8745cc5d113b2237a2b1b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0090.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0090 { + + build() { + Row() { + Column() { + Text('This is gradient color.').textAlign(TextAlign.Center).height(50).width(200) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: { top: 10, bottom: 10, left: 10, right: 10 }, + repeat: RepeatMode.Stretch, + fill: false + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..d13e8807c95f80ff25ef11277b9d5bd23d8c61da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0100.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0100 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source:"../../../2.png", + slice:{top:'30%',bottom:'20px',left:'20%',right:'20'}, + width:{top:'20px',bottom:'20px',left:'20px',right:'20px'} + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfe602f59621da452d707191c02e603e745d7dac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0110.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0110 { + private border_width: number = 10 + + build() { + Column() { + Text('This is borderImage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(100) + .width(250) + .borderImage({ + source:'../../../cat.jpg', + slice:{top:"2%",bottom:"2%",left:"2%",right:"2%"}, + width:{top:"80px",bottom:"80px",left:"80px",right:"80px"}, + repeat: RepeatMode.Repeat + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd39b0cc06dc72a6d7197112713bf76eb1f66bd1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0120.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0120 { + private text_width: number = 300 + private border_width: number = 10 + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .borderImage({ + source: $r('app.media.icon'), + slice: this.border_width, + width: this.border_width, + repeat: RepeatMode.Round + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c2dfe86fcd64d68dde508e84fc449bb501c060e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0130.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0130 { + private text_width: number = 300 + private border_width: number = 10 + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .borderImage({ + source: $r('app.media.icon'), + slice: this.border_width, + width: this.border_width, + repeat: RepeatMode.Space + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..35bc22f476b723523ae340126b76e240844d6c13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0140.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0140 { + private text_width: number = 300 + private border_width: number = 10 + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: this.border_width, + width: this.border_width, + repeat: RepeatMode.Stretch + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..6025cef1efd49f85259de064a26a2dd72fdca639 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0150.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0150 { + private text_width: number = 300 + private border_width: number = 0 + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .backgroundColor(Color.Pink) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: this.border_width, + width: this.border_width + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..177e6c7d5c51fd81819613529b2bcf35c63574a3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0160.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0160 { + private text_width: number = 300 + private border_width: number = 10 + + build() { + Column() { + Text('Text') + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 10, + width: this.border_width + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..d71c119ba21371267ed1c75c6f78774b4dd93362 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0170.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0170 { + private text_width: number = 300 + private border_width: number = -10 + + build() { + Column() { + Text('Text') + .fontSize(30) + .textAlign(TextAlign.Center) + .height(100) + .width(this.text_width) + .backgroundColor(Color.Pink) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 10, + width: this.border_width + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..1043ef0ed567c4163ba1b369167174f27929fd4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0180.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0180 { + + build() { + Column() { + Text('This is borderImage1') + .fontSize(20) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .borderImage({ + source:'../../../cat.jpg', + slice:'20%', + width:'30px', + repeat: RepeatMode.Stretch, + fill: false + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..63e46396248d9075ff5b8f4f54fc2e99d3dbc24c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0190.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0190 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .borderImage({ + source: $r('app.media.icon'), + slice: '10%', + width: '10%' + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..166f74286b23cfedf479bd4f626e98d29b5d82b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0200.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0200 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .borderImage({ + source: $r('app.media.icon'), + slice: 10, + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..ccd7e12e5038d4290e5ef38a7c1fd3526385240b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0210.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0210 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderRadius({ topLeft: 10, topRight: 10, bottomLeft: 10, bottomRight: 10}) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..1bba44be6486f7604d87cb37761215d56cc1bd71 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0220.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0220 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderStyle(BorderStyle.Dotted) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..f61d3ccd5a78310cd9884988d476537ee5a0fbc0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0230.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0230 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderColor({ top: Color.Red, bottom: Color.Black, left: Color.Blue, right: Color.Yellow}) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d344b750f833c4e13dfcfeee5bf43e145a0c5b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0240.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0240 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderWidth({left:"5lpx", right:"10lpx",top:"20lpx", bottom:"30lpx"}) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..fa939286bd375d12436279b8bc4fcfd00425a278 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0250.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0250 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderRadius(10) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..49d96fbe16b49dfcc1f8479de256dda6359ea645 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0260.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0260 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderColor(Color.Blue) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..a9caf76de0ad06799be449be19b8c372dbafe4e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0270.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0270 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderImage({ + source: $r('app.media.icon'), + slice: '10%', + width: '10%' + }) + .borderStyle(BorderStyle.Dashed) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..78c80354b2930583c3d33e2a8aacb4ad3aa9b556 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0280.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0280 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderImage({ + source: $r('app.media.icon'), + slice: '10%', + width: '10%' + }) + .borderStyle(BorderStyle.Solid) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac870a70cf2448152ddd7bd9a617c9eb576bbb0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0290.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0290 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderWidth(2) + .borderRadius(100) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..838cead2310c14e0341ed1fc2cbfc67fbeed06a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0300.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0300 { + private fSize: Resource = $r('app.string.font_size') + private fHeight:Resource = $r('app.string.font_height') + private border_width: Resource = $r('app.string.border_width') + build() { + Column() { + Text('Text') + .fontSize(this.fSize) + .height(this.fHeight) + .width(this.fHeight) + .borderWidth(this.border_width) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..a160a2263999097fd216854dcc0d178abf6fd91c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0310.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0310 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .padding(30) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..823cf3b7b17a7d1def06add63dc5f109af27f37c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0320.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0320 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(300) + .backgroundColor(Color.Pink) + .borderImage({ + source: $r('app.media.icon'), + slice: 0, + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f151ed6b69dfe1703dddb311613021c0f0ebbde --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0330.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0330 { + + build() { + Column() { + Text('This is borderlmage1') + .fontSize(20) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .borderImage({ + source: '../../../cat.jpg', + slice: 20, + width: '20px', + repeat: RepeatMode.Stretch, + fill: false + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb91b548806aa7a083f26d5d7909fe2573cfecc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0340.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0340 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: $r('app.media.icon'), + slice: -2, + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..047998e4d17aca8d8c066223386d1b5ac6a7297c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0350.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0350 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: $r('app.media.icon'), + slice: $r('app.float.float_1'), + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..de370740a1b10a73fbcc8526f5eeed7a422bfa8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0360.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0360 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: $r('app.media.icon'), + slice: '20px', + width: 20 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5706345601ae931d812e66abf1ee1335155d3b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0370.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0370 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: $r('app.media.icon'), + slice: '31%', + width: 20 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1084d6248f0017022dc91248e98cbba85d29bea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0380.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0380 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 10, + width: {top:"20px",bottom:"20",left: 20,right:"10%"} + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..0eb92cd3caa361aa14d27c7f4ed0c34d94dbe64c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0390.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0390 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 10, + width: $r('app.float.float_17') + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fb4ff014c841ead0c72bcded7a3c59f75592795 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0400.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0400 { + + build() { + Column() { + Text('Text') + .fontSize(20) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: '../../../cat.jpg', + slice: 20, + width: '20px', + repeat: RepeatMode.Stretch, + fill: false + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcd18ed6cfc5559761bdb6152eabe8c970e8e31d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0410.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0410 { + private resource: Resource = $r('app.media.icon') + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: this.resource, + slice: 10, + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..e963bc182cf26025e30d9817a479ece7df688d0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0420.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0420 { + private resource: Resource = $r('app.media.icon') + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderImage({ + source: { + angle: 90, + direction: GradientDirection.Left, + colors: [[0xAEE1E1, 0.0], [0xD3E0DC, 0.3], [0xFCD1D1, 1.0]] + }, + slice: 10, + width: 10 + }) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..46e8adbea3913fa053b04967bcd4cf49faf5ddeb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0430.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0430 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderWidth('-10px') + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf652e392b0e2129987b9388fba62faf990e30b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0440.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0440 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(200) + .backgroundColor(Color.Pink) + .borderWidth('10px') + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..ede2e8d76e407338d2f27128eb3ebaa01e92a409 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0450.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0450 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(100) + .backgroundColor(Color.Pink) + .borderWidth('20%') + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..99d56677445e719a621def1b03b415fa49129987 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0460.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0460 { + + build() { + Column() { + Text('Text') + .fontSize(50) + .textAlign(TextAlign.Center) + .height(100) + .width(100) + .backgroundColor(Color.Pink) + .borderWidth(-10) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5c412994a217c48f64c1e2e81ed8265e0d2e44e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0470.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { edgeColors } from '@kit.ArkUI' + +@Entry +@Component +struct UIAttributesBorderInterface0470 { + + build() { + Column() { + Text('Text') + .fontSize(20) + .textAlign(TextAlign.Center) + .height(100) + .width(100) + .backgroundColor(Color.Pink) + .borderWidth(10) + } + .width('100%') + .margin({top:50}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0480.ets new file mode 100644 index 0000000000000000000000000000000000000000..be1bcd489c4fdc613cb4b10cb8b1fae5d7ab96fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0480.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0480 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .backgroundColor(Color.Yellow) + .borderWidth(80) + .borderColor(Color.Red) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..565f0da8e1d67e4f907e2cebfb0fae97b1fcd3ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0490.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0490 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source:"../../../2.png", + slice:{top:'30%',bottom:'20px',left:'20%',right:'20'}, + width:{top:'20px',bottom:'20px',left:'20px',right:'20px'}, + fill:false + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..43ca40051c0b7fbff8dadb39d3159670543a5eba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0500.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0500 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source:"../../../2.png", + slice:{top:'30%',bottom:'20px',left:'20%',right:'20'}, + width:{top:'20px',bottom:'20px',left:'20px',right:'20px'}, + fill:true + }) + } + .width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..4aab2ca25bc0a9a72b1e2265f3ea2e83bc537ab5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0510.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0510 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:{top:'30px',bottom:'20px',left:'20px',right:'20'}, + width:{top:'20px',bottom:'20px',left:'20px',right:'20px'}, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..320f4aeb52fa72051765cfb151b57a0835cd7d70 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0520.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0520 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:0, + width:20, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef4d93b9d20247a8ff65ecf33311403afdb12831 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0530.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0530 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:10, + width:20, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..72760b46dc06dc7cb2d94bc768f11b9cb245e72b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0540.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0540 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:-10, + width:20, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..e229ca70a60aada4927cbbba94cb2be5c54ea696 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0550.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0550 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:"50px", + width:20, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0560.ets new file mode 100644 index 0000000000000000000000000000000000000000..93e7a886b874d224aafb35c5fc96b9f6f42a03b7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0560.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0560 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .height(50) + .width(150) + .borderImage({ + source: $r('app.media.icon'), + outset:"5%", + width:20, + }) + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..49a02b4bf91ea89eb4b16662c0109d54ab6ce4c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0570.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0570 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .backgroundColor(Color.Yellow) + .height(50) + .width(150) + .borderRadius('90px') + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb87860bb6903ff887c9c6fbe1b50888addc88c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0580.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesBorderInterface0580 { + build() { + Column() { + Text('This is borderlmage1') + .fontSize(19) + .textAlign(TextAlign.Center) + .backgroundColor(Color.Yellow) + .height(50) + .width(150) + .borderRadius('30%') + } + .width('100%') + .margin({ top:50 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ac825ca4362fcb00502bfc05cf4a0b0e584ce29 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0010.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@CustomDialog +struct CustomDialogExample { + controller?: CustomDialogController + cancel: () => void = () => { + } + confirm: () => void = () => { + } + build() { + Column() { + Text('这是自定义弹窗') + .fontSize(30) + .height(50) + TextInput({ placeholder: '请输入...' }).width('100%').height(50).margin(20).id("textInput") + } + } +} +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0010 { + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample({ + cancel: ()=> {}, + confirm: ()=> {} + }), + autoCancel: true, + alignment: DialogAlignment.Center, + customStyle: false, + cornerRadius: 20, + width: 300, + height: 150, + borderWidth: 1, + borderStyle: BorderStyle.Dashed, + borderColor: Color.Blue, + backgroundColor: Color.White + }) + aboutToDisappear() { + this.dialogController = null + } + + build() { + Row() { + Button("RESIZE").onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(100).height(100).id("resize") + Button('click me') + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).width(100).height(100).id("showDialod") + }.width('100%').height('100%').margin({ top: 15 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e6eaffdbd4af6c5b5145b2b15033607fbbe1960 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0020.ets @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0020 { + private mode:string = 'ABC' + build() { + Row({space: 8}) { + Button("RESIZE").onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.OFFSET) + }).width(100).height(100).id("resize") + TextInput({placeholder: '请输入...'}).width(300).height(50).border({width: 1}).id("textInput") + }.width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f24c8dab8a304a2aed8871b6383617b2d2bcbcd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0030.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0030 { + @State show: boolean = false + @State mode: string = '' + + build() { + Column() { + Button("显示Panel").onClick(() => { + this.show = true + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + this.mode = this.getUIContext().getKeyboardAvoidMode().toString() + }).width(100).height(100).id("showPanel") + Button("RESIZE").onClick(() => { + this.show = false + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(80).height(50).id("resize") + + Panel(this.show) { // 展示日程 + Column() { + Button("test").width(100).height(100) + TextInput({ placeholder: '请输入...', text: this.mode }).width(300).height(50).borderWidth(1).margin({top:30}).id("textInput") + } + } + .type(PanelType.Foldable) + .mode(PanelMode.Half) + .dragBar(true) // 默认开启 + .halfHeight(500) // 默认一半 + .showCloseIcon(true) // 显示关闭图标 + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..2dbf289bd90143565f03f39d70488c7044c84ad1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0040.ets @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0040 { + scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Column(){ + Text('1') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('2') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('3') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + TextInput({ placeholder: '请输入..'}).width(300).height(50).borderWidth(2).margin({ top: 20 }) + .id('textInput') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('5') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('6') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('7') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + }.width('100%') + } + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .friction(0.6) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..08aa83abc364d3727fcbb0ab886fe6a915160e52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0050.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0050 { + scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Column(){ + Text('1') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('2') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('3') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Button('RESIZE').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(100).height(60).margin({ top: 20 }).id('resize') + TextInput({ placeholder: '请输入..'}).width(300).height(50).borderWidth(2).margin({ top: 20 }) + .id('textInput') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('5') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('6') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('7') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + }.width('100%') + } + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .friction(0.6) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ae51d029fb308d50bcdddce4ab55cd31f6510b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0060.ets @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0060 { + scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + Column(){ + Text('1') + TextInput({ placeholder: '请输入...' }).width(300).height(60).borderWidth(2).id('textInput').margin(10) + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('2') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('3') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('4') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('5') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('6') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + Column(){ + Text('7') + } + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .margin({ top: 10 }) + }.width('100%') + } + .scrollable(ScrollDirection.Vertical) // 滚动方向纵向 + .scrollBar(BarState.On) // 滚动条常驻显示 + .scrollBarColor(Color.Gray) // 滚动条颜色 + .scrollBarWidth(10) // 滚动条宽度 + .friction(0.6) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a21e23350c064eaa58b2777966622f7a76956fc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0070.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0070 { + private mode:string = 'ABC' + build() { + Row({space: 8}) { + Button("RESIZE").onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(100).height(100).id("resize") + TextArea({text: '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + }).width(300).height(200).id('textArea') + }.width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..c958f1b3ef0d7b22a10eaf3b93f41b3c3715f38d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0080.ets @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeLayout0080 { + build() { + Row({space: 8}) { + TextArea({text: '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + + '这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea这是一个textArea' + }).width(300).height(200).id('textArea') + }.width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..19cacd28d85847933cedf2368bb191349565dce4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0090.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0090 { + build() { + Row({space: 8}) { + Column({space: 8}){ + Button('RESIZE').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(100).height(60).id('resize') + TextInput({ placeholder: '这是倒数第二个输入框' }).borderWidth(2).width(300).height(50).id('textInput2') + TextInput({ placeholder: '这是倒数第一个输入框' }).borderWidth(2).width(300).height(50).id('textInput1') + } + }.width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c00db80322846ffd8ba8b71b244e0e47d23fb7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0100.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0100 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Button("10页") + .width(80) + .height(80) + .id('changePage') + .onClick(() => { + this.scrollerForList.scrollToIndex(9, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Scroll(this.scrollerForScroll) { + Column() { + + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({ space: 8 }){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("100%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a3b5f845c8400e2094c8e57b8e3e471ffce5325 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0110.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI'; +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0110 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Column({space: 8}){ + Button("10页").width(80).height(80).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(9, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button('RESIZE').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }).width(80).height(80).id('resize') + } + + Scroll(this.scrollerForScroll) { + Column() { + + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({ space: 8 }){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("100%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..9cb5303f71df5fc0b0dfa6bd4bef34b741b98c70 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0120.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI'; +import { promptAction } from '@kit.ArkUI'; +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0120 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Column({space: 8}){ + Button("10页").width(80).height(80).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(9, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button('Toast').onClick(() => { + promptAction.showToast({ + message: '这是一个Toast', + duration: 5000 + }); + }).width(80).height(80).id('showToast') + } + + Scroll(this.scrollerForScroll) { + + Column() { + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({ space: 8 }){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("100%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffbe3d4e1de9fb9addc1478255f6f5d7ed9eaf4d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0130.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI'; +import { promptAction } from '@kit.ArkUI'; +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0130 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Column({space: 8}){ + Button("10页").width(80).height(80).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(9, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RSIZE").width(80).height(80).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + Button('Toast').onClick(() => { + promptAction.showToast({ + message: '这是一个Toast', + duration: 5000 + }); + }).width(80).height(80).id('showToast') + } + + Scroll(this.scrollerForScroll) { + Column() { + + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({ space: 8 }){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("100%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5a73559574269c36fb6d3004695dec459c2dc39 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0140.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0140 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("page1").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(0, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("OFFSET").width(100).height(50).id('offset').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.OFFSET) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9af765ca72d3544da6f66409edc15d923ed5e87e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0150.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0150 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("page1").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(0, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e88f54f543310ae9a9390962742c38c6e44dd9e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0160.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0160 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(15, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("next").width(100).height(50).id('next').onClick(() => { + this.scrollerForList.scrollPage({ next: true }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..d060d45eecb7c95d7ce2602fe9b47a4b5c9e4320 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0170.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0170 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(1, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + // Button("next").width(100).height(50).id('next').onClick(() => { + // this.scrollerForList.scrollPage({ next: true }) + // }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac74321815dd39786d2b1894bd0eb8d20be791f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0180.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0180 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(1, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8f87a07189c5a6416f0467c12dbc26199713d27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0190.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0190 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(1, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..daac0a3270f2389f0362120f18562f7892ebd597 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0200.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0200 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(1, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f0094ab9bb7a32d2ae4b37952478a768e5c8e68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0210.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0210 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(8, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..50123d35ad91398fa3e8c39383426980e0d78964 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0220.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0220 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(8, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a72527d720e9b147b8f82aed312b91340bfb659 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0230.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0230 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(6, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee702eca89bc55ac7b1fd4ece733cef5a103a0d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0240.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0240 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(6, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..61b06b41c9ac0f5946a7a0f195690279c428d32c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0250.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0250 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(5, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8a0c660219edadb3fb6729f5b9964b992012a7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0260.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0260 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(5, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..38557902c402873f62dbd75a0bb5397635cbc888 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0270.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0270 { + @State show: boolean = false + @State mode: string = '' + + build() { + Column() { + Button("显示Panel").onClick(() => { + this.show = true + }).width(100).height(100).id("showPanel") + + Panel(this.show) { // 展示日程 + Column() { + Button("test").width(100).height(100) + TextInput({ placeholder: '请输入...', text: this.mode }).width(300).height(50).borderWidth(1).margin({top:30}).id("textInput") + } + } + .type(PanelType.Foldable) + .mode(PanelMode.Half) + .dragBar(true) // 默认开启 + .halfHeight(500) // 默认一半 + .showCloseIcon(true) // 显示关闭图标 + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..5119c0c84fa7bf56ecd324a1f5ff5ce8d789b7dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0280.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0280 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(13, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..24d9988983e6a82dbf4eed1d08912071b9183c5f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0290.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0290 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(13, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c93223936fdc680e9f6950b35bfac0bb0442160 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0300.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0300 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(7, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0c997c339a17f5a843afc1680f680768df77881 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0310.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0310 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(7, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..79562159ac5ab8a6e4e8ef7cbe6afaac6b0ba55d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0320.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0320 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(12, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..78b8765ef5e9f9a8bcb77d433477e006f0a988fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0330.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0330 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(12, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..a017dc3b0a894fa08e810cd0bb4aab1fd86b9e86 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0340.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0340 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(14, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd5909db7ecc9897c201fc1379859ab6ffa7e889 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0350.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0350 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(11, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..915335e465a2818da19476c68f8ea78dc371f763 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0360.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' +import { KeyboardAvoidMode} from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesKeyboardavoidmodeLayout0360 { + @State listPosition: number = 0; // 0代表滚动到List顶部,1代表中间值,2代表滚动到List底部。 + private arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + Row(){ + Button("changePage").width(100).height(50).id('changePage').onClick(() => { + this.scrollerForList.scrollToIndex(11, false, ScrollAlign.START, { extraOffset: LengthMetrics.vp(5) }) + }) + Button("RESIZE").width(100).height(50).id('resize').onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + } + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Column({space:8}){ + Text('ListItem'+item) + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_2') + TextInput({ placeholder: '请输入...'}).width('100%').height(50).id('ListItem'+item+'_1') + } + }.width("100%").height(150).backgroundColor(Color.White).borderRadius(10) + }, (item: string) => item) + } + .width("100%") + .height("90%") + .edgeEffect(EdgeEffect.None) + .friction(0.6) + } + } + .width("100%").height("100%") + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(5) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f4d4202a88dba4c6f0a1f3378be7d4f5489466a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0010.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0010 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ee2ae8d6b099cc65ffe96a86a590e5ae21e28ac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0020.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0020 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .offset({ x: 20, y: 20 }) + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..00234daa86efda21dfa71aa9a1b8fa5b734daf42 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0030.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0030 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .position({x:20}) + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..dba0a48889af80fc4449e4214a60063e3e68c71c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0040.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0040 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .padding(10) + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..c0a0210f4d27b196c82691e304ed9bce1884a106 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0050.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0050 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .margin(10) + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a298d7e2ecc5ace11e6a78813c55d1b9ede48fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0060.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0060 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0060_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..0224a53ef1b045f4c354217fef90cf95ab3d2732 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0070.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0070 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0070_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..6836557d2e3d8b590a54d07e42d195c551235082 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0080.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0080 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0080_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..3936784957619b8ec565a509d8573ff369d5ede5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0090.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0090 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0090_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..dabd137fcd036af383ecd928766f3f4f8ba85d30 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0100.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0100 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0100_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..f611e2359fb48219f95d36e8c6cb0dab7ff712fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0110.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0110 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0110_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..d07b3d478fce05a3e1f943a56d0603964f3313ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0120.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0120 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0120_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..988fea7a24f91dd0b74e9b501a37509e88ef9f92 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0130.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0130 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0130_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..09a0d57d8647cdac4773337ab4a8a3ba3d57a81d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0140.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0140 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0140_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..489a12e1ab17ec493ed5b1e31b52edc4a278a34a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0150.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0150 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0150_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..d220c932760b2b055f2276c96b793604988c65c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0160.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0160 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0160_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c855fae8f70a3c7bfc1afa656a312ec850fc155 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0170.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0170 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.BOTTOM]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..52aea77c1bf2dce48e9e45b803092f49e7ec807a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0180.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0180 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.BOTTOM, SafeAreaEdge.END]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed53e50489c5da500a3843aa07a06661aa935b0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0190.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0190 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..7c62841eecc679ea7854659199fb0e773c971bf1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0200.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0200 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.END]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..07effa42176510e6c26a9f15a4a347f9030356b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0210.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0210 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.START]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0844f8bcba7ad634f66a58983af5e80caddd17b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0220.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0220 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.START,SafeAreaEdge.END]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a254b472e18f6d54e78ae3a26283388519f0ef1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0230.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0230 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.TOP]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..9708678803f149a12e9e676be44e0e67c084caaa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0240.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0240 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..830dbb9f21a6b4d0c2bc76505f342efd3f94e677 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0250.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0250 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed5b0582250c044e132c36991547fd3457f0fc62 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0260.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0260 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.TOP, SafeAreaEdge.END]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a26387799f053cc04279a6a4d06251286c9e450 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0270.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0270 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.CUTOUT], [SafeAreaEdge.TOP, SafeAreaEdge.START]) + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffcd939fb3a99949c742197a44ff97159ea6b778 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0280.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0280 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0280_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..c69a7fefbecdfe278d0f08d027a76bcb4ca6afab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0290.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0290 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0290_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..842f8b80520d0c7a9649ce32bbf4303b9d807c70 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0300.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0300 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0300_text') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..df9189c96adcb72745aa689e7eb50f40b6390b49 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0310.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0310 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7f832f79b5f6ac4c08428171848d059adab0772 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0320.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0320 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.START]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5550f72ca2ddbe645b8e144219e3452f6ab3961 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0330.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0330 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.START, SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..969793fb3e80d4b1fde8a0e7e61f0b85e398d776 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0340.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0340 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f44e0fb256457dfb6b6c6bcb0cc878886c23658 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0350.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0350 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0350_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..42a3b38ccc50b2a405187c8dd438ca07b1e8408b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0360.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0360 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0360_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..279250e6ab132c5221591e2596b6671341b0edd4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0370.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0370 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6df61eabc8d6a72b007eece0b68cc9593e114f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0380.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0380 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.START]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..37a13167b189c7b42ff9cfcbec1a39e9820a344a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0390.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0390 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0390_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..0213103a19482d901fa24a22f6d262f5b655c9b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0400.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0400 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.BOTTOM, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0400_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6ed07de152fe39c03e23a4386c837e59d044658 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0410.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0410 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0410_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a64be1b8f4d5845fd2b5da25bcd57c7fb7b9d8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0420.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0420 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0420_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..8aab60b418806411bad9c7cee84b3b16ba50318d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0430.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0430 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.START]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0430_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..7cacfdd1b3600193b0612958e37e5612a46dd869 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0440.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0440 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0440_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..4bc79baae03d16f6304b1e0e77d39263337508fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0450.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0450 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0450_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..00f61b6f4af8c8c12702ed63a9eb7af0a8fb4352 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0460.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0460 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0460_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb17ff2b47c4c0365952d03672fdddee63559e7c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0470.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0470 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0470_text') + } + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0480.ets new file mode 100644 index 0000000000000000000000000000000000000000..590b5fad013e939771c58cf2e73bdb878b707050 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0480.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0480 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..31bdae57e2ff99437d8f587b2c28db8d95b618a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0490.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0490 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.START]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fc51c006b81e686e06bd0d536d2fb6a9d738a40 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0500.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0500 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT], + [SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..43e8cf58e2cd90aa08cb6c73171eb1db0fad4863 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0510.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0510 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], + [SafeAreaEdge.BOTTOM, SafeAreaEdge.END]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa0d90fbd545370ed058bdc44138bbfa0cee7b2d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0520.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0520 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.CUTOUT], + [SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } + }.height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..a61397fef4f468c01db65cda488bab820d50635f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0530.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0530 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..77a8c51f300f4be5ad3146c6ae807ce0fd10ce98 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0540.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0540 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..216f88d511c1825b086e95c60804d28737e1338b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0550.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0550 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.START,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0560.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5a6b59b8391e84b50328de1e54dfb8462f2a7ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0560.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0560 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM],[SafeAreaEdge.TOP]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f4d75f42ad659f6a4c0c22028928f8f8e1f42f7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0570.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0570 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff131b1bc2b8887da3506f1e5dc3a770c9f3068e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0580.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0580 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0590.ets new file mode 100644 index 0000000000000000000000000000000000000000..e521fad7ddebf587b5f94d919671e8de87349fb5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0590.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0590 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.CUTOUT],[SafeAreaEdge.TOP,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0600.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f0c34a19da2f210dcb6ca18737baddcfae65e0c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0600.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0600 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM],[SafeAreaEdge.TOP,SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0610.ets new file mode 100644 index 0000000000000000000000000000000000000000..84906bf4d2156a2db3bb6eb081c1aa95137670d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0610.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0610 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0610') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0620.ets new file mode 100644 index 0000000000000000000000000000000000000000..11cd0082ca0b82509f672c4f53dbbc799a905da9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0620.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0620 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM,SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0620') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0630.ets new file mode 100644 index 0000000000000000000000000000000000000000..b073ceeab35cecfc47b4bac553509432a9aaf494 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0630.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0630 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.BOTTOM,SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0630') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0640.ets new file mode 100644 index 0000000000000000000000000000000000000000..55165ffcd4e0482a7e36b04405a5053fbb1c212e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0640.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0640 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0650.ets new file mode 100644 index 0000000000000000000000000000000000000000..7afa6c0ae23e21089f9917106cc7ec6ba9e918f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0650.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0650 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0660.ets new file mode 100644 index 0000000000000000000000000000000000000000..af39f2185d0922c866b2ed231643d6279d14a2cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0660.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0660 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.START,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0670.ets new file mode 100644 index 0000000000000000000000000000000000000000..3770e7d131eb8ff5c30eb19b1a5b1c698a205d9c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0670.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0670 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.START,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0680.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac7a6655c0885ff4b18ff1812570d807b355bed7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0680.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0680 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320).height(40).offset({y: 120}) + .fontSize(14).fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0680') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0690.ets new file mode 100644 index 0000000000000000000000000000000000000000..b01f795bbec8b25092df0b36cde3c476ad1285a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0690.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0690 { + @State text: string = '' + controller: TextInputController = new TextInputController() + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], + [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]) + Column() { + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderFont({ size: 14, weight: 400 }) + .width(320) + .height(40) + .offset({ y: 120 }) + .fontSize(14) + .fontColor(Color.Black) + .backgroundColor(Color.White) + .borderWidth(2) + .id('UIAttributesKeyboardavoidmodeSetup0690') + } + .width('100%') + .alignItems(HorizontalAlign.Center) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0700.ets new file mode 100644 index 0000000000000000000000000000000000000000..002c5d8d98cc8726959571fb4493714b963d164e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0700.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0700 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0710.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1239f0243b80682df2a81e226c1a7127e5d5a5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0710.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0710 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM, SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP,SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0720.ets new file mode 100644 index 0000000000000000000000000000000000000000..4fccb33d3bb794e0e2e0423209ec1f1f6aa18909 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0720.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0720 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0730.ets new file mode 100644 index 0000000000000000000000000000000000000000..f730b24b50f070d52052b26cdfd7985cc4ce6935 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0730.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0730 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0740.ets new file mode 100644 index 0000000000000000000000000000000000000000..7da8814540297d6d56620548c6f886c5781e5099 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0740.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0740 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM,SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0750.ets new file mode 100644 index 0000000000000000000000000000000000000000..af2d957fe69c233122f5c172e38b40b8cc5c282f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0750.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0750 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0760.ets new file mode 100644 index 0000000000000000000000000000000000000000..7418ff69504ec772c81d1eb5a6c5c86c4b37a476 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0760.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0760 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0770.ets new file mode 100644 index 0000000000000000000000000000000000000000..e7855f7bbce2e17fb0d26f597abadb3dab211e59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0770.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0770 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.START,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0780.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fc5bed36c9c15ff2114313af1ffe0966df058e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0780.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0780 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0790.ets new file mode 100644 index 0000000000000000000000000000000000000000..2245ad1bce0cd7aeedd3bdf472d96572cd9b3b31 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0790.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0790 { + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0800.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0800.ets new file mode 100644 index 0000000000000000000000000000000000000000..25e6fed1640b5cdc294495906b69e7231d54ab57 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0800.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0800 { + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP,SafeAreaEdge.BOTTOM,SafeAreaEdge.START,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0810.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cbb79841f5066be84aa8131e61798d47f1aed94 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0810.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0810 { + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP,SafeAreaEdge.END]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0820.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0820.ets new file mode 100644 index 0000000000000000000000000000000000000000..df7f285dc9af2effe3b3f1a51944ff582ef4bde6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0820.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0820 { + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP,SafeAreaEdge.START]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0830.ets new file mode 100644 index 0000000000000000000000000000000000000000..1adbb0948a190117fdc5e0bef4f78bd5cfde54c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0830.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0830 { + + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')).backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM,SafeAreaType.KEYBOARD,SafeAreaType.CUTOUT]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0840.ets new file mode 100644 index 0000000000000000000000000000000000000000..d981341983e9fa6649a1fe3a55185b784f7eb052 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0840.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIAttributesKeyboardavoidmodeSetup0840 { + build() { + Row() { + Stack() { + Column() + .height('100%') + .width('100%') + .backgroundImage($r('app.media.cat')) + .backgroundImageSize(ImageSize.Cover) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..19e5c30524cd5f9eaad46698c88609cd90adf088 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0010.ets @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2024 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. + */ + +@CustomDialog +struct CustomDialogExampleTwo { + controllerTwo?: CustomDialogController + build() { + } +} +@CustomDialog +@Component +struct CustomDialogExample { + @Link textValue: string + @Link inputValue: string + dialogControllerTwo: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExampleTwo(), + alignment: DialogAlignment.Bottom, + onWillDismiss:(dismissDialogAction: DismissDialogAction)=> { + console.info("reason=" + JSON.stringify(dismissDialogAction.reason)) + console.log("dialog onWillDismiss") + if (dismissDialogAction.reason == DismissReason.PRESS_BACK) { + dismissDialogAction.dismiss() + } + if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) { + dismissDialogAction.dismiss() + } + }, + offset: { dx: 0, dy: -25 } }) + controller?: CustomDialogController + // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在所有controller的后面 + cancel: () => void = () => { + } + confirm: () => void = () => { + } + + build() { + Column() { + Text('Change text').fontSize(20).margin({ top: 10, bottom: 10 }) + TextInput({ placeholder: '', text: this.textValue }).height(60).width('90%') + .id("transitionanimation_0010") + .onChange((value: string) => { + this.textValue = value + }) + Text('Whether to change a text?').fontSize(16).margin({ bottom: 10 }) + Flex({ justifyContent: FlexAlign.SpaceAround }) { + Button('cancel') + .onClick(() => { + if (this.controller != undefined) { + this.controller.close() + this.cancel() + } + }).backgroundColor(0xffffff).fontColor(Color.Black) + Button('confirm') + .onClick(() => { + if (this.controller != undefined) { + this.inputValue = this.textValue + this.controller.close() + this.confirm() + } + }).backgroundColor(0xffffff).fontColor(Color.Red) + }.margin({ bottom: 60}) + }.borderRadius(10) + + // 如果需要使用border属性或cornerRadius属性,请和borderRadius属性一起使用。 + } +} +@Entry +@Component +struct UIAttributesKeyboardavoidmodeTransitionanimation0010 { + @State textValue: string = '' + @State inputValue: string = 'click me' + dialogController: CustomDialogController | null = new CustomDialogController({ + builder: CustomDialogExample({ + cancel: ()=> { this.onCancel() }, + confirm: ()=> { this.onAccept() }, + textValue: $textValue, + inputValue: $inputValue + }), + cancel: this.exitApp, + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: -20 }, + gridCount: 4, + customStyle: false, + cornerRadius: 10, + + }) + + // 在自定义组件即将析构销毁时将dialogController置空 + aboutToDisappear() { + this.dialogController = null // 将dialogController置空 + } + + onCancel() { + console.info('Callback when the first button is clicked') + } + + onAccept() { + console.info('Callback when the second button is clicked') + } + + exitApp() { + console.info('Click the callback in the blank area') + } + build() { + Column() { + Button(this.inputValue) + .id("btntransitionanimation_0010") + .onClick(() => { + if (this.dialogController != null) { + this.dialogController.open() + } + }).backgroundColor(0x317aff) + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..661d8a581c1a68a33fa3ac25c3456a7a1d58ef10 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0020.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode, window} from '@kit.ArkUI' +import { common } from '@kit.AbilityKit' + +@Entry +@Component +struct UIAttributesKeyboardavoidmodeTransitionanimation0020 { + @State mode:string = '' + build() { + Column() { + Row(){ + Button("RSIZE").onClick(() => { + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE) + }) + .id("resize") + Button("获取当前避让模式").onClick(() => { + this.mode = this.getUIContext().getKeyboardAvoidMode().toString() + }) + .id("getMode") + } + .height("30%").width("100%").backgroundColor(Color.Gray) + TextArea().width("100%").borderWidth(1).id("TextArea") + Text("当前避让模式为:" + this.mode).width("100%").textAlign(TextAlign.Center) + .backgroundColor(Color.Pink).layoutWeight(1) + }.width('100%').height("100%") + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..00b71ca70757a5ddd1bd1820f046fcb8cb423506 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0030.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode, window} from '@kit.ArkUI' +import { common } from '@kit.AbilityKit' + +@Entry +@Component +struct UIAttributesKeyboardavoidmodeTransitionanimation0030 { + private context = getContext(this) as common.UIAbilityContext + @State isFullScreen: boolean = false + + async unshow() { + let win = await window.getLastWindow(this.context) + await win.setWindowSystemBarEnable([]) + + } + + horVerSwitch() { + let context = getContext(this) as common.UIAbilityContext; + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(this.isFullScreen ? window.Orientation.PORTRAIT : window.Orientation.LANDSCAPE) + this.isFullScreen = !this.isFullScreen + }) + } + + build() { + Column() { + Button("unshow") + .onClick(() => { + this.unshow() + }) + .id("transitionanimation_0030") + .width(200) + .height(80) + .margin({ top: 30 }) + + Button("横竖屏切换") + .id('hengtransitionanimation_0030') + .onClick(() => { + this.horVerSwitch() + }) + .margin({ top: 30 }) + .width(200) + .height(80) + + }.width('100%').height("100%").backgroundColor(Color.Yellow) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..621ae19f78f43d5ae62bd36fda658d7f4fabc69d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 { KeyboardAvoidMode, window} from '@kit.ArkUI' +import { common } from '@kit.AbilityKit' + +@Entry +@Component +struct UIAttributesKeyboardavoidmodeTransitionanimation0040 { + private context = getContext(this) as common.UIAbilityContext + async unshow() { + let win = await window.getLastWindow(this.context) + await win.setWindowSystemBarEnable([]) + + } + async show() { + let win = await window.getLastWindow(this.context) + await win.setWindowSystemBarEnable(['status', 'navigation']) + } + aboutToAppear(): void { + + } + build() { + Column() { + Row(){ + Button("show").onClick(() => { + this.show() + }) + .width(120) + .height(100) + .id("show") + Button("unshow").onClick(() => { + this.unshow() + }) + .width(120) + .height(100) + .id("unshow") + } + .margin({ top: 20 }) + }.width('100%').height("100%").backgroundColor(Color.Yellow) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..30767e6e41ce5931e0bce2f2d5e28e1455735df1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIComponentBorderDashedDashgapDashwidth0010 { + @State dash_Gap: string = '0' + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + .border({width:5, style: BorderStyle.Dashed, dashGap: {top: this.dash_Gap, bottom: this.dash_Gap, right: this.dash_Gap, left: this.dash_Gap}}) + Column({ space: 8 }) { + Button(' -1 ').onClick(() => { + this.dash_Gap = '-1' + }).id('UIComponentBorderDashedDashgapDashwidth0010_2') + Button(' 5 ').onClick(() => { + this.dash_Gap = '5' + }).id('UIComponentBorderDashedDashgapDashwidth0010_3') + Button(' 0.1 ').onClick(() => { + this.dash_Gap = '0.1' + }).id('UIComponentBorderDashedDashgapDashwidth0010_4') + Button(' 0.05 ').onClick(() => { + this.dash_Gap = '0.05' + }).id('UIComponentBorderDashedDashgapDashwidth0010_5') + Button(' 50abc ').onClick(() => { + this.dash_Gap = '50abc' + }).id('UIComponentBorderDashedDashgapDashwidth0010_6') + } + .margin(20) + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..a927c0d62afc4311c20caf3c52d9b422234c6a87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIComponentBorderDashedDashgapDashwidth0020 { + @State dash_width: string = '0' + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + .border({width:5, style: BorderStyle.Dashed, dashWidth: {top: this.dash_width, bottom: this.dash_width, right: this.dash_width, left: this.dash_width}}) + Column({ space: 8 }) { + Button(' -1 ').onClick(() => { + this.dash_width = '-1' + }).id('UIComponentBorderDashedDashgapDashwidth0020_2') + Button(' 5 ').onClick(() => { + this.dash_width = '5' + }).id('UIComponentBorderDashedDashgapDashwidth0020_3') + Button(' 0.1 ').onClick(() => { + this.dash_width = '0.1' + }).id('UIComponentBorderDashedDashgapDashwidth0020_4') + Button(' 0.05 ').onClick(() => { + this.dash_width = '0.05' + }).id('UIComponentBorderDashedDashgapDashwidth0020_5') + Button(' 20abc ').onClick(() => { + this.dash_width = '20abc' + }).id('UIComponentBorderDashedDashgapDashwidth0020_6') + } + .margin(20) + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b29d102ed1c39ff34cf844001fd912696f5e0a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0030.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0030 { + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + // .borderStyle(BorderStyle.Dashed) + // .borderWidth(1) + .border({width:5, style: BorderStyle.Dashed, dashGap: LengthMetrics.vp(10), dashWidth: LengthMetrics.vp(10)}) + + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad6b722798b3be0e48f3570be33e5871065327d5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0040.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' +import { when } from '@ohos/hypium' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0040 { + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashGap: { left: 10 }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..d90d041458ddcc5cdcb03ff624b3062bd03d57a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0050.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0050 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashGap: { + left:10, + right:20, + top:30, + bottom:40 + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..a61cbf453f5c128a7063cd8b0fba347359553afd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0060.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0060 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashGap: { + top:LengthMetrics.lpx(1), + end:LengthMetrics.px(5), + bottom:LengthMetrics.fp(10), + start:LengthMetrics.vp(15) + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..5dd5d1e850a04d7ce728e99c87732b3e549482f5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0070.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0070 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashGap: { + top: LengthMetrics.percent(0.3), + end: LengthMetrics.percent(0.2), + bottom: LengthMetrics.percent(0.4), + start: LengthMetrics.percent(0.1) + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..d41caa532889b2107c66a79104cf38c5799513a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0080.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIComponentBorderDashedDashgapDashwidth0080 { + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + .border({width:5, style: BorderStyle.Dashed, dashWidth: { left: '10vp' }}) + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec7ade770cba3bc0e2c5eb36866a569467675eff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0090.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIComponentBorderDashedDashgapDashwidth0090 { + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + .border({width:5, style: BorderStyle.Dashed, dashWidth: { left: 10, right: 20, top: 30, bottom: 40 }}) + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c0e5c118a2768615257f690d2ae49e17a940bf4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0100.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0100 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashWidth: { + top:LengthMetrics.lpx(1), + end:LengthMetrics.px(5), + bottom:LengthMetrics.fp(10), + start:LengthMetrics.vp(15) + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..ccb80b5eec4f61aeb898eb88ed39c9783f3f44a3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0110.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0110 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashWidth: { + top: LengthMetrics.percent(0.3), + end: LengthMetrics.percent(0.2), + bottom: LengthMetrics.percent(0.4), + start: LengthMetrics.percent(0.1) + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6c43d824b3fb0a32d68cc20a152c7e7c8ae748a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0120.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0120 { + + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashWidth: { + top: LengthMetrics.vp(0), + end: LengthMetrics.px(-1), + bottom: LengthMetrics.vp(5), + start: LengthMetrics.vp(0.05) + }, + dashGap: { + top:LengthMetrics.lpx(0), + end:LengthMetrics.px(-1), + bottom:LengthMetrics.fp(5), + start:LengthMetrics.vp(0.05) + }, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..99d7bcab67f92d349050886d1a265e6c0794283e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0130.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0130 { + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(400) + .height(200) + .borderStyle(BorderStyle.Solid) + .border({width: 5, dashGap: LengthMetrics.vp(0), dashWidth: LengthMetrics.vp(0)}) + + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d75f4a2c1cdfe35756566c5318814e4d8912248 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0140.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0140 { + + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(300) + .height(200) + .borderWidth(5) + .border({ style: BorderStyle.Dotted, dashGap: LengthMetrics.vp(0), dashWidth: LengthMetrics.vp(0)}) + .border({ style: BorderStyle.Dotted, dashGap: LengthMetrics.vp(-1), dashWidth: LengthMetrics.vp(-1)}) + .border({ style: BorderStyle.Dotted, dashGap: LengthMetrics.vp(5), dashWidth: LengthMetrics.vp(5)}) + .border({ style: BorderStyle.Dotted, dashGap: LengthMetrics.vp(0.05), dashWidth: LengthMetrics.vp(0.05)}) + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..035988277d55da998fcdaec8a553a6a3b47866cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0150.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@ohos.arkui.node' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0100 { + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build() { + Column() { + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller, + }) + .border({ + style: BorderStyle.Dashed, + dashWidth: LengthMetrics.vp(10), + dashGap: LengthMetrics.vp(10), + radius: 5, + color: Color.Yellow, + width: 5 + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + }.width('100%').height('100%').backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8e9a37636ff3fa15045db805ce95cf21d9d08bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0160 { + @State areaWidthHeight:number = 400 + build() { + Column() { + TextArea({ placeholder: "请输入...", text: 'This is TextArea'}) + .width(this.areaWidthHeight) + .height(this.areaWidthHeight) + .border({width:5, style: BorderStyle.Dashed, dashGap: LengthMetrics.vp(10), dashWidth: LengthMetrics.vp(10)}) + Button("改变TextArea宽高").onClick(() => { + this.areaWidthHeight = 300 + }).id("UIComponentBorderDashedDashgapDashwidth0160") + + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..7009b418f5d0bc406d7f35884a6c989c7a663997 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0170.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 UIComponentBorderDashedDashgapDashwidth0170 { + + build() { + Column() { + Text("Text") + .fontSize(50) + .width(300) + .height(100) + .border({ width: 2,color: Color.Red, style: BorderStyle.Dashed, dashGap: { top: 10, bottom: 20, right: 10, left: 10 }}) + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..15b911b5e4f897f22d2c2ffecdaea2cf79af7ea9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0190.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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. + */ + +class MyButtonModifier implements AttributeModifier { + // isDark: boolean = false + applyNormalAttribute(instance: ButtonAttribute): void { + instance.border({width: 5, style: BorderStyle.Dashed, dashGap: {left:10,right:10,top:10,bottom:20}, + dashWidth: {left:10,right:10,top:10,bottom:20}, + color: Color.Yellow}) + + } +} + +@Entry +@Component +struct UIComponentBorderDashedDashgapDashwidth0190 { + @State modifier: MyButtonModifier = new MyButtonModifier() + + build() { + Column() { + Button("Button") + .width(300) + .height(100) + .attributeModifier(this.modifier) + } + .width('100%') + .margin({top: 30}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..639f569f0927fbdf1aeaaf73dd0802d46fa79dc1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0110.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvas0ffscreencanvas0110 { + private settings: RenderingContextSettings = new RenderingContextSettings(); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + ctx.reset() + ctx.fillRect(100, 150, 150, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ee51c5c82d02814e36972c2e02ad5e6d6b8c02f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0120.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvas0ffscreencanvas0120 { + private settings: RenderingContextSettings = new RenderingContextSettings(false); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + ctx.reset() + ctx.fillRect(100, 150, 150, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..870e7b26f209523789a58cc48eb148c001073c52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0130.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvas0ffscreencanvas0130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + ctx.reset() + ctx.fillRect(100, 150, 150, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw0690.ets new file mode 100644 index 0000000000000000000000000000000000000000..8866276ab5b1c43c9e510e78f26c69370f101ec7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw0690.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw0690 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.transform(1, 0.5, -0.5, 1, 20, 20) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(0, 0, 100, 100) + offContext.transform(1, 0.5, -0.5, 1, 20, 20) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(0, 0, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1360.ets new file mode 100644 index 0000000000000000000000000000000000000000..e19f4a827e84abafefff2b1b34d411ec6fe11ef7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1360.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw1360 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 0 + offContext.strokeRect(25, 25, 85, 105) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1620.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4b607e0bd4ff7417a92c70a949e9dcd447ff8ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1620.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw1620 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.shadowBlur = 30 + this.context.shadowColor = 'css:"yellow"' + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(30, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2590.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0e015beb909ca09aababc25a5a462b4e7105652 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2590.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw2590 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + //绘制填充类文本 + this.context.font = '50px sans-serif'; + this.context.fillText("Hello World!", 50, 100, 300); + }) + + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2600.ets new file mode 100644 index 0000000000000000000000000000000000000000..137ef206959c9e6b2c9ccb67d81dc79fb249e521 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2600.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw2600 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + //绘制填充类文本 + this.context.font = '50px sans-serif'; + this.context.fillText("Hello World!", 50, 100, 750); + }) + + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2770.ets new file mode 100644 index 0000000000000000000000000000000000000000..b51f6d582c1d46b4c0ad6363a9cf155023a4f9d7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2770.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw2770 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + this.context.font = '50px sans-serif'; + //绘制描边类文本 + this.context.strokeText("Hello World!", 50, 100); + }) + + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2780.ets new file mode 100644 index 0000000000000000000000000000000000000000..939490d4c0d373fb7364724afa0d91771c4b080b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2780.ets @@ -0,0 +1,24 @@ +@Entry +@Component +struct UIComponentCanvasOffecreencanvasGpuDraw2780 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + this.context.font = '50px sans-serif'; + //绘制描边类文本 + this.context.strokeText("Hello World!", -50, 100); + }) + + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2790.ets new file mode 100644 index 0000000000000000000000000000000000000000..3677eaacc56c9ed59998965404deba8c5dcb67db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2790.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasOffecreencanvasGpuDraw2790 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + this.context.font = '50px sans-serif'; + //绘制描边类文本 + this.context.strokeText("Hello World!", -50, 750); + }) + + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..a09fb25781be0ae4754eb7434033b48a2137d64d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0010.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0010 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + ctx.reset() + ctx.fillRect(100, 150, 150, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8aa5989a413038384656cec7018e2fd9c26c069 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0020.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0020 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = 0 + ctx.strokeRect(25, 25, 85, 105) + ctx.reset() + ctx.strokeRect(25, 25, 85, 105) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b5ac6832908ce327cdaf8106cbc5e7dd0533f22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0030.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0030 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = -10 + ctx.strokeRect(25, 25, 85, 105) + ctx.reset() + ctx.strokeRect(25, 25, 85, 105) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fcf417c4d7996bb59edcbe00aa74f360bb2070e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0040.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0040 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = 10 + ctx.strokeRect(25, 25, 85, 105) + ctx.reset() + ctx.strokeRect(25, 25, 85, 105) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a34dbadbf32433c9a3b948dbb1b5161d1b2f73a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0050.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 { ResizeDirection } from '@kit.TestKit'; + +@Entry +@Component +struct UIComponentCanvasReset0040 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = 10 + ctx.strokeStyle ="red" + ctx.strokeRect(100, 100, 155, 105) + ctx.reset() + ctx.lineWidth = 10 + ctx.strokeRect(100, 100, 155, 105) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ffdc7d6e3ec6378a817ca2b13cd2090cef372db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0060.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0060 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = 10 + ctx.beginPath() + ctx.lineCap = 'round' + ctx.moveTo(30, 50) + ctx.lineTo(220, 50) + ctx.stroke() + ctx.reset() + ctx.lineWidth = 10 + ctx.beginPath() + ctx.moveTo(30, 50) + ctx.lineTo(220, 50) + ctx.stroke() + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0b1f5adb544f6d50e5db5c0a2ed293e6bce92db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0070.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0070 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.lineWidth = 10 + ctx.beginPath() + ctx.lineJoin = 'round' + ctx.moveTo(30, 30) + ctx.lineTo(120, 60) + ctx.lineTo(30, 110) + ctx.stroke() + ctx.reset() + ctx.lineWidth = 10 + ctx.beginPath() + ctx.moveTo(30, 30) + ctx.lineTo(120, 60) + ctx.lineTo(30, 110) + ctx.stroke() + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..7742b9f0c023fcfa0c8d7a104a2d412865796ee3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0080.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0080 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '30vp sans-serif'; + ctx.fillText("Hellovp", 200, 100); + ctx.reset() + ctx.fillText("Hellovp",200,100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..07cb6de0a9c16530c14d2fb20f34b5b0dbe7f882 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0090.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0090 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.textAlign = 'center' + ctx.fillText("textAlign=center", 140, 120); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("textAlign=center", 140, 120); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b56668ce7013d2aadc490bd72c07367916d5359 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0100.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0100 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.strokeStyle="#0000ff" + ctx.textBaseline='hanging' + ctx.fillText("hanging", 295, 120); + ctx.moveTo(0,120) + ctx.lineTo(400,120) + ctx.stroke() + ctx.reset() + ctx.font = '48px serif'; + ctx.strokeStyle="#0000ff" + ctx.fillText("hanging", 295, 120); + ctx.moveTo(0,120) + ctx.lineTo(400,120) + ctx.stroke() + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..11a0d81efc330262fc62f453c07e9eeba35f639a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0110.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0110 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + + ctx.fillStyle = 'rgb(0,0,255)' + ctx.fillRect(100, 50, 50, 50) + ctx.globalAlpha = 0.2 + ctx.fillStyle = 'rgb(0,0,255)' + ctx.fillRect(150, 100, 50, 50) + ctx.reset() + ctx.fillStyle = 'rgb(0,0,255)' + ctx.fillRect(150, 50, 50, 50) + ctx.fillStyle = 'rgb(0,0,255)' + ctx.fillRect(200, 100, 50, 50) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ee3b73e70ecab54cc05e5d9251a5a2951fce4ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0120.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0120 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.arc(100, 100, 50, 0, 8) + ctx.setLineDash([30,40]) + ctx.lineDashOffset = 10 + ctx.stroke() + ctx.reset() + ctx.arc(100, 100, 50, 0, 8) + ctx.setLineDash([30,40]) + ctx.stroke() + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..b07a7c506656ebc91c349ef1fa9410143325109c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0130.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(120, 20, 50, 50) + ctx.globalCompositeOperation = 'destination-out' + ctx.fillStyle = '#ff0eef11' + ctx.fillRect(150, 50, 50, 50) + ctx.reset() + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(120, 20, 50, 50) + ctx.fillStyle = '#ff0eef11' + ctx.fillRect(150, 50, 50, 50) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..96cbf17e45371f6cf6c07368c425633294c7eaf4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0140.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0140 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.shadowBlur = 30 + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 80, 100, 100) + ctx.reset() + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 80, 100, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c862d710dc2d7a27fc5fb3fdf2401bbd03db636 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0150.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0150 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.shadowColor = 'rgb(0,0,255)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 80, 100, 100) + ctx.reset() + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 80, 100, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d0e5cd178144bbeb2de8e8f2fe32ce0cc2b0855 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0160.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0160 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.shadowBlur = 10 + ctx.shadowOffsetX = 30 + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 100, 100, 80) + ctx.reset() + ctx.shadowBlur = 10 + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 100, 100, 80) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..286a6d7833e7ae19cd77f88e5fe21459e89c3d47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0170.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0170 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.shadowBlur = 10 + ctx.shadowOffsetY = 30 + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 100, 100, 80) + ctx.reset() + ctx.shadowBlur = 10 + ctx.shadowColor = 'rgb(0,0,0)' + ctx.fillStyle = 'rgb(255,0,0)' + ctx.fillRect(100, 100, 100, 80) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..e3f3f4fb32461e5578f35c8d8280e1281c4f2fb9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0180.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0180 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.imageSmoothingEnabled = false + ctx.fillStyle = "#f00" + ctx.fillRect(100, 100, 100, 100) + ctx.reset() + ctx.fillStyle = "#f00" + ctx.fillRect(100,100,100,100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..de18fce800c25864fd148c3b3457f8c825593d61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0190.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0190 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.font = '48px serif'; + ctx.direction = "rtl"; + ctx.fillText("Hi rtl!", 200, 100); + ctx.reset() + ctx.font = '48px serif' + ctx.fillText("你好!", 200, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..4caea5db2bb726486580fe0f569cd72e9a025b0b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0200.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0200 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.fillRect(100,100,50,300) + ctx.reset() + ctx.fillRect(100,100,300,300) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..9bfebc8529b80bb179e4390e62b2d6e9e687639b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0210.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0210 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext; + ctx.font = '48px serif'; + ctx.fillText("Hi rtl!", 20, 100); + ctx.reset(); + ctx.font = '48px serif'; + ctx.fillText("你好!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e45c51457666c5e263a35a8d113f278d4e7c530 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0220.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0220 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = + new OffscreenCanvasRenderingContext2D(500, 500, this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.offcontext + ctx.imageSmoothingQuality = 'high' + ctx.fillStyle = "#f00" + ctx.fillRect(100, 100, 100, 100) + ctx.reset() + ctx.fillStyle = "#f00" + ctx.fillRect(100,100,100,100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..231dfed402a0ea9bfaacd0b74c8b07d6ffb74a6d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0230.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0230 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offcontext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offcontext + ctx.filter ='invert(100%)'; + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + ctx.reset() + ctx.fillStyle = 'red' + ctx.fillRect(100, 20, 150, 100) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..872d64fc1f8264aee6ea75dcb5986b164de8a2be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0240.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0240 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.moveTo(20, 20); + ctx.fillText("Hi stroke!", 20, 100); + ctx.reset(); + ctx.font = '48px serif'; + ctx.lineTo(90, 90); + ctx.stroke(); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..5fe17553b612421e40f2504a87bb1fd639001ac9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0250.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0250 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.lineTo(20, 20); + ctx.fillText("Hi stroke!", 20, 100); + ctx.reset(); + ctx.font = '48px serif'; + ctx.moveTo(30, 30); + ctx.stroke(); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..846dd051989ede59950a2acd4f7411839cf53216 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0260.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0260 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.rotate(45 * Math.PI / 180); + ctx.fillText("Hi rotate!", 20, 100); + ctx.reset(); + ctx.font = '48px serif'; + ctx.fillText("Hi rotate!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..7878c6f63fd8406f1d04d47e32110679e68e58a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0270.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0270 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.scale(2, 2); + ctx.fillText("Hi scale!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("Hi scale!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..894d89f6e4ddd75d19dface0f7fcb6304e8bb5de --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0280.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0280 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.translate(70, 70); + ctx.fillText("Hi translate!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("Hi translate!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2743b7fc10cb218ad71a66571adbfe650bdd755 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0290.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0290 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.transform(1,0.5, -0.5, 1, 10, 10); + ctx.fillText("Hi transform!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("Hi transform!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..89b18f32c9c439d815f9719f59ae6b33288b9ff8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0300.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0300 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.setTransform(1,0.5, -0.5, 1, 10, 10); + ctx.fillText("Hi setTransform!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("Hi setTransform!", 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..d950d572ed0253f59028cafd0dcc394c61ba301b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0310.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0310 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.transform(1,0.5, -0.5, 1, 10, 10); + ctx.fillText("Hi setTransform!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + let storedTransform = ctx.getTransform(); + ctx.fillText("Hi setTransform!", 20, 100); + ctx.setTransform(storedTransform); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..00df0aa5c1cfe0be29d2cc8962b0f3e29d93686d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0320.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0320 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.transform(1,0.5, -0.5, 1, 10, 10); + ctx.reset(); + ctx.font = '48px serif'; + let pixelmap = ctx.getPixelMap(150, 150, 130, 130) + ctx.setPixelMap(pixelmap); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..950f59d89d1ec8b1c01ee73336ac44a027732858 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0330.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0330 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.transform(1,0.5, -0.5, 1, 10, 10); + ctx.reset() + ctx.font = '48px serif'; + let imagedata = ctx.getImageData(50,50,130,130) + ctx.putImageData(imagedata,150,150) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..b374c6ab232fcda5698280d0e19a17394c47a95a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0340.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0340 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.reset() + ctx.font = '48px serif'; + let res = ctx.getLineDash() + ctx.fillText(JSON.stringify(res), 20, 100); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..c41e36c8a0c9c31aa15985b0dcaef677033f231e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0350.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0350 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(100, 100) + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + let offContext1 = this.offCanvas.getContext("2d", this.settings); + offContext1.fillRect(0,0,100,100); + this.dataURL = offContext1.toDataURL(); + ctx.reset(); + ctx.font = '48px serif'; + ctx.fillText(this.dataURL, 20, 200); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..5424f1ad10b5f7aa1275349b10f7c18dc2307cac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0360.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0360 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.fillText("Hi measureText!", 20, 100); + ctx.reset() + ctx.font = '48px serif'; + ctx.fillText("width:" + this.context.measureText("Hello World!").width, 20, 200) + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0fcce0da5e1180c0cd87501d707ecb7c69cb7c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0370.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0370 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '48px serif'; + ctx.setLineDash([10,20]); + ctx.reset() + ctx.font = '48px serif'; + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e556e8a239af8cc6f8ae107a3ae782a2cb4230b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0380.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIComponentCanvasReset0380 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(500, 300, this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.offContext + ctx.font = '25px serif'; + ctx.fillText(`reset方法通常意味着清除当前状态、配置或数据,`, 10, 100); + ctx.fillText(`并恢复到一个已知且预定义的状态。`, 10, 150); + ctx.fillText(`这种方法在需要重启设备、重置配置或清除数据时非常有用。`, 10, 200); + let image = ctx.transferToImageBitmap(); + this.context.transferFromImageBitmap(image); + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGraphicCanvasThread/UIComponentGraphicCanvasThread0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGraphicCanvasThread/UIComponentGraphicCanvasThread0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..1241fdc6b6795886c8e4f91a4d74fece80ea7a1f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGraphicCanvasThread/UIComponentGraphicCanvasThread0040.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIComponentGraphicCanvasThread0040 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .onReady(() => { + this.context.fillStyle = 0x0000FF + this.context.fillRect(20, 20, 150, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3699bc6069910a156f47692d5d312102b7a6128 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0010.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0010 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin({left:150}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..810a35659864b23108bfe34dc062f0fcfbd6762d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0020.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0020 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 0, + gutter:{x:'30%',y:'30%'}, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('90%') + .height(200) + .margin({left:150}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..592f39312264230b201a3b62a9bb32ccc2e33e79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0030.ets @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0030 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + .onBreakpointChange((breakpoint) => { + this.currentBp = breakpoint + }) + + Text(this.currentBp).fontSize(48) + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cc2235352e4da2b06488bd978b6c9ced1e81f68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0040.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0040 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["-50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..f29dc5414dde321523a4ef891a122393bb58ad4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0050.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0050 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["-50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed8e9753dbd09843981f30fc311d45edc3de81f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0060.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0060 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('350pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcb1803863ced9d3ea7661dc5818cd1cf3c8ab60 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0070.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0070 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..4bb9d24bfe1e660fc459d4a7abcd8ecfbdb2c5ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0080.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0080 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["100vp", "200vp",], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('50pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..adc2ed0784709750ab472775f6fd4621f42b8ad6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0090.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0090 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["100vp", "200vp",], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('50pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..14acd8936d808b621dcc6970a3a5b406862e64bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0100.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0100 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["100vp", "200vp",], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('50pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..34eea01ebf478d3f07ac071ee329829d7058bc7f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0110.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0110 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp","350vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..2aa4c92431858d9fbfecffe39cefbb078571aadb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0120.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0120 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","100vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..38a4ff24579e15ac4d0e8d99a19f6f0431b93912 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0130.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0130 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["-50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ec1f3d599b74aac667a25cf2d336dc48303b19d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0140.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0140 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + gutter: {x:'30%', y:'30%'}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('90%') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a47147d2751cd9fe77b41938e9854bde1eb503d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0150.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0150 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: {x:0, y:10}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c9414e5abf12786647b14fe5e428ea0be2dfbee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0160.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0160 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: {x:-20, y:10}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..9045b096abc4940c43d74db3a35d664883041aea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0170.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0170 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: {x:10, y:10}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..74484b7cbd4afb13046527bda995363ab1490317 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0180.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0180 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: {x:"30%", y:"30%"}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5c583d9825473e894349414e04c25369014594d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0190.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0190 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: {x:"80px", y:'80px'}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6df896dc9d9014a6a6d306b8dbf1603f9331bc2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0200.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0200 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { y:10}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..c24fb9b16bde73a12398cbb0f1cfe31a74bc2463 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0210.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0210 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..6dec222b22e23a2d77553706ad8438e0dacab4c1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0220.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0220 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { x:10}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..a64a5d78b47bfa7e01f58b52c0ec8590bb71aa66 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0230.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0230 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: $r('app.media.icon'), + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..2037e7878afae34027e7a334222cf0a670cfedc0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0240.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0240 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: 0, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5c1ff3c27766b26a97aa6a8e0fc32f978d1ad86 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0250.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0250 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: '50px', + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..b956028febb2b1390870733590cd866cdd1daa22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0260.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0260 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: 5, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d3156e19cc8a4f66befef57bf499119700774a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0270.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0270 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter:"30%", + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..2763adda39cf1584b397c88f0368f91d431e4c68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0280.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0280 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter:-10, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..6570e965f2c733fe001e57afe7d9175ea6568284 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0290.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0290 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns:5, + gutter:{x:'30%',y:'30%'}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('90%') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..4399145ad67be58abb85e4237b076bfc06ba0f4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0300.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0300 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns:-1, + gutter:{x:'30%',y:'30%'}, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('90%') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9f9d56040aade02902eb2dae1ea3f2f6edcc257 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0310.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0310 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('100pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..0be4f8364a26b2f43557f2729fbaa45dc186534a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0320.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0320 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('150pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..388118774e3dcb2fc78b598f077f0973282f7eb9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0330.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0330 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('50pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..718f3abe9b3b8b80b196af9dc03911bccc4ec26c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0340.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0340 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('30pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..334a57d2bc34504d2a285e33130555b1ee5bff02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0350.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0350 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('200pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..f77718d5da039d22b7e82bf12ad698ac56ef8dcd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0360.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0360 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { + x: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + }, + y: { + xs: 5, + sm: 10, + md: 15, + lg: 20, + xl: 25, + xxl: 30 + } + }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..f89f17d5df5f853a5eab18f51e2ce672a09dc021 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0370.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0370 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..620c91b1e54f1eb67ae8568bbb3efc0e56e0e9dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0380.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0380 { + @State currentBp: string = '' + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + + GridCol({ span: 3 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('320pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..5260e3744233a943ec9cf8a568d04975c9c694ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0390.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0390 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol() { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f358a0cadc10c11e1d12667cd6deb6689972bbf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0400.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0400 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({span:2}) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8939e09cc5bd41b3ae34d36f336751f45ed439a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0410.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0410 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey] + + build() { + Column() { + GridRow({ + columns:6, + gutter:{x:10,y:10}, + breakpoints:{value: ["50vp","100vp","150vp","200vp","300vp"],reference:BreakpointsReference.ComponentSize}, + direction:GridRowDirection.Row + }){ + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 8, offset: 0, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + .width(300) + .height(200) + .backgroundColor(0xAFEEEE) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..07822f5392e9ab5481ca58f46affc9763c4c562f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0420.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0420 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp"], reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width(80).height("20vp") + }.borderColor(color).borderWidth(2) + }) + }.width("100%").height("100%") + } + .width('100vp') + .height(200) + .margin({ top: 30 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..a7dd43a16c7b8d0a4cbcf2328b5b1296d67d8557 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0430.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0430 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('100vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..106f2a203f21f5b95558adb759d9658644dc525c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0440.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0440 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('150vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d39a94ba614ad5d246f57234eb712ac6f47e8cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0450.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0450 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('80vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f0af50fc278c70a16dfbd6dc87f0bba5e93e4da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0460.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0460 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('40vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0fcaa6db1527b3a842f19137c00abc782c74e08 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0470.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0470 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('200vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0480.ets new file mode 100644 index 0000000000000000000000000000000000000000..1719547701392b092bd3e6b83c12f28b2836d7eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0480.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0480 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('300vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e0b1151d5674846be9a4a0eb36613de0f02f968 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0490.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0490 { + @State currentBp: string = '' + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('120pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..68e9f2958364b19255d9f3a613d378b1ff84add8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0500.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0500 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ + span: 2, + offset: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 3 + } + }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('180pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..300b32dfdea655b65e7f30d57283ec8d7fadeb36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0510.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0510 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + } + + }.width('150pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..88da14cdfc386619f0e97e7b3865a8d06dd0fcf0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0520.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0520 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + } + + }.width('200pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..77cf2cefc1b7797829ad1324d35adb2d95e8e4cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0530.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0530 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 2, order: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 3 } }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('80pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..39e4907c5d973078890131386f9cec70f9fc077a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0540.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0540 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + } + + }.width('80pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7672bba8642926705549ed89f15937281ad30d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0550.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0550 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ + span: 2, + offset: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 3 + } + }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('40pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0560.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ee55971900ae22087748181a1df0995983d3d94 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0560.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0560 { + @State currentBp: string = '' + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('40pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..276c8000e342716b7fcd7bec8e73f9b9d484dbd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0570.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0570 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp","100vp", "150vp","200vp","300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({span:2,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:3} }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('250pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce9582cb5a15adfcbf2354093e54ef4da1dcbc59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0580.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0580 { + @State currentBp: string = '' + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0590.ets new file mode 100644 index 0000000000000000000000000000000000000000..61d4187cd195350d88daed19f1c6fc6fde6b6cb5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0590.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0590 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4, xl: 5, xxl: 6 }, offset: 0, order: 0 }) { + Row().width("30vp").height("20vp") + }.backgroundColor(color) + }) + } + } + .width('120vp') + .height(200) + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0600.ets new file mode 100644 index 0000000000000000000000000000000000000000..06b88ac414a79e5ded775ff2b53b7ef226c41e89 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0600.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0600 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + GridCol({ span: 3,order:{xs:1,sm:2,md:3,lg:4,xl:5,xxl:-6} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:2,sm:3,md:4,lg:5,xl:0,xxl:1}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 ,order:{xs:3,sm:1,md:5,lg:-3,xl:1,xxl:2}}) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3,order:{xs:5,sm:4,md:3,lg:2,xl:5,xxl:-1} }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + } + + }.width('320pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0610.ets new file mode 100644 index 0000000000000000000000000000000000000000..89c34becff439de100c778eca7a5832cf4119d4d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0610.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0610 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 2, offset: -1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0620.ets new file mode 100644 index 0000000000000000000000000000000000000000..cef5da130498053fe475c2a3ab9374fe8e1efc12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0620.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0620 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 2, offset: 0 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0630.ets new file mode 100644 index 0000000000000000000000000000000000000000..f045dbb158bf5b733bb0dad9ed1e18af6e6265f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0630.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0630 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 2, offset: 1 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0640.ets new file mode 100644 index 0000000000000000000000000000000000000000..0df66b09114cd1ef2660309211675093d79e0af5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0640.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0640 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 3, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + }.width('320pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0650.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8931efabbcc0fa1c2b03670ab3bdfb9cfc8cb8b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0650.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0650 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 3, order: 2 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3, order: -1 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('320pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0660.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca5bc672549b29cce6a4b12e1d539f56f836c3b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0660.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0660 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + build() { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 3, order: -1 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Pink).borderWidth(2) + + GridCol({ span: 3, order: -1 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Black).borderWidth(2) + + GridCol({ span: 3, order: -1 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Green).borderWidth(2) + + GridCol({ span: 3, order: -1 }) { + Row().width("100%").height("20vp") + }.borderColor(Color.Yellow).borderWidth(2) + }) + } + + }.width('320pv') + .height(200) + .margin(30) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0670.ets new file mode 100644 index 0000000000000000000000000000000000000000..391e9b0f8a1a257bfc8feb4f21acb2d6107df40d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0670.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0670 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 0 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0680.ets new file mode 100644 index 0000000000000000000000000000000000000000..76d63d7a3ea14038cc7f82c68cefcd1af63a2bf4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0680.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcolInterface0680 { + @State bgColors: Color[] = + [Color.Red, Color.Orange, Color.Black, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + GridRow({ + columns: 6, + gutter: { x: 10, y: 10 }, + breakpoints: { + value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize + }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: -2 }) { + Row().width("30vp").height("20vp") + }.borderColor(color).borderWidth(2) + }) + } + + }.width('300pv') + .height(200) + .margin(30) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..a40bde73b454fecdd005bf3cb79681c8e1b61070 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0010.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0010 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = 'unknown' + + build() { + Column() { + GridRow({ + columns: { xs: 1, sm: 2, md: 3, lg: 4 }, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span:1, offset: 0, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(color).borderWidth(2) + }) + }.width("100%").height("100%") + .onBreakpointChange((breakpoint) => { + this.currentBp = breakpoint +}) +}.width('80vp').margin({ left: 10, top: 5, bottom: 5 }).height(200) + .border({ color: '#880606', width: 2 }) +} +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfe52150b0fbd5537c52a4d6ea76c085006ed10e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0020.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0020 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = 'unknown' + + build() { + Column() { + GridRow({ + columns: { + xs: 1, + sm: 2, + md: 3, + lg: 4, + xl: 5, + xxl: 6 + }, + gutter: { x: 10, y: 10 }, + breakpoints: { value: ["50vp", "100vp", "150vp", "200vp", "300vp"], + reference: BreakpointsReference.ComponentSize }, + direction: GridRowDirection.RowReverse + }) { + ForEach(this.bgColors, (color: Color) => { + GridCol({ span: 1, offset: 0, order: 0 }) { + Row().width("100%").height("20vp") + }.borderColor(color).borderWidth(2) + }) + }.width("100%").height("100%") + .onBreakpointChange((breakpoint) => { + this.currentBp = breakpoint + }) + }.width('80vp').margin({ left: 10, top: 5, bottom: 5 }).height(200) + .border({ color: '#880606', width: 2 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fe3b081f657c4ac5809bd5e4fffd1c59c27edd6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0030.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0030 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Column() { + GridRow({ columns: 8 }) { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + } + .backgroundColor(item) + }) + } + .alignSelf(ItemAlign.Auto) + } + .height(160) + .border(this.BorderWH) + .width('90%') + .margin({left:10}) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..592af9c6dcb147dcc4f5d74601589b093e071b7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0040.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0040 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Column() { + GridRow({ columns: 8 }) { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + }.backgroundColor(item) + }) + } + .alignSelf(ItemAlign.Baseline) + } + .height(160) + .border(this.BorderWH) + .width('90%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3c4487edac6a369f0e42b175b1946e2420fee44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0050.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0050 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Row() { + GridRow({ columns: 8 }) { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + }.backgroundColor(item) + }) + } + .alignSelf(ItemAlign.Center) + } + .height(160) + .border(this.BorderWH) + .width('90%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..2813bc9ff7cb8d0ac5652d493d4870d207440dd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0060.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0060 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Row() { + GridRow({ columns: 8 }) { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + }.backgroundColor(item) + }) + } + .alignSelf(ItemAlign.End) + } + .height(160) + .border(this.BorderWH) + .width('90%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8d689a2c74e304e7c86d16133c3f4009b5f61b3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0070.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0070 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Row() { + GridRow({ columns: 8 }) { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + }.backgroundColor(item) + }) + } + .alignSelf(ItemAlign.Start) + } + .height(160) + .border(this.BorderWH) + .width('90%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d12f98b92bc8925d4ea68192850c764aad4c740 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0080.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIComponentLayoutGridrowgridcollayout0080 { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green] + private BorderWH: Record = { 'color': Color.Blue, 'width': 2 } + + build() { + Row() { + GridRow() { + ForEach(this.bgColors, (item: Color, index?: number | undefined) => { + GridCol() { + Row() { + Text(`${index}`) + }.width('100%').height('50') + }.backgroundColor(item) + }) + } + .alignItems(ItemAlign.Stretch) + } + .height(160) + .border(this.BorderWH) + .width('90%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0600.ets new file mode 100644 index 0000000000000000000000000000000000000000..4195d4358d359d868ff192aa073a4704ffe12f97 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0600.ets @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 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. + */ +@Component +struct PageOneComponent0600 { + private stack: NavPathStack | null = null; + @State eventStr: string = ""; + + build() { + NavDestination() { + Column() { + Text("event: " + this.eventStr) + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + if (this.stack) { + this.stack.pushPath({name: "pageOne"}); + } + }) + Button('pop', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack?.pop() + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.Orange) + } + .title('pageOne') + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + .onAppear(() => { this.eventStr += ""; }) + .onDisAppear(() => { this.eventStr += ""; }) + .onShown(() => { this.eventStr += ""; }) + .onHidden(() => { this.eventStr += ""; }) + // onReady会在onAppear之前调用 + .onReady((ctx: NavDestinationContext) => { + try { + this.eventStr += ""; + this.stack = ctx.pathStack; + } catch (e) { + console.log(`testTag onReady catch exception: ${JSON.stringify(e)}`) + } + }) + } +} + +@Entry +@Component +struct UICustomDrawingSafeareaScene0600 { + private stack : NavPathStack = new NavPathStack(); + + @Builder + PageMap(name: string) { + if (name === 'pageOne') { + PageOneComponent0600() + } + } + + build() { + Navigation(this.stack) { + Stack({alignContent: Alignment.Center}) { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack.pushPath({ name: "pageOne" }) + }) + .id('btn') + } + .width('100%') + .height('100%') + .backgroundColor(Color.Green) + } + .width('100%') + .height('100%') + .navDestination(this.PageMap) + .title('Navigation') + .backgroundColor(Color.Yellow) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0610.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae9f614259b2b7dd352fac6158aee34f49d12387 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0610.ets @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2024 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. + */ +@Component +struct PageOneComponent0610 { + private stack: NavPathStack | null = null; + @State eventStr: string = ""; + + build() { + NavDestination() { + Column() { + Text("event: " + this.eventStr) + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + if (this.stack) { + this.stack.pushPath({name: "pageOne"}); + } + }) + Button('pop', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack?.pop() + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.Orange) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + .title('pageOne') + .onAppear(() => { this.eventStr += ""; }) + .onDisAppear(() => { this.eventStr += ""; }) + .onShown(() => { this.eventStr += ""; }) + .onHidden(() => { this.eventStr += ""; }) + // onReady会在onAppear之前调用 + .onReady((ctx: NavDestinationContext) => { + try { + this.eventStr += ""; + this.stack = ctx.pathStack; + } catch (e) { + console.log(`testTag onReady catch exception: ${JSON.stringify(e)}`) + } + }) + } +} + +@Entry +@Component +struct UICustomDrawingSafeareaScene0610 { + private stack : NavPathStack = new NavPathStack(); + + @Builder + PageMap(name: string) { + if (name === 'pageOne') { + PageOneComponent0610() + } + } + + build() { + Navigation(this.stack) { + Stack({alignContent: Alignment.Center}) { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack.pushPath({ name: "pageOne" }) + }) + .id('btn') + } + .width('100%') + .height('100%') + .backgroundColor(Color.Green) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + .width('100%') + .height('100%') + .navDestination(this.PageMap) + .title('Navigation') + .backgroundColor(Color.Yellow) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0620.ets new file mode 100644 index 0000000000000000000000000000000000000000..26f46b2821c51acb0ae11f86c5ee123ee0fb0a8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0620.ets @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 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. + */ +@Component +struct PageOneComponent0620 { + private stack: NavPathStack | null = null; + @State eventStr: string = ""; + + build() { + NavDestination() { + Column() { + Text("event: " + this.eventStr) + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + if (this.stack) { + this.stack.pushPath({name: "pageOne"}); + } + }) + Button('pop', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack?.pop() + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.Orange) + } + .title('pageOne') + .onAppear(() => { this.eventStr += ""; }) + .onDisAppear(() => { this.eventStr += ""; }) + .onShown(() => { this.eventStr += ""; }) + .onHidden(() => { this.eventStr += ""; }) + // onReady会在onAppear之前调用 + .onReady((ctx: NavDestinationContext) => { + try { + this.eventStr += ""; + this.stack = ctx.pathStack; + } catch (e) { + console.log(`testTag onReady catch exception: ${JSON.stringify(e)}`) + } + }) + } +} + +@Entry +@Component +struct UICustomDrawingSafeareaScene0620 { + private stack : NavPathStack = new NavPathStack(); + + @Builder + PageMap(name: string) { + if (name === 'pageOne') { + PageOneComponent0620() + } + } + + build() { + Navigation(this.stack) { + Stack({alignContent: Alignment.Center}) { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack.pushPath({ name: "pageOne" }) + }) + .id('btn') + } + .width('100%') + .height('100%') + .backgroundColor(Color.Green) + } + .width('100%') + .height('100%') + .navDestination(this.PageMap) + .title('Navigation') + .backgroundColor(Color.Yellow) + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0630.ets new file mode 100644 index 0000000000000000000000000000000000000000..462c12881119fce2070a287ce9c8a8d4677da773 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0630.ets @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 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. + */ +@Component +struct PageOneComponent0630 { + private stack: NavPathStack | null = null; + @State eventStr: string = ""; + + build() { + NavDestination() { + Column() { + Text("event: " + this.eventStr) + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + if (this.stack) { + this.stack.pushPath({name: "pageOne"}); + } + }) + Button('pop', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack?.pop() + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.Orange) + } + .title('pageOne') + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + .onAppear(() => { this.eventStr += ""; }) + .onDisAppear(() => { this.eventStr += ""; }) + .onShown(() => { this.eventStr += ""; }) + .onHidden(() => { this.eventStr += ""; }) + // onReady会在onAppear之前调用 + .onReady((ctx: NavDestinationContext) => { + try { + this.eventStr += ""; + this.stack = ctx.pathStack; + } catch (e) { + console.log(`testTag onReady catch exception: ${JSON.stringify(e)}`) + } + }) + } +} + +@Entry +@Component +struct UICustomDrawingSafeareaScene0630 { + private stack : NavPathStack = new NavPathStack(); + + @Builder + PageMap(name: string) { + if (name === 'pageOne') { + PageOneComponent0630() + } + } + + build() { + Navigation(this.stack) { + Stack({alignContent: Alignment.Center}) { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack.pushPath({ name: "pageOne" }) + }) + .id('btn') + } + .width('100%') + .height('100%') + .backgroundColor(Color.Green) + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + } + .width('100%') + .height('100%') + .navDestination(this.PageMap) + .title('Navigation') + .backgroundColor(Color.Yellow) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0640.ets new file mode 100644 index 0000000000000000000000000000000000000000..31a096a323babeb17a0d42d1c65e424101e7a957 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0640.ets @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 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. + */ +@Component +struct PageOneComponent0640 { + private stack: NavPathStack | null = null; + @State eventStr: string = ""; + + build() { + NavDestination() { + Column() { + Text("event: " + this.eventStr) + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + if (this.stack) { + this.stack.pushPath({name: "pageOne"}); + } + }) + Button('pop', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack?.pop() + }) + } + .width('100%') + .height('100%') + .backgroundColor(Color.Orange) + } + .title('pageOne') + .expandSafeArea([SafeAreaType.KEYBOARD], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) + .onAppear(() => { this.eventStr += ""; }) + .onDisAppear(() => { this.eventStr += ""; }) + .onShown(() => { this.eventStr += ""; }) + .onHidden(() => { this.eventStr += ""; }) + // onReady会在onAppear之前调用 + .onReady((ctx: NavDestinationContext) => { + try { + this.eventStr += ""; + this.stack = ctx.pathStack; + } catch (e) { + console.log(`testTag onReady catch exception: ${JSON.stringify(e)}`) + } + }) + } +} + +@Entry +@Component +struct UICustomDrawingSafeareaScene0640 { + private stack : NavPathStack = new NavPathStack(); + + @Builder + PageMap(name: string) { + if (name === 'pageOne') { + PageOneComponent0640() + } + } + + build() { + Navigation(this.stack) { + Stack({alignContent: Alignment.Center}) { + Button('pushPath', { stateEffect: true, type: ButtonType.Capsule }) + .width('80%') + .height(40) + .margin(20) + .onClick(() => { + this.stack.pushPath({ name: "pageOne" }) + }) + .id('btn') + } + .width('100%') + .height('100%') + .backgroundColor(Color.Green) + } + .width('100%') + .height('100%') + .navDestination(this.PageMap) + .title('Navigation') + .backgroundColor(Color.Yellow) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..804e6b85a6d751b17775963afa81d81410624521 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0010.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0010 { + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..420d51e2f13575e49c27c788a28ad16f45e3d8be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0020.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0020 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + bias: { vertical: -1, horizontal: 1 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..6112c039ec20d91e723a5333e0d4835ace2213f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0030.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0030 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .width(50) + .height(50) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + bottom : {anchor : "__container__", align : VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right : {anchor : "__container__", align: HorizontalAlign.End}, + bias: { vertical: 0 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..c09d39d36a0e040d68e8e560168ebec8692ab511 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0040.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0040 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + bias: { vertical: 1 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbf55fb3d05dea64fd3059accb5ac013488c4827 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0050.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0050 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + bias: { vertical: 1.5 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..317bb160eca91177a94d2432136cf4d08277d6c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0060.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0060 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + bias: { horizontal: 0 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..9fcdb2e352599afb445a5242fe3c0d4dcf968641 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0070.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0070 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + bottom : {anchor : "__container__", align : VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right : {anchor : "__container__", align: HorizontalAlign.End}, + bias : {horizontal : 1} + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..9699c2e43a4b31e0ac12342a29a946048d0b0fe3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0080.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0080 { + build() { + Row() { + RelativeContainer() { + Row().width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + bottom : {anchor : "__container__", align : VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right : {anchor : "__container__", align: HorizontalAlign.End}, + bias : {horizontal : 1.5} + }) + .id("row1") + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5adbe265e3ba74d93d6d226a192abccdde9ce6c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0090.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0090 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + }.width(100).height(100) + .justifyContent(FlexAlign.Center) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: 0.5, horizontal: 0.5 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..527522b6d2db20964dd9fb694ba933146e70ccba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0140.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0140 { + @State data: number = 50 + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#ff33ff3d") + .alignRules({}) + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FFCC007") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FFCC007") + .alignRules({ + top: { anchor: "row2", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + }) + .id("row3") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + .padding(this.data) + Button("marginChange").onClick(() => { + this.data = 0 + }).id("UIRelativecontainerBias0140_1") + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f9e46b4ded8b142d15ad1f57c61d4f3a08bd911 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0170.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0170 { + @State data: number = 50 + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#ff33ff3d") + .alignRules({}) + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FFCC007") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + }) + .id("row2") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + .margin(this.data) + Button("marginChange").onClick(() => { + this.data = 0 + }).id("UIRelativecontainerBias0170_1") + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4b86cbc18efbe5ee9d674e4e5ea9579f10f6a2a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0180.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0180 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row7') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "container_", align: VerticalAlign.Bottom }, + left: { anchor: "container_", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: 0.2, horizontal: 0.8 } + }) + .id("row7") + } + .border({ width: 2, color: "#6699FF" }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..7daa7ef9c616cd33d5048c1d194e9f5a424b4af9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0190.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0190 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "container_", align: HorizontalAlign.Start }, + bias: { vertical: 0 } + }) + .id("row1") + } + .border({ width: 2, color: "#6699FF" }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..c33aba9d10b9820a10ab5db4b6d78cbc4e41fa06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0200.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0200 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "container_", align: VerticalAlign.Bottom }, + left: { anchor: "container_", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: 0.2, horizontal: 0.8 } + }) + .id("row7") + } + .border({ width: 2, color: "#6699FF" }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f123a8873d94b05820545f6614f9530ebd5b21a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0210.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0210 { + @State data: number = 50; + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(this.data) + .height(this.data) + .backgroundColor(Color.Yellow) + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start } + }) + .id("row2") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + + Button('delete').id('UIRelativecontainerBias0210_1') + .onClick(() => { + this.data = 0 + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..d15c06fd997e45d374a100babe3127a66dc52897 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0220.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0220 { + @State data: number = 0; + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(this.data) + .height(this.data) + .backgroundColor(Color.Yellow) + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start } + }) + .id("row2") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + + Button('add').id('UIRelativecontainerBias0220_1') + .onClick(() => { + this.data = 50 + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..189de61b3f96a7d0a7705d44b1fad845298ffc8e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0230.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0230 { + @State data: number = 50; + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(this.data) + .height(this.data) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(this.data) + .height(this.data) + .backgroundColor(Color.Yellow) + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start } + }) + .id("row2") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + + Button('delete').id('UIRelativecontainerBias0230_1') + .onClick(() => { + this.data = 0 + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..19a07217cbbd6cd7035185af180ae7936896b2e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0240.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0240 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "container_", align: VerticalAlign.Bottom }, + left: { anchor: "container_", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: 0.2, horizontal: 0.8 } + }) + .id("row7") + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..c008c4d9888ede87094dc14cd25abb0aa5db47a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0250.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0250 { + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .height(50) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..091f876e93f5fa8c2faa97dab47ca43c3d7c6300 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0260.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0260 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "container_", align: VerticalAlign.Bottom }, + left: { anchor: "container_", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("row7") + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..1246de0aed58363e2c42f77d4c9b5ec41ff013f5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0270.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0270 { + @State data:number = 300; + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#ff33ff3d") + .id("row1") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: 0.2, horizontal: 0.8 } + }) + } + .border({ width: 2, color: "#6699FF" }) + .width(this.data) + .height(this.data) + Button("切换").onClick(() => { + this.data = 200 + }).id("UIRelativecontainerBias0270_1") + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..abfb86970c55339f4dc4bd0b20aaf261d0357466 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0280.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0280 { + build() { + Row() { + RelativeContainer() { + Row() + .width(100) + .height(100) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("row1") + Row() + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("row2") + Row() + .width(100) + .height(100) + .backgroundColor("#FF6633") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.End }, + right: { anchor: "row2", align: HorizontalAlign.Start } + }) + .id("row3") + Row() + .width(100) + .height(100) + .backgroundColor("#FF9966") + .alignRules({ + top: { anchor: "row3", align: VerticalAlign.Bottom }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "row1", align: HorizontalAlign.End } + }) + .id("row4") + Row() + .width(100) + .height(100) + .backgroundColor("#FF66FF") + .alignRules({ + top: { anchor: "row3", align: VerticalAlign.Bottom }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "row2", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("row5") + Row() + .height(50) + .width(50) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "row4", align: VerticalAlign.Top }, + left: { anchor: "row4", align: HorizontalAlign.End }, + right: { anchor: "row5", align: HorizontalAlign.Start }, + bottom: { anchor: "row4", align: VerticalAlign.Bottom }, + bias: { vertical: 0.5, horizontal: 0.5 }, + }) + .id("row6") + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + .margin({left:50,top:80}) + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..f123625517ed43c044428928875435482f4866e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0290.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0290 { + build() { + Row() { + RelativeContainer() { + Row().width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + Row().width(100).height(100) + .backgroundColor("#FFCC00") + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + right: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row2") + Row().width(100).height(100) + .backgroundColor("#FF6633") + .alignRules({ + top: {anchor: "row1", align: VerticalAlign.Bottom}, + left: {anchor: "row1", align: HorizontalAlign.End}, + right: {anchor: "row2", align: HorizontalAlign.Start} + }) + .id("row3") + Row().width(100).height(100) + .backgroundColor("#FF9966") + .alignRules({ + top: {anchor: "row3", align: VerticalAlign.Bottom}, + bottom: {anchor: "__container__", align: VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row1", align: HorizontalAlign.End} + }) + .id("row4") + Row().width(100).height(100) + .backgroundColor("#FF66FF") + .alignRules({ + top: {anchor: "row3", align: VerticalAlign.Bottom}, + bottom: {anchor: "__container__", align: VerticalAlign.Bottom}, + left: {anchor: "row2", align: HorizontalAlign.Start}, + right: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row5") + Row().height(200).width(200) + .backgroundColor("#FF3333") + .alignRules({ + top: {anchor: "row4", align: VerticalAlign.Top}, + left: {anchor: "row4", align: HorizontalAlign.End}, + right:{anchor: "row5", align: HorizontalAlign.Start}, + bottom:{anchor: "row4", align: VerticalAlign.Bottom}, + bias:{vertical:0.5, horizontal :0.5}, + }) + .id("row6") + } + .border({ width: 2, color: "#6699FF" }) + .width(300) + .height(300) + .margin({left:50,top:80}) + .clip(true) + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..a4a5b7d05d5cefcb1319b3a7d94f14f18d8a055e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0300.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 promptAction from '@ohos.promptAction' + +@Entry +@Component +struct UIRelativecontainerBias0300 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .width(100) + .height(100) + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id('row1') + + Row() { + Text('row2') + } + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id('row2') + + Row() { + Text('row3') + } + .width(100) + .height(100) + .backgroundColor("#FF6633") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.End } + }) + .id('row3') + }.width('auto').height('auto').border({ width: 3 }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..8cb82725e7b37dc8dc7e3b9e31fd6549cbdb558a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0310.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 promptAction from '@ohos.promptAction' + +@Entry +@Component +struct UIRelativecontainerBias0310 { + @State num: number[] = [0, 0.3, 0.7, 1] + @State indexnum: number = 0 + + build() { + Column() { + RelativeContainer() { + Row() + .width(50) + .height(50) + .backgroundColor("#FF3333") + .alignRules({ + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { horizontal: this.num[this.indexnum] } + }) + }.width(300).height(300).margin({ left: 100, top: 100 }) + + Button("切换").onClick(() => { + this.indexnum += 1 + promptAction.showToast({ message: 'number数据设置:' + this.indexnum, duration: 400 }) + }) + .id("btnrelativecontainer_bias_310") + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f0bcf44729fc5917e0cc6f56e85c8ebd4c132d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0320.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 promptAction from '@ohos.promptAction' + +@Entry +@Component +struct UIRelativecontainerBias0320 { + @State num: number[] = [0, 0.3, 0.7, 1] + @State indexnum: number = 0 + + build() { + Column() { + RelativeContainer() { + Row() + .width(50) + .height(50) + .backgroundColor("#FF3333") + .alignRules({ + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End }, + bias: { vertical: this.num[this.indexnum] } + }) + }.width(300).height(300).margin({ left: 100, top: 100 }) + + Button("切换").onClick(() => { + this.indexnum += 1 + promptAction.showToast({ message: 'number数据设置:' + this.indexnum, duration: 400 }) + }) + .id("btnrelativecontainer_bias_320") + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4c8e41af61df965483ead0203b0b8ca2e3942ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0330.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0330 { + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .height(50) + .backgroundColor("#ff33ff3d") + .id("row1") + .margin(50) + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..fdd8f8b146e4611bc409066d2d1f32d7f209d41f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0340.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0340 { + + build() { + Column() { + RelativeContainer() { + Button('Button1') + .backgroundColor("#FF3333") + .id("Button1") + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..2192a0d75f128732047491b911b4777cfec5f042 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0350.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0350 { + @State visibilityValue: Visibility = Visibility.Visible; + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#ff33ff3d") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FFCC00") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Top }, + bottom: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + right: { anchor: "row1", align: HorizontalAlign.End }, + bias: { vertical: 5, horizontal: 0.5 } + }) + .id("row2") + .visibility(this.visibilityValue) + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + + Button("切换").onClick(() => { + this.visibilityValue = Visibility.Hidden + }).id("UIRelativecontainerBias0350_1") + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..a11fc409135f54f9e799dde2841d799094c79308 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0360.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0360 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width('50%') + .height('50%') + .backgroundColor("#ff33ff3d") + .alignRules({ + }) + .id("row1") + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width('10%') + .height('10%') + .backgroundColor("#FFCC007") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Top }, + bottom: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + right: { anchor: "row1", align: HorizontalAlign.End }, + bias: { vertical: 0.5, horizontal: 0.5 } + }) + .id("row2") + } + .width('auto') + .height('auto') + } + .width(280) + .height(280) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd37ab2720699e31b9c57237263712b513e54df9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0370.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0370 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row2", align : HorizontalAlign.Start}, + center: {anchor: "__container__", align: VerticalAlign.Center}, + bias : {horizontal : 0} + }) + .id("row1") + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + right: {anchor: "row3", align : HorizontalAlign.Start}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + + Row(){Text('row3')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row3") + } + .margin({left: 50}) + .width(300) + .height(300) + .border({width:2, color: "#6699FF"}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..70cc01390238056e2f6c9bd6ca710fa1c354d175 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0380.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0380 { + build() { + Column() { + RelativeContainer() { + Row() + .width('5%').height('5%') + .backgroundColor("#FFCC00") + .alignRules({ + top: { anchor: "image1", align: VerticalAlign.Bottom }, + center: { anchor: "row1", align: VerticalAlign.Top }, + left: { anchor: "image1", align: HorizontalAlign.End }, + middle: { anchor: "row1", align: HorizontalAlign.Start }, + bias: { vertical: 0, horizontal: 0 } + }) + + }.width('100%') + .height('100%') + }.margin({ left: 50, top: 50 }) + + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..84baeb682c08a0e0f7bb0fa6b6bbef932f274aaf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0390.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0390 { + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width('5%') + .height('5%') + .backgroundColor("#FF3333") + .alignRules({ + top: { anchor: "row1", align: VerticalAlign.Top }, + bottom: { anchor: "row1", align: VerticalAlign.Bottom }, + left: { anchor: "row1", align: HorizontalAlign.Start }, + right: { anchor: "row1", align: HorizontalAlign.End }, + bias: { vertical: 0, horizontal: 0 } + }) + .id("row1") + } + .border({ width: 2, color: "#6699FF" }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8936402461a717b0885d48faa8f6058281986fc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0400.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerBias0400 { + + build() { + Row() { + RelativeContainer() { + + } + .border({ width: 2, color: "#6699FF" }) + .width('auto') + .height('auto') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..6aac5b63c9084f35f62611f5ba5fe2945f343582 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0010.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0010 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline1", direction: Axis.Horizontal, position:{start:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5adb9eff55bb4d9d2df972e7db39b7f719693e3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0020.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0020 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline2", direction: Axis.Vertical, position:{start:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5404837faf412f8c170ce9311227c59109d486c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0030.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0030 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline1", direction: Axis.Horizontal, position:{start:50}}, + {id:"guideline2", direction: Axis.Vertical, position:{start:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c8a1b4a7afe8842be0768381eda251571fc6aca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0040.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0040 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + bottom: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline1", direction: Axis.Horizontal, position:{end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..f481547b69ed61752198bd65628c340693ac7e23 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0050.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0050 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + right: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline2", direction: Axis.Vertical, position:{end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef98b4af67bd786bf147c6821b96d4143368d481 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0060.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0060 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + bottom: { anchor: "guideline1", align: VerticalAlign.Top }, + right: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline1", direction: Axis.Horizontal, position:{end:50}}, + {id:"guideline2", direction: Axis.Vertical, position:{end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa2a3d996f00f9546c9520a3c30f87002d83cac3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0070.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0070 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline1", direction: Axis.Horizontal, position:{start:50,end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..1beffeec9deaff2a06d0c27e4c152a33b8f8b65c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0080.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0080 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline2", direction: Axis.Vertical, position:{start:50,end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..b83bfc89e233fa1a45d72a6f4ccc313e8e298711 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0090.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0090 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:50,end:50}},{id:"guideline2", direction: Axis.Vertical, position:{start:50,end:50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..352bf1cb0782de0cd5c140f7bad3a863bbc75116 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0100.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0100 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:0}}]) + }.margin({ left: 20, top: 20 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..e71318a280cb8ec62ab6762ca852867fbdc1fb78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0110.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0110 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id:"guideline2", direction: Axis.Vertical, position:{start:0}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..b45086bd891334ff0fb97c06e664165ac3cca197 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0120.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0120 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:0}},{id:"guideline2", direction: Axis.Vertical, position:{start:0}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed2b8385b8d3bbf483ddb2b38ebc22456c6a6338 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0130.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0130 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:-50}},{id:"guideline2", direction: Axis.Vertical, position:{start:-50}}]) + }.margin({ left: 100, top: 100 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..c97608f1b6cc8b31a070d5d21e91fbae54d32422 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0140.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0140 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + right: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{end:-50}},{id:"guideline2", direction: Axis.Vertical, position:{end:-50}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..afec4ac274ae46b65f8796ff02cf65f57cf85538 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0150.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0150 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:'50vp'}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e99a5aaff9bc24d224cbdad52eb0ec5ce32b4c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0160.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0160 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:'50px'}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..934d77696dd7fbd3940ecd4980366f7e1c265c97 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0170.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0170 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:'50lpx'}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc7a4bdbbf1da18039e8201e1ed34decedb1f24f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0180.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0180 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Horizontal, position:{start:'50%'}}]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..08133955a51faa3b42283a97977ca1a9107d9973 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0190.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0190 { + @State position_50: Resource = $r('app.string.position_50') + + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top } + }) + .id("bt1") + .borderWidth(5) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .borderColor(Color.Red) + .borderWidth(3) + .guideLine([{ id: "guideline1", direction: Axis.Horizontal, position: { start: this.position_50 } }]) + }.margin(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0e66c2a51ae7cb120521655a2e51f1a37de14c3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0200.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0200 { + build() { + Row() { + RelativeContainer() { + Button("Button") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width('auto') + .height(300) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ + id: "guideline2", + direction: Axis.Vertical, + position: { start: 50 } + }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f5caeb526d57f54f9f195a397d0ac97440ab882 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0210.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0210 { + build() { + Row() { + RelativeContainer() { + Button("Button") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width('auto') + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ + id: "guideline2", + direction: Axis.Vertical, + position: { start: '50%' } + }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d2f1a8073e7663ee13f8ce8dae94399e52ef676 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0220.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0220 { + build() { + Row() { + RelativeContainer() { + Button("Button") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width('auto') + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ + id: "guideline2", + direction: Axis.Vertical, + position: { end: 50 } + }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..477ddbf426b433b42f9bf726eeeac7ed08c8fe86 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0230.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0230 { + build() { + Row() { + RelativeContainer() { + Button("Button") + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start }, + bottom: { anchor: "guideline3", align: VerticalAlign.Top }, + right: { anchor: "guideline4", align: HorizontalAlign.Start }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ id: "guideline1", direction: Axis.Horizontal, position: { start: 100 } }, { + id: "guideline2", + direction: Axis.Vertical, + position: { start: 100 } + }, { id: "guideline3", direction: Axis.Horizontal, position: { end: 100 } }, { + id: "guideline4", + direction: Axis.Vertical, + position: { end: 100 } + }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7d9746eab1432463cc62cb3cbb299c0d21d9b34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0240.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0240 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(200) + .height(200) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + Button("B") + .width(150) + .height(150) + .alignRules({ + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ id: "guideline2", direction: Axis.Vertical, position: { start: 50 } }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..85725c5db03ee0f789f3e2bf4dfe11efe5da461b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0250.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0250 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(200) + .height(200) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .zIndex(2) + Button("B") + .width(150) + .height(150) + .alignRules({ + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + .zIndex(1) + Button("C") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + .zIndex(0) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ id: "guideline2", direction: Axis.Vertical, position: { start: 50 } }]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3405465fceec392879aa19572e2a9ac7a99f390 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0260.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0260 { + @State position1: number = 0; + @State position2: number = 0; + + build() { + Column() { + RelativeContainer() { + Button("Button") + .alignRules({ + left: { anchor: "guideline1", align: HorizontalAlign.Start }, + right: { anchor: "guideline2", align: HorizontalAlign.Start }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ + id: "guideline1", + direction: Axis.Vertical, + position: { start: this.position1 } + }, { + id: "guideline2", + direction: Axis.Vertical, + position: { start: this.position2 } + }]) + Button("按钮1").onClick(() => { + this.position1 = 100; + this.position2 = 200; + }).id("UIRelativecontainerCollaboration0260_1") + Button("按钮2").onClick(() => { + this.position1 = 100; + this.position2 = 100; + }).id("UIRelativecontainerCollaboration0260_2") + Button("按钮3").onClick(() => { + this.position1 = 100; + this.position2 = 50; + }).id("UIRelativecontainerCollaboration0260_3") + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f17d464a20724cd7e264e02bfd611f9240aedb6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0270.ets @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0270 { + @State position1: number = -50; + @State position2: number = -50; + + build() { + Column() { + RelativeContainer() { + Button("Button") + .width(100) + .height(100) + .alignRules({ + left: { anchor: "guideline2", align: HorizontalAlign.Start }, + top: { anchor: "guideline1", align: VerticalAlign.Top }, + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin(50) + .border({ width: 2, color: "#6699FF" }) + .guideLine([{ + id: "guideline1", + direction: Axis.Horizontal, + position: { start: this.position1 } + }, { + id: "guideline2", + direction: Axis.Vertical, + position: { start: this.position2 } + }]) + Button("按钮2").onClick(() => { + this.position1 = -20; + this.position2 = -20; + }).id("UIRelativecontainerCollaboration0270_2") + Button("按钮3").onClick(() => { + this.position1 = -10; + this.position2 = -10; + }).id("UIRelativecontainerCollaboration0270_3") + Button("按钮4").onClick(() => { + this.position1 = 0; + this.position2 = 0; + }).id("UIRelativecontainerCollaboration0270_4") + Button("按钮5").onClick(() => { + this.position1 = 10; + this.position2 = 10; + }).id("UIRelativecontainerCollaboration0270_5") + Button("按钮6").onClick(() => { + this.position1 = 20; + this.position2 = 20; + }).id("UIRelativecontainerCollaboration0270_6") + Button("按钮7").onClick(() => { + this.position1 = 50; + this.position2 = 50; + }).id("UIRelativecontainerCollaboration0270_7") + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7903f230009d6e231772d2c9152ff1d95729710 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0280.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0280 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(150) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(100) + .height(100) + .alignRules({ + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + bottom: { anchor: "barrier", align: VerticalAlign.Bottom }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.TOP, referencedId:["button1", "button2"]}]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b21f7ce2a6c50fb2e9f548960e73299cbddc81a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0290.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0290 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(100) + .height(150) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + bottom: { anchor: "barrier", align: VerticalAlign.Bottom }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.BOTTOM, referencedId:["button1", "button2"]}]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..2df9db8af650f469798dee3cdd6bdd3b0ea7b835 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0300.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0300 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(150) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "barrier", align: VerticalAlign.Top }, + right: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.LEFT, referencedId:["button1", "button2"]}]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff8d9b6e48bee79b58e09137295eae488afaa6e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0310.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0310 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(150) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "barrier", align: VerticalAlign.Top }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button2"]}]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..a9db4403459a1902101c6a4fd8deaa65b31f1a55 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0320.ets @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0320 { + @State data: number = 100 + + build() { + Column() { + RelativeContainer() { + Button("A") + .width(this.data) + .height(this.data) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + Button("B") + .width(this.data) + .height(this.data) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + + Button("C") + .width(this.data) + .height(this.data) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + + Button("D") + .width(this.data) + .height(this.data) + .alignRules({ + top: { anchor: "barrier2", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button4") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ id: "barrier", direction: BarrierDirection.RIGHT, referencedId: ['button1', 'button2'] }, + { id: "barrier2", direction: BarrierDirection.BOTTOM, referencedId: ['button1', 'button2', 'button3'] } + ]) + Button("按钮1").onClick(() => { + this.data = 50; + }).id("UIRelativecontainerCollaboration0320_1") + Button("按钮2").onClick(() => { + this.data = 150; + }).id("UIRelativecontainerCollaboration0320_2") + Button("按钮3").onClick(() => { + this.data = 200; + }).id("UIRelativecontainerCollaboration0320_3") + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8aef4f60999fce20416a130858a0e3de94fa6c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0330.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0330 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(150) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "barrier", align: VerticalAlign.Top }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:[]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..41520ffc0f15113eb5218e0ded72ee14b48bacfa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0340.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0340 { + @State data: Visibility = Visibility.None; + build() { + Column() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(150) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("button6") + .width(200) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button6").borderWidth(1).borderColor(Color.Black) + .visibility(this.data) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "barrier", align: VerticalAlign.Top }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin(20) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + Button("marginChange").onClick(() => { + this.data = Visibility.Visible + }).id("UIRelativecontainerCollaboration0340_1") + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..8fd81d4651bb76ff181bede306f09dc49e98f9a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0350.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0350 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(150) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "barrier", align: VerticalAlign.Top }, + left: { anchor: "barrier", align: HorizontalAlign.Start } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..8989eea8d2bde4b9e8c8997df7dc93729e7db0af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0360.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0360 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + .borderColor(Color.Black) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7ac5499430b08318bcd6dca3484ffc35e7ca089 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0370.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0370 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + + } + .width(400) + .height(400) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad16238b5fb9cd6050ce4224093b678c7d5e1f1f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0380.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0380 { + build() { + Row() { + RelativeContainer() { + Button('A') + .width(100) + .height(100) + .id('button1') + .borderWidth(1) + .borderColor(Color.Black) + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align: HorizontalAlign.Start} + }) + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + Button('B') + .width(100) + .height(100) + .id('button2') + .borderWidth(1) + .borderColor(Color.Black) + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align: HorizontalAlign.Start} + }) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + .borderColor(Color.Black) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef6cac8f30bb3f97c8501a1cf84c533858be167b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0390.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0390 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + bias:{horizontal:0.3} + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + .borderColor(Color.Black) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..342c0164603ce4578e695fd661029d930b1cbdec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0400.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0400 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button2", align:VerticalAlign.Top}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Vertical , ChainStyle.SPREAD) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button3", align : VerticalAlign.Top} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "__container__", align : VerticalAlign.Bottom} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..7216a0cdd43f42e269e5771b3722e8f792cce1e2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0410.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0410 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button2", align:VerticalAlign.Top}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Vertical , ChainStyle.SPREAD_INSIDE) + + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button3", align : VerticalAlign.Top} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "__container__", align : VerticalAlign.Bottom} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..63ddcfd0b015b0f8f8748d06372ad0921d8d1002 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0420.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0420 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button2", align:VerticalAlign.Top}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Vertical , ChainStyle.SPREAD_INSIDE) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "button3", align : VerticalAlign.Top} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + bottom: {anchor: "__container__", align : VerticalAlign.Bottom} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c9a156a705ee6c78c6a10f4ff9f35d4b1179147 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0430.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0430 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + bottom: { anchor: "button2", align: VerticalAlign.Top }, + bias : {vertical : 0.3} + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Vertical, ChainStyle.SPREAD_INSIDE) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + bottom: { anchor: "button3", align: VerticalAlign.Top } + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom } + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..26afa55648967fc00374d0db27083e0b021fdc45 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0440.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0440 { + @State data: Visibility = Visibility.None; + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "button2", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.Start }, + right: { anchor: "button3", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button2", align: HorizontalAlign.Start }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(400).height(400) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..21c360159aa921d12c1dcb3d4aa4c42cc951e2e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0450.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0450 { + @State data: Visibility = Visibility.None; + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "button2", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.End }, + right: { anchor: "button3", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button2", align: HorizontalAlign.End }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(400).height(400) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..b79c3f836fc32d7393262ffa1ab3c480450bf605 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0460.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0460 { + @State data: Visibility = Visibility.None; + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "button2", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.End }, + right: { anchor: "button3", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button2", align: HorizontalAlign.End }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(400).height(400) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..54687b96385990ad2cc4ed3bad1010fa10bc49d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0470.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0470 { + @State data: Visibility = Visibility.None; + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "button2", align: HorizontalAlign.Start } + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.End }, + right: { anchor: "button3", align: HorizontalAlign.Start } + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button2", align: HorizontalAlign.End }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + } + .width(400).height(400) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0480.ets new file mode 100644 index 0000000000000000000000000000000000000000..e19cfd4db6b700859fbd651ddfb67fc47b63d511 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0480.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0480 { + @State data: Visibility = Visibility.None; + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start }, + right: { anchor: "button2", align: HorizontalAlign.Start }, + bias : {horizontal : 0.3} + }) + .id("button1").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button1", align: HorizontalAlign.End }, + right: { anchor: "button3", align: HorizontalAlign.Start }, + bias : {horizontal : 0.8} + }) + .id("button2").borderWidth(1).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "button2", align: HorizontalAlign.End }, + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + .id("button3").borderWidth(1).borderColor(Color.Black) + } + .width(400).height(400) + .barrier([{id: "barrier", direction: BarrierDirection.RIGHT, referencedId:["button1", "button6"]}]) + + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..96f2df3adb7f79eb8b5664e3cc4bef2bb550602a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0490.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0490 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + bias:{horizontal:0.3} + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + .borderColor(Color.Black) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..9044781ace8b314b94a5ad99bec00ef769073fc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0500.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0500 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + bias:{horizontal:0.3} + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + + } + .width(400) + .height(400) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..83c561f404250271865f31971f50718d1ec45678 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0510.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0510 { + @State data: number = 50; + build() { + Column() { + RelativeContainer() { + Row(){ + Text('子组件A') + } + .width(this.data) + .height(50) + .borderWidth(3) + .borderColor(Color.Black) + .id('A') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + .alignRules({ + start: {anchor: "__container__", align: HorizontalAlign.Start}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + + Row(){ + Text('子组件B') + } + .width(this.data) + .height(50) + .borderWidth(3) + .borderColor(Color.Black) + .id('B') + .alignRules({ + end: {anchor: "__container__", align: HorizontalAlign.End}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + + .barrier([{id: "barrier1", direction: BarrierDirection.RIGHT, referencedId:["A"]}, + {id: "barrier2", direction: BarrierDirection.LEFT, referencedId:["B"]}]) + Button("width100").onClick(() => { + this.data = 100 + }).id("UIRelativecontainerCollaboration0510_1") + Button("width200").onClick(() => { + this.data = 200 + }).id("UIRelativecontainerCollaboration0510_2") + }.margin({ left: 20, top: 20 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d92e776fed18f4bc1625e19f96fc31d7cae596d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0520.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0520 { + @State data: number = 50; + build() { + Column() { + RelativeContainer() { + Row(){ + Text('子组件A') + } + .width(50) + .height(this.data) + .borderWidth(3) + .borderColor(Color.Black) + .id('A') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + .alignRules({ + start: {anchor: "__container__", align: HorizontalAlign.Start}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + + Row(){ + Text('子组件B') + } + .width(50) + .height(this.data) + .borderWidth(3) + .borderColor(Color.Black) + .id('B') + .alignRules({ + end: {anchor: "__container__", align: HorizontalAlign.End}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + + .barrier([{id: "barrier1", direction: BarrierDirection.RIGHT, referencedId:["A"]}, + {id: "barrier2", direction: BarrierDirection.LEFT, referencedId:["B"]}]) + Button("width100").onClick(() => { + this.data = 100 + }).id("UIRelativecontainerCollaboration0520_1") + Button("width200").onClick(() => { + this.data = 200 + }).id("UIRelativecontainerCollaboration0520_2") + }.margin({ left: 20, top: 20 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d2a81e1f9c94234b169eb36d0a4835dccfdda9c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0530.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0530 { + @State data: number = 50; + build() { + Column() { + RelativeContainer() { + Row(){ + Text('子组件A') + } + .height(this.data) + .borderWidth(3) + .borderColor(Color.Black) + .id('A') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + + }.margin({ left: 20, top: 20 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..100c669327ef468a8e99cabe311ae9f3428e4df8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0540.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0540 { + @State data: number = 50; + build() { + Column() { + RelativeContainer() { + Row(){ + Text('子组件A') + } + .width(this.data) + .borderWidth(3) + .borderColor(Color.Black) + .id('A') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + + }.margin({ left: 20, top: 20 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a1500116473bc885fa52735ef08bbc1909a1129 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0550.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0550 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row5", align : HorizontalAlign.Start}, + center: {anchor: "__container__", align: VerticalAlign.Center} + }) + .id("row4") + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + Row(){Text('row5')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row4", align: HorizontalAlign.End}, + right: {anchor: "row6", align : HorizontalAlign.Start}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row5") + + Row(){Text('row6')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row5", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row6") + + } + .width('auto').height(300) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0560.ets new file mode 100644 index 0000000000000000000000000000000000000000..e43165188088a58c132e2db15780a508a0aafe55 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0560.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0560 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row5", align : HorizontalAlign.Start}, + center: {anchor: "__container__", align: VerticalAlign.Center} + }) + .id("row4") + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + Row(){Text('row5')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row4", align: HorizontalAlign.End}, + right: {anchor: "row6", align : HorizontalAlign.Start}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row5") + + Row(){Text('row6')}.justifyContent(FlexAlign.Center) + .width(80).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row5", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row6") + + } + .width(300).height('auto') + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..888a097077826bf5838c7a3648fa363f34a74947 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0570.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0570 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(200) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + bias:{horizontal:0.3} + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.PACKED) + + Button("B") + .width(200) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(200) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400) + .height(400) + + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..cfe0c137f6d2b6bbb965adc2a8beb4af2caddebf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0580.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0580 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row5", align : HorizontalAlign.Start}, + center: {anchor: "__container__", align: VerticalAlign.Center} + }) + .id("row4") + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + Row(){Text('row5')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row4", align: HorizontalAlign.End}, + right: {anchor: "row6", align : HorizontalAlign.Start}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row5") + + Row(){Text('row6')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row5", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row6") + + } + .width(300).height(300).margin(50) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0590.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9908082a4a40e8f1ae043e902ac655a5ff2c401 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0590.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0590 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "row5", align : HorizontalAlign.Start}, + center: {anchor: "__container__", align: VerticalAlign.Center} + }) + .id("row4") + .chainMode(Axis.Horizontal, ChainStyle.SPREAD_INSIDE) + + Row(){Text('row5')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row4", align: HorizontalAlign.End}, + right: {anchor: "row6", align : HorizontalAlign.Start}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row5") + + Row(){Text('row6')}.justifyContent(FlexAlign.Center) + .width(110).height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row5", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End}, + top: {anchor: "row4", align: VerticalAlign.Top} + }) + .id("row6") + + } + .width(300).height(300).margin(50) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0600.ets new file mode 100644 index 0000000000000000000000000000000000000000..215b47018565a86c97db9ab25ca1092cbd5e8116 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0600.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0600 { + build() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + bottom: { anchor: "button2", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start} + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Bottom }, + bottom: { anchor: "button3", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0610.ets new file mode 100644 index 0000000000000000000000000000000000000000..b56e10a54aa8f42c37d91ff15b36e0981945d171 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0610.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0610 { + build() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start} + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Yellow) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Yellow) + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button1", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0620.ets new file mode 100644 index 0000000000000000000000000000000000000000..16c9ca219b5266a9061a8393bcca02fcb8afd876 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0620.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0612 { + build() { + Row() { + RelativeContainer() { + Button("A") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "__container__", align: HorizontalAlign.Start}, + right: {anchor: "button2", align:HorizontalAlign.Start}, + + }) + .id("button1") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + Button("B") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align : HorizontalAlign.Start} , + bottom: {anchor: "button4", align : VerticalAlign.Top} + }) + .id("button2") + .borderWidth(1) + .borderColor(Color.Black) + .chainMode(Axis.Vertical, ChainStyle.SPREAD_INSIDE) + + Button("C") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align : HorizontalAlign.End} + }) + .id("button3") + .borderWidth(1) + .borderColor(Color.Black) + + Button("D") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align: HorizontalAlign.Start}, + bottom: {anchor: "button5", align : VerticalAlign.Top} + }) + .id("button4") + .borderWidth(1) + .borderColor(Color.Black) + + + Button("E") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button4", align: VerticalAlign.Bottom }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align: HorizontalAlign.Start}, + bottom: {anchor: "__container__", align : VerticalAlign.Bottom} + }) + .id("button5") + .borderWidth(1) + .borderColor(Color.Black) + + } + .width(400) + .height(400) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0630.ets new file mode 100644 index 0000000000000000000000000000000000000000..a9062bc502b3ea6c74f0251f2394e5efed1a07e1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0630.ets @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0630 { + build() { + Row() { + RelativeContainer() { + Button('A') + .width(100) + .height(100) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Button('B') + .width(100) + .height(100) + .chainMode(Axis.Vertical, ChainStyle.SPREAD) + Button('C') + .width(100) + .height(100) + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "button2", align: HorizontalAlign.End}, + right: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id('button3') + .borderWidth(1) + .borderColor(Color.Black) + + Button("D") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button2", align: VerticalAlign.Bottom }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align: HorizontalAlign.Start}, + bottom: {anchor: "button5", align : VerticalAlign.Top} + }) + .id("button4") + .borderWidth(1) + .borderColor(Color.Black) + + Button("E") + .width(100) + .height(100) + .alignRules({ + top: { anchor: "button4", align: VerticalAlign.Bottom }, + left: {anchor: "button1", align: HorizontalAlign.End}, + right: {anchor: "button3", align: HorizontalAlign.Start}, + bottom: {anchor: "__container__", align : VerticalAlign.Bottom} + }) + .id("button5") + .borderWidth(1) + .borderColor(Color.Black) + } + .width(400).height(400) + .borderColor(Color.Black) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0640.ets new file mode 100644 index 0000000000000000000000000000000000000000..949fc6558f14ac2d83d3c9e27e65ffabde8debc1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0640.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0640 { + build() { + Column() { + RelativeContainer() { + Button("button1") + .width(50) + .height(50) + .alignRules({ + top: { anchor: "guideline1", align: VerticalAlign.Top }, + left: { anchor: "guideline2", align: HorizontalAlign.Start } + }) + .id("bt1").borderWidth(5).borderColor(Color.Black) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + Row(){ + Text('row1') + } + .width(50) + .height(50) + .borderWidth(3) + .borderColor(Color.Black) + .id('txt1') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .guideLine([{id: "guideline1", direction: Axis.Vertical, position:{start:50}},{id:"guideline2", direction: Axis.Vertical, position:{start:350}}]) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0650.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e924c93d8a143cc66411b96ca302aef5bf6f7cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0650.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0650 { + build() { + Column() { + RelativeContainer() { + Row(){ + Text('子组件A') + } + .width(50) + .height(50) + .borderWidth(3) + .borderColor(Color.Black) + .id('A') + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + .alignRules({ + start: {anchor: "__container__", align: HorizontalAlign.Start}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + + Row(){ + Text('子组件B') + } + .width(50) + .height(50) + .borderWidth(3) + .borderColor(Color.Black) + .id('B') + .alignRules({ + end: {anchor: "__container__", align: HorizontalAlign.End}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + }.width(300).height(300).borderColor(Color.Red).borderWidth(3) + .barrier([{id: "barrier1", direction: BarrierDirection.RIGHT, referencedId:["A"]}, + {id: "barrier2", direction: BarrierDirection.LEFT, referencedId:["B"]}]) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0660.ets new file mode 100644 index 0000000000000000000000000000000000000000..41a377105ba7d1d620c7104260822f1407f7ca3a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0660.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0660 { + @State padding1:number = 0 + + build() { + Column() { + RelativeContainer() { + Button('padding').width(100).height(100).id('padding') + .backgroundColor("#FF3333") + .onClick(() => { + this.padding1 = 10 + }) + .alignRules({ + left: {anchor: "guideline1", align: HorizontalAlign.Start} + }) + + Row().width(100).height(100).id('rowA') + .backgroundColor(Color.Yellow) + .alignRules({ + right: {anchor: "__container__", align: HorizontalAlign.End}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + } + .padding(this.padding1) + .width(300).height(300) + .border({width:2, color: "#6699FF"}) + .guideLine([{id:"guideline1", direction: Axis.Vertical, position:{start:10}}]) + .barrier([{id: "barrier1", direction: BarrierDirection.LEFT, referencedId:["rowA"]}]) + } + .height('100%') + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0670.ets new file mode 100644 index 0000000000000000000000000000000000000000..e7caa3eb0235b26a7bec953b7fd5a3702ba69a52 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0670.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerCollaboration0670 { + @State boardwidth1:number = 0 + + build() { + Column() { + RelativeContainer() { + Button('boardwidth').width(100).height(100).id('boardwidth') + .backgroundColor("#FF3333") + .onClick(() => { + this.boardwidth1 = 10 + }) + .alignRules({ + left: {anchor: "guideline1", align: HorizontalAlign.Start} + }) + + Row().width(100).height(100).id('rowA') + .backgroundColor(Color.Yellow) + .alignRules({ + right: {anchor: "__container__", align: HorizontalAlign.End}, + top: {anchor: "__container__", align: VerticalAlign.Top} + }) + .chainMode(Axis.Horizontal, ChainStyle.SPREAD) + + } + .borderWidth(this.boardwidth1) + .width(300).height(300) + .guideLine([{id:"guideline1", direction: Axis.Vertical, position:{start:10}}]) + .barrier([{id: "barrier1", direction: BarrierDirection.LEFT, referencedId:["rowA"]}]) + } + .height('100%') + .margin(30) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..0afd1a45881148eb7fb9160c06731fcfbc8ac049 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0010.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0010 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.TOP, + referencedId: ["row1", "row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0010_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0010_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..f379680b52eaf997a9ff9408c647df83a9ea8ce6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0020.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0020 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row1", "row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0020_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0020_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..314e88ad42db353cf75ab8216d03fb129396bb06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0030.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0030 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.START, + referencedId: ["row1", "row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0030_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0030_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..68fa31bf9c51395913fe8db4bc5217fbc38de0fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0040.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0040 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.Center }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Center }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.END, + referencedId: ["row1", "row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0040_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0040_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b1287a3b08a48ccd491b5a23f99c7a217ec71bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0050.ets @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0050 { + @State visibilityV: Visibility = Visibility.Hidden + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF6633") + .alignRules({ + start: { anchor: "barrier1", align: HorizontalAlign.Center }, + top: { anchor: "row2", align: VerticalAlign.Top } + }) + .id("row3") + .visibility(this.visibilityV) + + Row() { + Text('row4') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier2", align: VerticalAlign.Bottom } + }) + .id("row4") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.END, + referencedId: ["row1", "row2"] + }]) + .barrier([{ + id: "barrier2", + localizedDirection: LocalizedBarrierDirection.END, + referencedId: ["row3", "row2"] + }]) + + Button('Add').id('UIRelativecontainerJingxiang0050_add') + .onClick(() => { + this.visibilityV = Visibility.Visible + }) + Button('Ltr').id('UIRelativecontainerJingxiang0050_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0050_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..35b9ba3b2f20c43ce82750454c0e3faa350eaa06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0060.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0060 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0060_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0060_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..1086f69118eee7fe450f86c5e3e78410d31f6ba1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0070.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0070 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0070_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0070_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb0162a2d0a8b780811dcd2e6b608d9e5a0c55e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0080.ets @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0080 { + @State borderWidthV: number = 10 + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: this.borderWidthV, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row1", "row2"] + }]) + Button('borderWidth').id('UIRelativecontainerJingxiang0080_border') + .onClick(() => { + this.borderWidthV = 20 + }) + Button('Ltr').id('UIRelativecontainerJingxiang0080_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0080_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c7aa817315213da76ae8f718c8d06ebdf9de852 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0090.ets @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0090 { + @State directionV: Direction = Direction.Auto + @State ChainStyleV: ChainStyle = ChainStyle.SPREAD + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .chainMode(Axis.Horizontal, this.ChainStyleV) + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.START, + referencedId: ["row1", "row2"] + }]) + Button('SPREAD_INSIDE').id('UIRelativecontainerJingxiang0090_ins') + .onClick(() => { + this.ChainStyleV = ChainStyle.SPREAD_INSIDE + }) + Button('PACKED').id('UIRelativecontainerJingxiang0090_packed') + .onClick(() => { + this.ChainStyleV = ChainStyle.PACKED + }) + Button('Ltr').id('UIRelativecontainerJingxiang0090_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0090_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..87344e76e6a3c206265bec55e681699360b0b4fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0100.ets @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0100 { + @State directionV: Direction = Direction.Auto + @State ChainStyleV: ChainStyle = ChainStyle.SPREAD + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .chainMode(Axis.Horizontal, this.ChainStyleV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.START, + referencedId: ["row1", "row2"] + }]) + Button('SPREAD_INSIDE').id('UIRelativecontainerJingxiang0100_ins') + .onClick(() => { + this.ChainStyleV = ChainStyle.SPREAD_INSIDE + }) + Button('PACKED').id('UIRelativecontainerJingxiang0100_packed') + .onClick(() => { + this.ChainStyleV = ChainStyle.PACKED + }) + Button('Ltr').id('UIRelativecontainerJingxiang0100_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0100_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b77e3d253a0ee1cb7219257c38d74b0cb47494a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0110.ets @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0110 { + @State directionV: Direction = Direction.Auto + @State ChainStyleV: ChainStyle = ChainStyle.SPREAD + build() { + Column() { + RelativeContainer() { + Column() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(80) + .height(80) + .backgroundColor("#FF3333") + .alignRules({ + left: { anchor: "__container__", align: HorizontalAlign.Start }, + top: { anchor: "__container__", align: VerticalAlign.Top }, + bias: { vertical: 0 } + }) + .id("row1") + .chainMode(Axis.Horizontal, this.ChainStyleV) + + Column() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(80) + .height(80) + .backgroundColor("#FFCC00") + .alignRules({ + left: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Column() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(80) + .height(80) + .backgroundColor("#FF6633") + .alignRules({ + left: { anchor: "row2", align: HorizontalAlign.Start }, + top: { anchor: "row2", align: VerticalAlign.Bottom } + }) + .id("row3") + + Row() { + Button('SPREAD_INSIDE').id('UIRelativecontainerJingxiang0110_ins') + .onClick(() => { + this.ChainStyleV = ChainStyle.SPREAD_INSIDE + }) + Button('PACKED').id('UIRelativecontainerJingxiang0110_packed') + .onClick(() => { + this.ChainStyleV = ChainStyle.PACKED + }) + Button('Ltr').id('UIRelativecontainerJingxiang0110_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0110_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + + } + .width(300).height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .direction(this.directionV) + } + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4ddb215d0df01757a263c313a06c1d7620d8eae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0120.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0120 { + @State directionV: Direction = Direction.Auto + @State flexAlignV: FlexAlign = FlexAlign.Start + + build() { + Row() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(this.flexAlignV) + .width(200) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + } + .direction(this.directionV) + .width(150) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row2"] + }]) + Button('flexAlign').id('UIRelativecontainerJingxiang0120_flexAlign') + .onClick(() => { + this.flexAlignV = FlexAlign.Center + }) + Button('Ltr').id('UIRelativecontainerJingxiang0120_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0120_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..a388372ef00600ff48e75f03cac1644f821e84ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0130.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0130 { + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + right: { anchor: "__container__", align: HorizontalAlign.End }, + bottom: { anchor: "__container__", align: VerticalAlign.Bottom } + }) + .id("row2") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin(20) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row2"] + }]) + + Button('Ltr').id('UIRelativecontainerJingxiang0130_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0130_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc60e27e8b242617efdb997293c3ea474e677383 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0140.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0140 { + @State directionV: Direction = Direction.Auto + + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row(){Text('row2')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FFCC00") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.End}, + top: {anchor: "row1", align: VerticalAlign.Top} + }) + .id("row2") + + Row(){Text('row3')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF6633") + .alignRules({ + left: {anchor: "row1", align: HorizontalAlign.Start}, + top: {anchor: "row1", align: VerticalAlign.Bottom} + }) + .id("row3") + + Row(){Text('row4')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF9966") + .alignRules({ + left: {anchor: "row3", align: HorizontalAlign.End}, + top: {anchor: "row2", align: VerticalAlign.Bottom} + }) + .id("row4") + } + .width("auto").height("auto") + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + .direction(this.directionV) + Button('Ltr').id('UIRelativecontainerJingxiang0140_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0140_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..209ebc5e3e2217b961d5caaefe6fec5acaa4c5a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0150.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0150 { + @State directionV: Direction = Direction.Auto + @State guideLineV: Axis = Axis.Vertical + @State guideIdV: string = 'guideline1' + + build() { + Column() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .alignRules({ + left: { anchor: "guideline1", align: HorizontalAlign.End }, + top: { anchor: "guideline2", align: VerticalAlign.Top }, + }) + .id("row1") + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .direction(this.directionV) + .guideLine([{ id: this.guideIdV, direction: this.guideLineV, position: { start: 50 } }, + { id: "guideline2", direction: Axis.Horizontal, position: { start: 50 } } ]) + Button('changeDir').id('UIRelativecontainerJingxiang0150_changeDir') + .onClick(() => { + this.guideLineV = Axis.Horizontal + }) + Button('changeld').id('UIRelativecontainerJingxiang0150_changeld') + .onClick(() => { + this.guideIdV = "guideline3" + }) + Button('Ltr').id('UIRelativecontainerJingxiang0150_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0150_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..672c44e3321006849190d9bc767fdcfb29d46515 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0160.ets @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0160 { + @State endV: number = -50 + @State directionV: Direction = Direction.Auto + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.START, + referencedId: ["row1", "row2"] + }]) + .guideLine([{id:"row1", direction: Axis.Vertical, position:{end:this.endV}}]) + Button('setEnd').id('UIRelativecontainerJingxiang0160_end') + .onClick(() => { + this.endV = 50 + }) + Button('Ltr').id('UIRelativecontainerJingxiang0160_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0160_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..817d3f4678db846b9bc9973918b6d877773916d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0170.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0170 { + @State directionV: Direction = Direction.Auto + @State positionV: GuideLinePosition | null = { end: 0 } + + build() { + Column() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .alignRules({ + right: { anchor: "guideline1", align: HorizontalAlign.End }, + top: { anchor: "guideline2", align: VerticalAlign.Top }, + }) + .id("row1") + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .direction(this.directionV) + .guideLine([{ id: "guideline1", direction: Axis.Vertical, position: this.positionV }, + { id: "guideline2", direction: Axis.Horizontal, position: { start: 0 } } ]) + + Button('delPos').id('UIRelativecontainerJingxiang0170_delPos') + .onClick(() => { + this.positionV = null + }) + Button('Ltr').id('UIRelativecontainerJingxiang0170_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0170_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa0fba36ca9421f678049d9f6b410e0bbd1c45d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0180.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0180 { + @State directionV: Direction = Direction.Auto + @State positionV: number = 0 + + build() { + Column() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .alignRules({ + left: { anchor: "guideline1", align: HorizontalAlign.Start }, + top: { anchor: "guideline2", align: VerticalAlign.Top }, + }) + .id("row1") + } + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .direction(this.directionV) + .guideLine([{ id: "guideline1", direction: Axis.Vertical, position: { start: this.positionV } }, + { id: "guideline2", direction: Axis.Horizontal, position: { start: 0 } } ]) + + Button('changeStart').id('UIRelativecontainerJingxiang0180_start') + .onClick(() => { + this.positionV = -50 + }) + Button('Ltr').id('UIRelativecontainerJingxiang0180_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0180_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..0da3c3e96f228d0a8bf7c01e43553c7c4c60e4da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0190.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0190 { + @State directionV: Direction = Direction.Auto + @State ChainStyleV: ChainStyle = ChainStyle.SPREAD + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + + Row() { + Text('row3') + } + .justifyContent(FlexAlign.Center) + .width(50) + .height(50) + .backgroundColor("#FF9966") + .alignRules({ + start: { anchor: "row1", align: HorizontalAlign.Start }, + top: { anchor: "barrier", align: VerticalAlign.Bottom } + }) + .id("row3") + } + .direction(this.directionV) + .width(300) + .height(300) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.START, + referencedId: ["row1", "row2"] + }]) + Button('Ltr').id('UIRelativecontainerJingxiang0190_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0190_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..31926c6f0d36ac9eb2f267d9ae468db26e6c47f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0200.ets @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2024 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 UIRelativecontainerJingxiang0200 { + @State directionV: Direction = Direction.Auto + @State paddingV: number = 0 + + build() { + Column() { + RelativeContainer() { + Row() { + Text('row1') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .id("row1") + + Row() { + Text('row2') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FFCC00") + .alignRules({ + middle: { anchor: "row1", align: HorizontalAlign.End }, + top: { anchor: "row1", align: VerticalAlign.Bottom } + }) + .id("row2") + } + .direction(this.directionV) + .width(300) + .height(300) + .padding(this.paddingV) + .margin({ left: 50 }) + .border({ width: 2, color: "#6699FF" }) + .barrier([{ + id: "barrier", + localizedDirection: LocalizedBarrierDirection.BOTTOM, + referencedId: ["row2"] + }]) + Button('ChangePad').id('UIRelativecontainerJingxiang0200_padding') + .onClick(() => { + this.paddingV = 50 + }) + Button('Ltr').id('UIRelativecontainerJingxiang0200_ltr') + .onClick(() => { + this.directionV = Direction.Ltr + }) + Button('Rtl').id('UIRelativecontainerJingxiang0200_rtl') + .onClick(() => { + this.directionV = Direction.Rtl + }) + } + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts new file mode 100644 index 0000000000000000000000000000000000000000..c26fa1d9efb5d54d5e6b7e39ca0f440e53f4db12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 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 hilog from '@ohos.hilog'; +import TestRunner from '@ohos.application.testRunner'; +import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +async function onAbilityCreateCallback() { + hilog.info(0x0000, 'testTag', '%{public}s', 'onAbilityCreateCallback'); +} + +async function addAbilityMonitorCallback(err: any) { + hilog.info(0x0000, 'testTag', 'addAbilityMonitorCallback : %{public}s', JSON.stringify(err) ?? ''); +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner OnPrepare '); + } + + async onRun() { + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun run'); + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.TestAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a TestAbility' + ' -b ' + abilityDelegatorArguments.bundleName + var debug = abilityDelegatorArguments.parameters['-D'] + if (debug == 'true') + { + cmd += ' -D' + } + hilog.info(0x0000, 'testTag', 'cmd : %{public}s', cmd); + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + hilog.info(0x0000, 'testTag', 'executeShellCommand : err : %{public}s', JSON.stringify(err) ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.stdResult ?? ''); + hilog.info(0x0000, 'testTag', 'executeShellCommand : data : %{public}s', d.exitCode ?? ''); + }) + hilog.info(0x0000, 'testTag', '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 b/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b8a185e5aba42dfb858f7d23c89ddb58d0584ed2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 @@ -0,0 +1,72 @@ +{ + "module": { + "name": "entry_test", + "type": "feature", + "description": "$string:module_test_desc", + "mainElement": "TestAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:test_pages", + "requestPermissions": [ + { + "name": "ohos.permission.SYSTEM_FLOAT_WINDOW", + "usedScene": { + "abilities": [ + "EntryAbility" + ], + "when": "inuse" + } + }, + { + "name": "ohos.permission.GRANT_SENSITIVE_PERMISSIONS" + }, + { + "name": "ohos.permission.WRITE_MEDIA" + }, + { + "name": "ohos.permission.INTERNET" + }, + { + "name": "ohos.permission.READ_MEDIA" + }, + { + "name":"ohos.permission.UPDATE_CONFIGURATION" + }, + { + "name":"ohos.permission.RUNNING_LOCK" + }, + { + "name": "ohos.permission.CAPTURE_SCREEN" + }, + { + "name": "ohos.permission.ACCESS_SCREEN_LOCK_INNER" + } + ], + "abilities": [ + { + "name": "TestAbility", + "srcEntry": "./ets/testability/TestAbility.ets", + "description": "$string:TestAbility_desc", + "icon": "$media:icon", + "label": "$string:TestAbility_label", + "exported": true, + "startWindowIcon": "$media:icon", + "startWindowBackground": "$color:start_window_background", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } + ] + } + ] + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..03d835fb48e435eb83f00da8336d83c20986a115 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/color.json @@ -0,0 +1,24 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + }, + { + "name": "Pink", + "value": "#ffc0cb" + }, + { + "name": "yellow", + "value": "#FFCFA613" + }, + { + "name": "blue", + "value": "#0000ff" + }, + { + "name": "colorRed", + "value": "#FF0000" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/float.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..49e771731bb722a94d51143d6f6490e5789a6e79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/float.json @@ -0,0 +1,16 @@ +{ + "float": [ + { + "name": "boardSize_10", + "value": "10" + }, + { + "name": "float_1", + "value": "10" + }, + { + "name": "float_17", + "value": "17" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/integer.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/integer.json new file mode 100644 index 0000000000000000000000000000000000000000..0cf2364d45a04a8728c52846397b489032563833 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/integer.json @@ -0,0 +1,15 @@ +{ + "integer":[ + { + "name": "0", + "value": 0 + }, + { + "name": "20", + "value": 20 + },{ + "name": "50", + "value": 50 + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..21cfb96e04cd9375ad208b656f3a1964fa2bcd77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json @@ -0,0 +1,72 @@ +{ + "string": [ + { + "name": "module_test_desc", + "value": "test ability description" + }, + { + "name": "TestAbility_desc", + "value": "the test ability" + }, + { + "name": "TestAbility_label", + "value": "test label" + }, + { + "name": "Font_size", + "value": "5vp" + }, + { + "name": "Font_pristina", + "value": "pristina" + }, + { + "name": "color_yellow", + "value": "#FFDDD52F" + }, + { + "name": "size_30", + "value": "30vp" + }, + { + "name": "boardSize_10", + "value": "0vp" + }, + { + "name": "fontfamily_1", + "value": "HarmonyOS Sans" + }, + { + "name": "span", + "value": "span" + }, + { + "name": "test_value", + "value": "-10" + }, + { + "name": "TestAbility_label_p", + "value": "100%" + }, + { + "name": "abc", + "value": "abc" + }, + { + "name": "font_size", + "value": "30" + }, + { + "name": "font_height", + "value": "300" + }, + { + "name": "border_width", + "value": "5.5" + }, + { + "name": "position_50", + "value": "50" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7a32b59293c29076b7ff37af37dc09318aa26462 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/cat.jpg b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/cat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..382ac7dc322871219388ca27f7c637447e8c9e77 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/cat.jpg differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/closeeye.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/closeeye.png new file mode 100644 index 0000000000000000000000000000000000000000..c59a90fb37dd9cea9724d9e1b953767416981efc Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/closeeye.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/color.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/color.json new file mode 100644 index 0000000000000000000000000000000000000000..5e2848dc24cef89cfce3d8a902fc57706fa3eb22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/color.json @@ -0,0 +1,12 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + }, + { + "name": "Pink", + "value": "#FFC0CB" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/icon.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/icon.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/img2.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/img2.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/img2.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/openeye.png b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/openeye.png new file mode 100644 index 0000000000000000000000000000000000000000..e1bedb18a67926d59141af2726ce804a93b313db Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/media/openeye.png differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..85ad219a369135cbe8ff4d639be57a111ddcacd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -0,0 +1,479 @@ +{ + "src": [ + "testability/pages/Index", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0010", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0020", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0030", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0040", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0050", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0060", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0070", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0080", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0090", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0100", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0110", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0120", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0130", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0140", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0150", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0160", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0170", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0180", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0190", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0230", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0160", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0150", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0140", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0130", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0120", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0110", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0170", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0180", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0190", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0200", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0210", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0220", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0230", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0240", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0250", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0260", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0270", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0280", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0300", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0290", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0210", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0240", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0250", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0260", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0270", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0280", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0290", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0300", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0310", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0320", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0330", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0340", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0350", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0360", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0370", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0380", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0010", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0020", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0030", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0040", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0200", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0220", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0100", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0480", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0490", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0500", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0510", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0520", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0530", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0540", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0550", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0560", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0570", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0580", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0010", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0020", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0030", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0040", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0050", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0060", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0070", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0080", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0090", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0100", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0110", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0120", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0130", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0140", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0150", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0160", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0170", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0180", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0190", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0200", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0210", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0420", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0430", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0440", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0450", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0460", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0470", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0480", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0590", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0320", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0330", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0310", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0340", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0350", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0360", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0370", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0380", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0390", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0400", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0410", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0420", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0430", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0440", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0450", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0460", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0470", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0190", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0140", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0130", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0030", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0160", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0020", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0010", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0080", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0090", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0170", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0060", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0080", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0090", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0100", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0110", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0120", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0130", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0140", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0150", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0160", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0170", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0180", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0190", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0200", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0210", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0220", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0230", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0240", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0250", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0260", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0270", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0280", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0290", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0300", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0310", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0320", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0330", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0340", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0350", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0360", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0370", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0380", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0390", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0400", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0410", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0420", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0430", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0440", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0450", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0460", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0470", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0480", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0490", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0500", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0510", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0520", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0070", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0010", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0050", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0060", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0070", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0080", + "testability/pages/UIAttributesBorderInterface/UIAttributesBorderInterface0090", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0040", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0050", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0060", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0070", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0110", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0120", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0150", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0010", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0020", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0500", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0510", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0520", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0530", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0540", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0550", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0600", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0610", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0620", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0630", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0640", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0650", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0660", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0670", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0680", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0010", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0020", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0030", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0040", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0050", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0060", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0070", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0080", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0090", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0100", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0110", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0120", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0130", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0140", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0150", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0160", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0170", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0180", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0190", + "testability/pages/UIRelativecontainerJingxiang/UIRelativecontainerJingxiang0200", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0220", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0230", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0240", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0250", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0260", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0270", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0280", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0290", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0300", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0310", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0320", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0330", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0340", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0350", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0360", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0370", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0380", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0390", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0400", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0490", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0560", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0570", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0580", + "testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0010", + "testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0020", + "testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0040", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0840", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0020", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0030", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0040", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0050", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0530", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0540", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0550", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0560", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0570", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0580", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0590", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0600", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0610", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0620", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0630", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0640", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0650", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0660", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0670", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0680", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0690", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0700", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0710", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0720", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0730", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0740", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0750", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0760", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0770", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0780", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0790", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0800", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0810", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0820", + "testability/pages/UIAttributesKeyboardavoidmodeSetup/UIAttributesKeyboardavoidmodeSetup0830", + "testability/pages/UIComponentBorderDashedDashgapDashwidth/UIComponentBorderDashedDashgapDashwidth0100", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0310", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0320", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0380", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0010", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0040", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0050", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0060", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0070", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0110", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0120", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0130", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0220", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0180", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0190", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0200", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0210", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0220", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0230", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0240", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0260", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0340", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0360", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0390", + "testability/pages/UIComponentLayoutGridrowgridcolInterface/UIComponentLayoutGridrowgridcolInterface0410", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0010", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0020", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0030", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0050", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0060", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0070", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0080", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0090", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0100", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0110", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0120", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0130", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0140", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0150", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0160", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0170", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0180", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0190", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0200", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0210", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0220", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0230", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0240", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0250", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0260", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0270", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0280", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0290", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0300", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0310", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0320", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0330", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0340", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0350", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0360", + "testability/pages/UIAttributesKeyboardavoidmodeLayout/UIAttributesKeyboardavoidmodeLayout0040", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0030", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0040", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0050", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0060", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0070", + "testability/pages/UIComponentLayoutGridrowgridcolLayout/UIComponentLayoutGridrowgridcolLayout0080", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0010", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0020", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0030", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0040", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0050", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0060", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0070", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0080", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0090", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0140", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0170", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0250", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0270", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0330", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0350", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0370", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0400", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0020", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0030", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0040", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0050", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0060", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0080", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0090", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0100", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0110", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0120", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0130", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0140", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0020", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0030", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0080", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0090", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0100", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0140", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0170", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0200", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0210", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0220", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0230", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0240", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0250", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0260", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0270", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0510", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0520", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0530", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0540", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0550", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0560", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0580", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0590", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0340", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0150", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0160", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0180", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0190", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0010", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0070", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0150", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0160", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0170", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0180", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0190", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0280", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0290", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0300", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0310", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0330", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0350", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0640", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0650", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0200", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0630", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0380", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0390", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0360", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0490", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0660", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0670", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0280", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0290", + "testability/pages/UIRelativecontainerBias/UIRelativecontainerBias0300", + "testability/pages/TSBaseComponentRelativecontaineer/TSBaseComponentRelativecontaineer0210", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0600", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0610", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0620", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0420", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0430", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0410", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0400", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0570", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0370", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0500", + "testability/pages/UIAttributesKeyboardavoidmodeTransitionanimation/UIAttributesKeyboardavoidmodeTransitionanimation0030", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0320", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0440", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0450", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0460", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0470", + "testability/pages/UIRelativecontainerCollaboration/UIRelativecontainerCollaboration0480", + "testability/pages/UIComponentGraphicCanvasThread/UIComponentGraphicCanvasThread0040", + "testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0110", + "testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0120", + "testability/pages/UIComponentCanvas0ffscreencanvas/UIComponentCanvas0ffscreencanvas0130", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw0690", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1360", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2590", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2600", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2770", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2780", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw2790", + "testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0600", + "testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0610", + "testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0620", + "testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0630", + "testability/pages/UICustomDrawingSafeareaScene/UICustomDrawingSafeareaScene0640", + "testability/pages/UIComponentCanvasOffecreencanvasGpuDraw/UIComponentCanvasOffecreencanvasGpuDraw1620" + ] +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/cat.jpg b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/cat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..382ac7dc322871219388ca27f7c637447e8c9e77 Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/cat.jpg differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own.ttf b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own.ttf new file mode 100644 index 0000000000000000000000000000000000000000..aeddad7edaf7ec4d01f12a74b88a8ab20b9a068c Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own.ttf differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own1.ttf b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own1.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d8bf101deb779b9436f6d5ebb756757942ac84ed Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own1.ttf differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own2.TTF b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own2.TTF new file mode 100644 index 0000000000000000000000000000000000000000..7e41fddd46e867ad55f7033ade8bb3bc26a5e21b Binary files /dev/null and b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/font/own2.TTF differ diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/string.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/string.json new file mode 100644 index 0000000000000000000000000000000000000000..d1049d56ac4487a3f44a6e5e0b26117519e7ea43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/rawfile/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "rawfile_string", + "value": "10vp" + } + ] +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/hvigor/hvigor-config.json5 b/function/ui_compare_rh/uicompare/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..64655e6970c2acdf5708226c4d5a584ca52b6f37 --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigor/hvigor-config.json5 @@ -0,0 +1,6 @@ +{ + "hvigorVersion": "3.2.4", + "dependencies": { + "@ohos/hvigor-ohos-plugin": "3.2.4" + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js b/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js new file mode 100644 index 0000000000000000000000000000000000000000..372eae8eb4a124095936f9cd78df5c6756746f3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigor/hvigor-wrapper.js @@ -0,0 +1 @@ +"use strict";var u=require("path"),D=require("os"),e=require("fs"),t=require("crypto"),r=require("child_process"),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},C={},F=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(C,"__esModule",{value:!0}),C.maxPathLength=C.isMac=C.isLinux=C.isWindows=void 0;const E=F(D),A="Windows_NT",o="Darwin";function a(){return E.default.type()===A}function c(){return E.default.type()===o}C.isWindows=a,C.isLinux=function(){return"Linux"===E.default.type()},C.isMac=c,C.maxPathLength=function(){return c()?1016:a()?259:4095},function(e){var t=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),r=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),i=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&t(D,u,e);return r(D,u),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WORK_SPACE=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.PROJECT_CACHES=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const F=i(D),E=i(u),A=C;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,A.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,A.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=E.resolve(F.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=E.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.PROJECT_CACHES="project_caches",e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=E.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=E.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=E.resolve(e.HVIGOR_USER_HOME,e.PROJECT_CACHES),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_WRAPPER_HOME=E.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.WORK_SPACE="workspace"}(i);var s={},l={};Object.defineProperty(l,"__esModule",{value:!0}),l.logInfoPrintConsole=l.logErrorAndExit=void 0,l.logErrorAndExit=function(u){u instanceof Error?console.error(u.message):console.error(u),process.exit(-1)},l.logInfoPrintConsole=function(u){console.log(u)};var B=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),d=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),f=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&B(D,u,e);return d(D,u),D};Object.defineProperty(s,"__esModule",{value:!0});var _=s.executeBuild=void 0;const p=f(e),O=f(u),h=l;_=s.executeBuild=function(u){const D=O.resolve(u,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const u=p.realpathSync(D);require(u)}catch(e){(0,h.logErrorAndExit)(`Error: ENOENT: no such file ${D},delete ${u} and retry.`)}};var P={},v={};!function(u){var D=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(u,"__esModule",{value:!0}),u.hashFile=u.hash=u.createHash=void 0;const r=D(t),i=D(e);u.createHash=(u="MD5")=>r.default.createHash(u);u.hash=(D,e)=>(0,u.createHash)(e).update(D).digest("hex");u.hashFile=(D,e)=>{if(i.default.existsSync(D))return(0,u.hash)(i.default.readFileSync(D,"utf-8"),e)}}(v);var g={},m={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.Unicode=void 0;class y{}R.Unicode=y,y.SPACE_SEPARATOR=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,y.ID_START=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,y.ID_CONTINUE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(m,"__esModule",{value:!0}),m.JudgeUtil=void 0;const I=R;m.JudgeUtil=class{static isIgnoreChar(u){return"string"==typeof u&&("\t"===u||"\v"===u||"\f"===u||" "===u||" "===u||"\ufeff"===u||"\n"===u||"\r"===u||"\u2028"===u||"\u2029"===u)}static isSpaceSeparator(u){return"string"==typeof u&&I.Unicode.SPACE_SEPARATOR.test(u)}static isIdStartChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||I.Unicode.ID_START.test(u))}static isIdContinueChar(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||I.Unicode.ID_CONTINUE.test(u))}static isDigitWithoutZero(u){return/[1-9]/.test(u)}static isDigit(u){return"string"==typeof u&&/[0-9]/.test(u)}static isHexDigit(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};var N=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(g,"__esModule",{value:!0}),g.parseJsonText=g.parseJsonFile=void 0;const b=N(e),S=N(D),w=N(u),H=m;var x;!function(u){u[u.Char=0]="Char",u[u.EOF=1]="EOF",u[u.Identifier=2]="Identifier"}(x||(x={}));let M,T,V,G,j,J,W="start",U=[],L=0,$=1,k=0,K=!1,z="default",q="'",Z=1;function X(u,D=!1){T=String(u),W="start",U=[],L=0,$=1,k=0,G=void 0,K=D;do{M=Q(),nu[W]()}while("eof"!==M.type);return G}function Q(){for(z="default",j="",q="'",Z=1;;){J=Y();const u=Du[z]();if(u)return u}}function Y(){if(T[L])return String.fromCodePoint(T.codePointAt(L))}function uu(){const u=Y();return"\n"===u?($++,k=0):u?k+=u.length:k++,u&&(L+=u.length),u}g.parseJsonFile=function(u,D=!1,e="utf-8"){const t=b.default.readFileSync(w.default.resolve(u),{encoding:e});try{return X(t,D)}catch(D){if(D instanceof SyntaxError){const e=D.message.split("at");if(2===e.length)throw new Error(`${e[0].trim()}${S.default.EOL}\t at ${u}:${e[1].trim()}`)}throw new Error(`${u} is not in valid JSON/JSON5 format.`)}},g.parseJsonText=X;const Du={default(){switch(J){case"/":return uu(),void(z="comment");case void 0:return uu(),eu("eof")}if(!H.JudgeUtil.isIgnoreChar(J)&&!H.JudgeUtil.isSpaceSeparator(J))return Du[W]();uu()},start(){z="value"},beforePropertyName(){switch(J){case"$":case"_":return j=uu(),void(z="identifierName");case"\\":return uu(),void(z="identifierNameStartEscape");case"}":return eu("punctuator",uu());case'"':case"'":return q=J,uu(),void(z="string")}if(H.JudgeUtil.isIdStartChar(J))return j+=uu(),void(z="identifierName");throw Eu(x.Char,uu())},afterPropertyName(){if(":"===J)return eu("punctuator",uu());throw Eu(x.Char,uu())},beforePropertyValue(){z="value"},afterPropertyValue(){switch(J){case",":case"}":return eu("punctuator",uu())}throw Eu(x.Char,uu())},beforeArrayValue(){if("]"===J)return eu("punctuator",uu());z="value"},afterArrayValue(){switch(J){case",":case"]":return eu("punctuator",uu())}throw Eu(x.Char,uu())},end(){throw Eu(x.Char,uu())},comment(){switch(J){case"*":return uu(),void(z="multiLineComment");case"/":return uu(),void(z="singleLineComment")}throw Eu(x.Char,uu())},multiLineComment(){switch(J){case"*":return uu(),void(z="multiLineCommentAsterisk");case void 0:throw Eu(x.Char,uu())}uu()},multiLineCommentAsterisk(){switch(J){case"*":return void uu();case"/":return uu(),void(z="default");case void 0:throw Eu(x.Char,uu())}uu(),z="multiLineComment"},singleLineComment(){switch(J){case"\n":case"\r":case"\u2028":case"\u2029":return uu(),void(z="default");case void 0:return uu(),eu("eof")}uu()},value(){switch(J){case"{":case"[":return eu("punctuator",uu());case"n":return uu(),tu("ull"),eu("null",null);case"t":return uu(),tu("rue"),eu("boolean",!0);case"f":return uu(),tu("alse"),eu("boolean",!1);case"-":case"+":return"-"===uu()&&(Z=-1),void(z="numerical");case".":case"0":case"I":case"N":return void(z="numerical");case'"':case"'":return q=J,uu(),j="",void(z="string")}if(void 0===J||!H.JudgeUtil.isDigitWithoutZero(J))throw Eu(x.Char,uu());z="numerical"},numerical(){switch(J){case".":return j=uu(),void(z="decimalPointLeading");case"0":return j=uu(),void(z="zero");case"I":return uu(),tu("nfinity"),eu("numeric",Z*(1/0));case"N":return uu(),tu("aN"),eu("numeric",NaN)}if(void 0!==J&&H.JudgeUtil.isDigitWithoutZero(J))return j=uu(),void(z="decimalInteger");throw Eu(x.Char,uu())},zero(){switch(J){case".":case"e":case"E":return void(z="decimal");case"x":case"X":return j+=uu(),void(z="hexadecimal")}return eu("numeric",0)},decimalInteger(){switch(J){case".":case"e":case"E":return void(z="decimal")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimal(){switch(J){case".":j+=uu(),z="decimalFraction";break;case"e":case"E":j+=uu(),z="decimalExponent"}},decimalPointLeading(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalFraction");throw Eu(x.Char,uu())},decimalFraction(){switch(J){case"e":case"E":return j+=uu(),void(z="decimalExponent")}if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},decimalExponent(){switch(J){case"+":case"-":return j+=uu(),void(z="decimalExponentSign")}if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentSign(){if(H.JudgeUtil.isDigit(J))return j+=uu(),void(z="decimalExponentInteger");throw Eu(x.Char,uu())},decimalExponentInteger(){if(!H.JudgeUtil.isDigit(J))return eu("numeric",Z*Number(j));j+=uu()},hexadecimal(){if(H.JudgeUtil.isHexDigit(J))return j+=uu(),void(z="hexadecimalInteger");throw Eu(x.Char,uu())},hexadecimalInteger(){if(!H.JudgeUtil.isHexDigit(J))return eu("numeric",Z*Number(j));j+=uu()},identifierNameStartEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":break;default:if(!H.JudgeUtil.isIdStartChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},identifierName(){switch(J){case"$":case"_":case"‌":case"‍":return void(j+=uu());case"\\":return uu(),void(z="identifierNameEscape")}if(!H.JudgeUtil.isIdContinueChar(J))return eu("identifier",j);j+=uu()},identifierNameEscape(){if("u"!==J)throw Eu(x.Char,uu());uu();const u=ru();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!H.JudgeUtil.isIdContinueChar(u))throw Eu(x.Identifier)}j+=u,z="identifierName"},string(){switch(J){case"\\":return uu(),void(j+=function(){const u=Y(),D=function(){switch(Y()){case"b":return uu(),"\b";case"f":return uu(),"\f";case"n":return uu(),"\n";case"r":return uu(),"\r";case"t":return uu(),"\t";case"v":return uu(),"\v"}return}();if(D)return D;switch(u){case"0":if(uu(),H.JudgeUtil.isDigit(Y()))throw Eu(x.Char,uu());return"\0";case"x":return uu(),function(){let u="",D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());if(u+=uu(),D=Y(),!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());return u+=uu(),String.fromCodePoint(parseInt(u,16))}();case"u":return uu(),ru();case"\n":case"\u2028":case"\u2029":return uu(),"";case"\r":return uu(),"\n"===Y()&&uu(),""}if(void 0===u||H.JudgeUtil.isDigitWithoutZero(u))throw Eu(x.Char,uu());return uu()}());case'"':case"'":if(J===q){const u=eu("string",j);return uu(),u}return void(j+=uu());case"\n":case"\r":case void 0:throw Eu(x.Char,uu());case"\u2028":case"\u2029":!function(u){console.warn(`JSON5: '${Fu(u)}' in strings is not valid ECMAScript; consider escaping.`)}(J)}j+=uu()}};function eu(u,D){return{type:u,value:D,line:$,column:k}}function tu(u){for(const D of u){if(Y()!==D)throw Eu(x.Char,uu());uu()}}function ru(){let u="",D=4;for(;D-- >0;){const D=Y();if(!H.JudgeUtil.isHexDigit(D))throw Eu(x.Char,uu());u+=uu()}return String.fromCodePoint(parseInt(u,16))}const nu={start(){if("eof"===M.type)throw Eu(x.EOF);iu()},beforePropertyName(){switch(M.type){case"identifier":case"string":return V=M.value,void(W="afterPropertyName");case"punctuator":return void Cu();case"eof":throw Eu(x.EOF)}},afterPropertyName(){if("eof"===M.type)throw Eu(x.EOF);W="beforePropertyValue"},beforePropertyValue(){if("eof"===M.type)throw Eu(x.EOF);iu()},afterPropertyValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforePropertyName");case"}":Cu()}},beforeArrayValue(){if("eof"===M.type)throw Eu(x.EOF);"punctuator"!==M.type||"]"!==M.value?iu():Cu()},afterArrayValue(){if("eof"===M.type)throw Eu(x.EOF);switch(M.value){case",":return void(W="beforeArrayValue");case"]":Cu()}},end(){}};function iu(){const u=function(){let u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}return u}();if(K&&"object"==typeof u&&(u._line=$,u._column=k),void 0===G)G=u;else{const D=U[U.length-1];Array.isArray(D)?K&&"object"!=typeof u?D.push({value:u,_line:$,_column:k}):D.push(u):D[V]=K&&"object"!=typeof u?{value:u,_line:$,_column:k}:u}!function(u){if(u&&"object"==typeof u)U.push(u),W=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}}(u)}function Cu(){U.pop();const u=U[U.length-1];W=u?Array.isArray(u)?"afterArrayValue":"afterPropertyValue":"end"}function Fu(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return`\\x${`00${D}`.substring(D.length)}`}return u}function Eu(u,D){let e="";switch(u){case x.Char:e=void 0===D?`JSON5: invalid end of input at ${$}:${k}`:`JSON5: invalid character '${Fu(D)}' at ${$}:${k}`;break;case x.EOF:e=`JSON5: invalid end of input at ${$}:${k}`;break;case x.Identifier:k-=5,e=`JSON5: invalid identifier character at ${$}:${k}`}const t=new Au(e);return t.lineNumber=$,t.columnNumber=k,t}class Au extends SyntaxError{}var ou={},au=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),cu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),su=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&au(D,u,e);return cu(D,u),D},lu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ou,"__esModule",{value:!0}),ou.isFileExists=ou.offlinePluginConversion=ou.executeCommand=ou.getNpmPath=ou.hasNpmPackInPaths=void 0;const Bu=r,du=lu(e),fu=su(u),_u=i,pu=l;ou.hasNpmPackInPaths=function(u,D){try{return require.resolve(u,{paths:[...D]}),!0}catch(u){return!1}},ou.getNpmPath=function(){const u=process.execPath;return fu.join(fu.dirname(u),_u.NPM_TOOL)},ou.executeCommand=function(u,D,e){0!==(0,Bu.spawnSync)(u,D,e).status&&(0,pu.logErrorAndExit)(`Error: ${u} ${D} execute failed.See above for details.`)},ou.offlinePluginConversion=function(u,D){return D.startsWith("file:")||D.endsWith(".tgz")?fu.resolve(u,_u.HVIGOR,D.replace("file:","")):D},ou.isFileExists=function(u){return du.default.existsSync(u)&&du.default.statSync(u).isFile()};var Ou=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),hu=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),Pu=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&Ou(D,u,e);return hu(D,u),D},vu=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(P,"__esModule",{value:!0});var gu=P.initProjectWorkSpace=void 0;const mu=Pu(e),Ru=vu(D),yu=Pu(u),Iu=v,Nu=i,bu=g,Su=l,wu=ou;let Hu,xu,Mu;function Tu(u,D,e){return void 0!==e.dependencies&&(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,D.dependencies[u])===yu.normalize(e.dependencies[u])}function Vu(){const u=yu.join(Mu,Nu.WORK_SPACE);if((0,Su.logInfoPrintConsole)("Hvigor cleaning..."),!mu.existsSync(u))return;const D=mu.readdirSync(u);if(!D||0===D.length)return;const e=yu.resolve(Mu,"node_modules","@ohos","hvigor","bin","hvigor.js");mu.existsSync(e)&&(0,wu.executeCommand)(process.argv[0],[e,"--stop-daemon"],{});try{D.forEach((D=>{mu.rmSync(yu.resolve(u,D),{recursive:!0})}))}catch(D){(0,Su.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${u}.`)}}gu=P.initProjectWorkSpace=function(){if(Hu=function(){const u=yu.resolve(Nu.HVIGOR_PROJECT_WRAPPER_HOME,Nu.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);mu.existsSync(u)||(0,Su.logErrorAndExit)(`Error: Hvigor config file ${u} does not exist.`);return(0,bu.parseJsonFile)(u)}(),Mu=function(u){let D;D=function(u){let D=u.hvigorVersion;if(D.startsWith("file:")||D.endsWith(".tgz"))return!1;const e=u.dependencies,t=Object.getOwnPropertyNames(e);for(const u of t){const D=e[u];if(D.startsWith("file:")||D.endsWith(".tgz"))return!1}if(1===t.length&&"@ohos/hvigor-ohos-plugin"===t[0])return D>"2.5.0";return!1}(u)?function(u){let D=`${Nu.HVIGOR_ENGINE_PACKAGE_NAME}@${u.hvigorVersion}`;const e=u.dependencies;if(e){Object.getOwnPropertyNames(e).sort().forEach((u=>{D+=`,${u}@${e[u]}`}))}return(0,Iu.hash)(D)}(u):(0,Iu.hash)(process.cwd());return yu.resolve(Ru.default.homedir(),".hvigor","project_caches",D)}(Hu),xu=function(){const u=yu.resolve(Mu,Nu.WORK_SPACE,Nu.DEFAULT_PACKAGE_JSON);return mu.existsSync(u)?(0,bu.parseJsonFile)(u):{dependencies:{}}}(),!(0,wu.hasNpmPackInPaths)(Nu.HVIGOR_ENGINE_PACKAGE_NAME,[yu.join(Mu,Nu.WORK_SPACE)])||(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion)!==xu.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]||!function(){function u(u){const D=null==u?void 0:u.dependencies;return void 0===D?0:Object.getOwnPropertyNames(D).length}const D=u(Hu),e=u(xu);if(D+1!==e)return!1;for(const u in null==Hu?void 0:Hu.dependencies)if(!(0,wu.hasNpmPackInPaths)(u,[yu.join(Mu,Nu.WORK_SPACE)])||!Tu(u,Hu,xu))return!1;return!0}()){Vu();try{!function(){(0,Su.logInfoPrintConsole)("Hvigor installing...");for(const u in Hu.dependencies)Hu.dependencies[u]&&(Hu.dependencies[u]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.dependencies[u]));const u={dependencies:{...Hu.dependencies}};u.dependencies[Nu.HVIGOR_ENGINE_PACKAGE_NAME]=(0,wu.offlinePluginConversion)(Nu.HVIGOR_PROJECT_ROOT_DIR,Hu.hvigorVersion);const D=yu.join(Mu,Nu.WORK_SPACE);try{mu.mkdirSync(D,{recursive:!0});const e=yu.resolve(D,Nu.DEFAULT_PACKAGE_JSON);mu.writeFileSync(e,JSON.stringify(u))}catch(u){(0,Su.logErrorAndExit)(u)}(function(){const u=["config","set","store-dir",Nu.HVIGOR_PNPM_STORE_PATH],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)})(),function(){const u=["install"],D={cwd:yu.join(Mu,Nu.WORK_SPACE),stdio:["inherit","inherit","inherit"]};(0,wu.executeCommand)(Nu.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,u,D)}(),(0,Su.logInfoPrintConsole)("Hvigor install success.")}()}catch(u){Vu()}}return Mu};var Gu={};!function(t){var C=n&&n.__createBinding||(Object.create?function(u,D,e,t){void 0===t&&(t=e);var r=Object.getOwnPropertyDescriptor(D,e);r&&!("get"in r?!D.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return D[e]}}),Object.defineProperty(u,t,r)}:function(u,D,e,t){void 0===t&&(t=e),u[t]=D[e]}),F=n&&n.__setModuleDefault||(Object.create?function(u,D){Object.defineProperty(u,"default",{enumerable:!0,value:D})}:function(u,D){u.default=D}),E=n&&n.__importStar||function(u){if(u&&u.__esModule)return u;var D={};if(null!=u)for(var e in u)"default"!==e&&Object.prototype.hasOwnProperty.call(u,e)&&C(D,u,e);return F(D,u),D},A=n&&n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.executeInstallPnpm=t.isPnpmInstalled=t.environmentHandler=t.checkNpmConifg=t.PNPM_VERSION=void 0;const o=r,a=E(e),c=A(D),s=E(u),B=i,d=l,f=ou;t.PNPM_VERSION="7.30.0",t.checkNpmConifg=function(){const u=s.resolve(B.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),D=s.resolve(c.default.homedir(),".npmrc");if((0,f.isFileExists)(u)||(0,f.isFileExists)(D))return;const e=(0,f.getNpmPath)(),t=(0,o.spawnSync)(e,["config","get","prefix"],{cwd:B.HVIGOR_PROJECT_ROOT_DIR});if(0!==t.status||!t.stdout)return void(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const r=s.resolve(`${t.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,f.isFileExists)(r)||(0,d.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},t.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},t.isPnpmInstalled=function(){return!!a.existsSync(B.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,f.hasNpmPackInPaths)("pnpm",[B.HVIGOR_WRAPPER_TOOLS_HOME])},t.executeInstallPnpm=function(){(0,d.logInfoPrintConsole)(`Installing pnpm@${t.PNPM_VERSION}...`);const u=(0,f.getNpmPath)();!function(){const u=s.resolve(B.HVIGOR_WRAPPER_TOOLS_HOME,B.DEFAULT_PACKAGE_JSON);try{a.existsSync(B.HVIGOR_WRAPPER_TOOLS_HOME)||a.mkdirSync(B.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const D={dependencies:{}};D.dependencies[B.PNPM]=t.PNPM_VERSION,a.writeFileSync(u,JSON.stringify(D))}catch(D){(0,d.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${u} failed.`)}}(),(0,f.executeCommand)(u,["install","pnpm"],{cwd:B.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,d.logInfoPrintConsole)("Pnpm install success.")}}(Gu),function(){Gu.checkNpmConifg(),Gu.environmentHandler(),Gu.isPnpmInstalled()||Gu.executeInstallPnpm();const D=gu();_(u.join(D,i.WORK_SPACE))}(); \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/hvigorfile.ts b/function/ui_compare_rh/uicompare/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..6478186902c0c1ad7c966a929c7d6b7d8ae7a9f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigorfile.ts @@ -0,0 +1,2 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { appTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/hvigorw b/function/ui_compare_rh/uicompare/hvigorw new file mode 100644 index 0000000000000000000000000000000000000000..54aadd226b453397860013d328fd01031648fc31 --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigorw @@ -0,0 +1,48 @@ +#!/bin/bash + +# ---------------------------------------------------------------------------- +# Hvigor startup script, version 1.0.0 +# +# Required ENV vars: +# ------------------ +# NODE_HOME - location of a Node home dir +# or +# Add /usr/local/nodejs/bin to the PATH environment variable +# ---------------------------------------------------------------------------- + +HVIGOR_APP_HOME=$(dirname $(readlink -f $0)) +HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js +warn() { + echo "" + echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" +} + +error() { + echo "" + echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" +} + +fail() { + error "$@" + exit 1 +} + +# Determine node to start hvigor wrapper script +if [ -n "${NODE_HOME}" ];then + EXECUTABLE_NODE="${NODE_HOME}/bin/node" + if [ ! -x "$EXECUTABLE_NODE" ];then + fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed" + fi +else + EXECUTABLE_NODE="node" + which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path" +fi + +# Check hvigor wrapper script +if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then + fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}" +fi + +# start hvigor-wrapper script +exec "${EXECUTABLE_NODE}" \ + "${HVIGOR_WRAPPER_SCRIPT}" "$@" diff --git a/function/ui_compare_rh/uicompare/hvigorw.bat b/function/ui_compare_rh/uicompare/hvigorw.bat new file mode 100644 index 0000000000000000000000000000000000000000..6861293e47dfd0186da380321b73be9033507e24 --- /dev/null +++ b/function/ui_compare_rh/uicompare/hvigorw.bat @@ -0,0 +1,64 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Hvigor startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js +set NODE_EXE=node.exe + +goto start + +:start +@rem Find node.exe +if defined NODE_HOME goto findNodeFromNodeHome + +%NODE_EXE% --version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. +echo. +echo Please set the NODE_HOME variable in your environment to match the +echo location of your NodeJs installation. + +goto fail + +:findNodeFromNodeHome +set NODE_HOME=%NODE_HOME:"=% +set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% + +if exist "%NODE_EXE_PATH%" goto execute +echo. +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. +echo. +echo Please set the NODE_HOME variable in your environment to match the +echo location of your NodeJs installation. + +goto fail + +:execute +@rem Execute hvigor +"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* + +if "%ERRORLEVEL%" == "0" goto hvigorwEnd + +:fail +exit /b 1 + +:hvigorwEnd +if "%OS%" == "Windows_NT" endlocal + +:end diff --git a/function/ui_compare_rh/uicompare/oh-package-lock.json5 b/function/ui_compare_rh/uicompare/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..1faa6b99d48e66baa345e65d2fa943a546f91182 --- /dev/null +++ b/function/ui_compare_rh/uicompare/oh-package-lock.json5 @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" + }, + "packages": { + "@ohos/hypium@1.0.6": { + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", + "registryType": "ohpm", + "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/oh-package.json5 b/function/ui_compare_rh/uicompare/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e9c1666457f6b9c0b559b1e7098db3085e4a5d9d --- /dev/null +++ b/function/ui_compare_rh/uicompare/oh-package.json5 @@ -0,0 +1,13 @@ +{ + "modelVersion": "5.0.0", + "license": "", + "devDependencies": { + "@ohos/hypium": "1.0.16" + }, + "author": "", + "name": "uicompare", + "description": "Please describe the basic information.", + "main": "", + "version": "1.0.0", + "dependencies": {} +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare_tools/UiCompareTools_progress.py b/function/ui_compare_rh/uicompare_tools/UiCompareTools_progress.py new file mode 100644 index 0000000000000000000000000000000000000000..94ec622d4d9466e428eac2b5906a3df2745984bb --- /dev/null +++ b/function/ui_compare_rh/uicompare_tools/UiCompareTools_progress.py @@ -0,0 +1,2810 @@ +# -*- coding:utf-8 -*- + +import os + +import sys + +import time + +import json + +import openpyxl + +import threading + +import subprocess + +import filecmp + +import shutil + +from multiprocessing import Manager, Pool, Process + +import numpy as np + +from datetime import datetime + +from PIL import Image + +from PIL import ImageChops + +from itertools import product + + + +import argparse + +parser = argparse.ArgumentParser(description='manual to this script') + +parser.add_argument("--type", type=str) + +parser.add_argument("--excel", type=str) + +parser.add_argument("--dir", type=str) + +parser.add_argument("--hap", type=str) + +parser.add_argument("--json", type=str) + +args = parser.parse_args() + +mode = args.type + +excel_path = args.excel + +base_path = args.dir + +hap_path = args.hap + +json_path = args.json + + + +new_time = time.strftime('%Y%m%d_%H%M%S', time.localtime(time.time())) + +now_time = str(new_time) + +dir_path = os.path.dirname(os.path.abspath(__file__)) + +reports_path = os.path.join(dir_path, "reports") + +html_path = "./mode.html" + +run_json_path = os.path.join(reports_path, "run_json_" + now_time) + +run_report_path = os.path.join(reports_path, "run_report_{}.html".format(now_time)) + +diff_report_path = os.path.join(reports_path, "diff_report_{}.html".format(now_time)) + +device_list = [] + +image_size_diff = [] + + + +def get_file_list(file_path, file_key): + + # 返回指定文件夹file_path下所有的特定文件名列表 + + file_list = [] + + if os.path.isdir(file_path) == False: + + print("当前路径{}非文件夹,请重新输入正确的文件夹路径后重试".format(file_path)) + + return [] + + elif os.path.exists(file_path) == False: + + print("当前路径{}不存在,请重新输入正确的文件夹路径后重试".format(file_path)) + + return [] + + for file in os.listdir(file_path): + + if file.endswith(file_key): + + file_list.append(file) + + return file_list + + + + + +def write_report_html(data, mode="0", image_path=""): + + if os.path.exists(html_path) == False: + + print("模板html不存在,未生成html报告") + + return + + if mode == "0": + + shutil.copy(html_path, run_report_path) + + module_data = "" + + total_data = "" + + print("report_data: ", data) + + for key, value in data.items(): + + if key == "Total_data": + + with open(run_report_path, "a") as f: + + f.write("""Save Image Path: + + + + + + + + + + + + + + + + + +
""" + image_path + """
Test Start/ End Time:""" + value["start_end_time"] + """Execution Time:""" + value["run_time"] + """
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MOUDULESTOTAL_TESTSPASSCASE_FAILGET_FAILPASS_RATE
""" + value["moudle_count"] + """""" + value["Total"] + """""" + value["Pass"] + """""" + value["Case_fail"] + """""" + value["Get_fail"] + """""" + value["Pass_rate"] + """
+ + + +""") + + else: + + if isinstance(value, int): + + continue + + total_data += """ + + + + """ + key + """ + + """ + str(value["Total"]) + """ + + """ + str(value["Pass"]) + """ + + """ + str(value["Case_fail"]) + """ + + """ + str(value["Get_fail"]) + """ + + """ + value["Pass_rate"] + """ + + + +""" + + title_flag = True + + for case_name, run_result, use_time in value["result_list"]: + + if run_result == "PASS": + + # 仅展示执行失败用例,执行成功的用例不展示 + + continue + + elif title_flag == True: + + module_data += """ + + + + + + + + + +
+ + """ + key + """ + +
+ + + + + + + + + + + + + + + + """ + + title_flag = False + + module_data += """ + + + + + + + + + + """ + + if title_flag == False: + + module_data += """ + +
ModuleTestsuiteTestcaseResult
""" + key + """""" + value["module_name"] + """""" + case_name + """""" + run_result + """
""" + + module_data += """ + + + + + + + +""" + + total_data += "" + + with open(run_report_path, "a") as f: + + f.write(total_data + module_data) + + print("获取图片报告已生成:", run_report_path) + + elif mode == "1": + + shutil.copy(html_path, diff_report_path) + + module_data = "" + + total_data = "" + + for key, value in data.items(): + + if key == "Total_data": + + with open(diff_report_path, "a") as f: + + f.write("""Diff Image Path: + + + + + + + + + + + + + + + + + +
""" + image_path + """
Test Start/ End Time:""" + value["start_end_time"] + """Execution Time:""" + value["run_time"] + """
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MOUDULESTOTAL_TESTSPASSCASE_FAILGET_FAILBASE_IMAGECOMPARE_FAILPASS_RATE
""" + value["moudle_count"] + """""" + value["Total"] + """""" + value["Pass"] + """""" + value["Case_fail"] + """""" + value["Get_fail"] + """""" + value["Base_image_fail"] + """""" + value["Compare_fail"] + """""" + value["Pass_rate"] + """
+ + """) + + else: + + if isinstance(value, int): + + continue + + total_data += """ + + + + """ + key + """ + + """ + str(value["Total"]) + """ + + """ + str(value["Pass"]) + """ + + """ + str(value["Case_fail"]) + """ + + """ + str(value["Get_fail"]) + """ + + """ + str(value["Base_image_fail"]) + """ + + """ + str(value["Compare_fail"]) + """ + + """ + value["Pass_rate"] + """ + + + +""" + + add_flag = True + + for case_name, run_result, use_time in value["result_list"]: + + if run_result == "PASS": + + # 仅展示对比失败用例,对比图片相同的用例不展示 + + continue + + else: + + if add_flag == True: + + # 仅在有对比失败用例时,才写入标题栏 + + module_data += """ + + + + + + + + + +
+ + """ + key + """ + +
+ + + + + + + + + + + + + + """ + + add_flag = False + + module_data += """ + + + + + + + + """ + + if add_flag == False: + + module_data += """ + +
ModuleTestcaseResult
""" + key + """""" + case_name + """""" + run_result + """
""" + + module_data += """ + + + + + + + + """ + + total_data += "" + + with open(diff_report_path, "a") as f: + + f.write(total_data + module_data) + + print("对比图片报告已生成:", diff_report_path) + + + + + +def run_cmd(command): + + # 执行cmd命令,返回执行日志 + + p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE) + + out, err = p.communicate() + + # print("out: ", out) + + # print("err: ", err) + + if err is None: + + return out.decode('utf-8') + + return err.decode('utf-8') + + + + + +def checkResult(command, keyword="", case_name=""): + + # 检查设备是否连接成功或用例执行成功 + + start_time = datetime.timestamp(datetime.now()) + + out = run_cmd(command) + + end_time = datetime.timestamp(datetime.now()) + + use_time = round(end_time - start_time, 3) + + if "#" not in command: + + # 批量执行,计算平均耗时 + + use_time = int(use_time / len(out.splitlines())) + + print("{0} run use_time: {1}s".format(case_name, use_time)) + + if "error: get bundle info failed" in out: + + print("【ERROR】测试应用hap未安装,请成功安装后重试\n", out) + + return "测试hap未安装" + + elif keyword in command: + + # 检查设备是否连接成功 + + if "[Empty]" in out: + + # 设备未连接时,显示“[Empty]” + + print("设备未连接,请连接设备或检查线路连接是否正常,UI工具将开始尝试重连") + + return case_name + " Devices connect fail" + + elif out == "": + + # 无hdc.exe + + return "不支持hdc命令, 仅支持hdc_std命令" + + elif len(out) > 15: + + return "设备已连接,可正常使用" + + elif "execute timeout" in out: + + return "timeout" + + elif "Not found entry_test/ets/" in out: + + return True + + elif "stream=Tests run: 0" in out: + + return False + + elif keyword != "list targets": + + image_name_list = [] + + error_case_list = [] + + command_list = [] + + # 获取用例名和失败用例名 + + index_flag = 0 + + for line_data in out.splitlines(): + + # print(index_flag, line_data) + + # 用例执行成功 + + if "OHOS_REPORT_STATUS_CODE: 0" in line_data: + + # 当前用例名 + + case_name = out.splitlines()[index_flag - 1].split("=")[1] + + image_name_list.append([case_name, "PASS", use_time]) + + print(case_name, " run succ !!!\n") + + elif "OHOS_REPORT_STATUS_CODE: -1" in line_data or "TestFinished-ResultCode: -1" in line_data: + + # 用例执行失败 + + if "TestFinished-ResultCode: -1" in line_data and index_flag >= 3: + + # 当前用例名 + + case_name = out.splitlines()[index_flag - 3].split("test=")[1] + + error_info = out.splitlines()[index_flag + 1].split(":")[1] + + print(out.splitlines()[index_flag + 1]) + + image_name_list.append([case_name, "CASE_FAIL: " + error_info, use_time]) + + elif "OHOS_REPORT_STATUS_CODE: -1" in line_data and index_flag >= 2: + + case_name = out.splitlines()[index_flag - 1].split("test=")[1] + + # 执行失败原因 + + error_info = out.splitlines()[index_flag - 2] + + print(case_name, " CASE_FAIL: " + error_info) + + image_name_list.append([case_name, "CASE_FAIL: " + error_info, use_time]) + + if "#" in command: + + # 单条用例 + + error_case_list.append((command, case_name)) + + elif command not in command_list: + + # 多条用例,只添加一次即可(因为多条用例无法执行单用例) + + error_case_list.append((command, case_name)) + + # 仅用来判断多用例执行失败情况 + + command_list.append(command) + + print(case_name, " run fail !!!\n") + + elif keyword in line_data: + + # 解析用例执行总结果 + + print(line_data) + + index_flag += 1 + + # print("image_name_list: ", image_name_list) + + return image_name_list, error_case_list + + else: + + return False + + + + + +def delete_pictures(bundle_name): + + # 删除设备中应用原有截图 + + app_list = run_cmd("hdc shell cd /data/app/el2/100/base/;ls") + + if bundle_name in app_list.split("\r\n"): + + # 删除指定应用文件夹内截图 + + app_path = "/data/app/el2/100/base/{}/haps/entry_test/files/".format(bundle_name) + + print(app_path) + + run_cmd("hdc shell rm -rf {}*".format(app_path)) + + time.sleep(1) + + out = run_cmd("hdc shell cd {};du -sk".format(app_path)).split(".")[0].strip() + + print(out) + + if "/bin/sh" in out: + + print("设备中不存在待删除图片!!!") + + return + + print("当前{0}文件夹内存(KB):{1}".format(bundle_name, out)) + + count = 0 + + while int(out) > 10 and count <= 30: + + out = run_cmd("hdc shell cd {};du -sk".format(app_path)).split(".")[0].strip() + + print("当前{0}文件夹内存(KB):{1}".format(bundle_name, out)) + + count += 1 + + time.sleep(5) + + print("设备中原有用例截图已全部删除!!!") + + else: + + print("设备中不存在待删除图片!!!") + + + + + +class UiCompareTools(): + + """ + + UI对比工具 + + """ + + def run_testcases(self, sn, data, base_path, excel_path, report_path, excel_name, mode='0'): + + # 遍历执行Execl用例,并将设备端webp文件保存至本地 + + # 设备解锁:兼容部分版本执行完用例设备会锁屏 + + # run_cmd('hdc -t {} shell uinput -T -m 1280 800 1280 800 1000'.format(sn)) + + # run_cmd('hdc -t {} shell uinput -T -m 500 2000 500 500 600'.format(sn)) + + print("excel_path: ", excel_path) + + install_flag = False + + bundle_name = "" + + class_name = "" + + result_list = [] + + pass_count = 0 + + case_fail = 0 + + get_fail = 0 + + run_flag = False + + for case in data: + + try: + + class_name = case[0] + + case_name = case[1] + + bundle_name = case[2] + + if case_name is None: + + run_flag = True + + else: + + run_flag = False + + # 先卸载该应用,避免设备上存在已安装同名应用导致测试hap无法安装 + + if install_flag == False: + + # 卸载、安装仅在执行第一条用例前执行一次 + + install_flag = True + + # 卸载hap + + if bundle_name is not None: + + run_cmd("hdc -t {0} uninstall {1}".format(sn, bundle_name)) + + # 安装hap + + hap_install_path = os.path.join(hap_path, excel_name + ".hap") + + print("hap_install_path: ", hap_install_path) + + if os.path.exists(hap_install_path) == False: + + # hap包路径不存在 + + for case in data: + + case_fail += 1 + + result_list.append( + + [case[1], "CASE_FAIL: The HAP path dose not exist: " + hap_install_path, "0"]) + + print("{}组件hap包{}安装路径不存在:{}".format(excel_name, bundle_name, hap_install_path)) + + break + + out = run_cmd("hdc -t {0} install {1}".format(sn, hap_install_path)) + + print("Install result: ", out) + + if "install failed" in out: + + # hap包安装失败 + + for case in data: + + case_fail += 1 + + result_list.append( + + [case[1], "CASE_FAIL: Failed to install the HAP: " + hap_install_path, "0"]) + + print("{}组件hap包{}安装失败: {}".format(excel_name, bundle_name, hap_install_path)) + + break + + + + # 单条执行 + + command = "hdc -t {3} shell aa test -b {0} -m entry_test -s unittest /ets/testrunner/OpenHarmonyTestRunner -s class {1}#{2} -w 180000 -s timeout 15000".format(case[2], case[0], case[1], sn) + + # 批量执行 + + if case_name is None: + + run_flag = True + + # 删除设备中图片 + + delete_pictures(bundle_name) + + command = "hdc -t {2} shell aa test -b {0} -m entry_test -s unittest /ets/testrunner/OpenHarmonyTestRunner -s class {1} -w 180000 -s timeout 15000".format(case[2], case[0], sn) + + result = checkResult(command, "stream=Tests run:", case_name) + + + + if result == True: + + command = command.replace("/ets/testrunner/OpenHarmonyTestRunner", "OpenHarmonyTestRunner") + + print("new command1: ", command) + + result = checkResult(command, "stream=Tests run:", case_name) + + + + if result == True: + + command = command.replace("OpenHarmonyTestRunner", "/ets/Testrunner/OpenHarmonyTestRunner") + + print("new command2: ", command) + + result = checkResult(command, "stream=Tests run:", case_name) + + + + count = 1 + + while result == "timeout" and count < 6: + + # 若用例执行超时,延长超时的时间5秒,最长延长至30秒,若仍超时,则判定用例执行失败 + + command = command.replace(str(15000 + 5000 * (count - 1)), str(15000 + 5000 * count)) + + print("new command3: ", command) + + result = checkResult(command, "stream=Tests run:", case_name) + + count += 1 + + + + # 存在失败用例,重新执行 + + count_error = 1 + + while run_flag == False and count_error <= 5: + + # 若执行失败,重试5次 + + if type(result) == tuple: + + if len(result) == 2 and len(result[1]) >= 1: + + print("重新执行失败用例:", result[1]) + + with open(report_path, "a") as file: + + for error_info in result[1]: + + file.write(class_name + ": " + error_info[1] + " run fail\n") + + # if run_flag == True: + + # # 删除设备中图片 + + # delete_pictures(bundle_name) + + result = checkResult(command, "stream=Tests run:", case_name) + + count_error += 1 + + else: + + break + + else: + + break + + + + if result == True or result == False: + + print("用例执行失败:{}".format(command)) + + result = [[[case_name, "CASE_FAIL: testcase not run", "0"]], []] + + elif result == "测试hap未安装": + + result = [[[case_name, "CASE_FAIL: Failed to install the HAP or The bundle name in the Excel is inconsistent with that in the HAP", "0"]], []] + + + + # 批量循环取图 + + if class_name and (case_name is None): + + row_num = 1 + + data_list = [] + + for case_name1, case_result, run_time in result[0]: + + # 用例执行成功,将设备中webp文件保存至本地 + + if case_result == "PASS": + + # 用例执行成功,才会创建保存图片的文件夹 + + if os.path.exists(base_path) == False: + + os.makedirs(base_path) + + print('base_path: ', base_path) + + webp_path = os.path.join(base_path, "IMG_%s.webp" % case_name1) + + device_webp = "data/app/el2/100/base/{0}/haps/entry_test/files/".format(case[2]) + + device_path = device_webp + "IMG_%s.webp" % case_name1 + + out_content2 = run_cmd("hdc -t %s file recv %s %s" % (sn, device_path, webp_path)) + + print(out_content2) + + if "FileTransfer finish" in out_content2: + + pass_count += 1 + + print("%s.webp文件保存成功\n" % case_name1) + + elif "no such file" in out_content2: + + get_fail += 1 + + file_path = out_content2.split("path:")[1] + + # 取图失败,更新用例执行结果数据 + + result[0][row_num - 1][1] = "GET_FAIL: save image fail: {}".format(file_path) + + print("设备中 %s 文件不存在,保存本地失败\n" % file_path) + + with open(report_path, "a") as file: + + file.write("%s: %s save fail: 设备中该文件不存在\n" % (class_name, case_name1)) + + else: + + count = 0 + + while count <= 30: + + # 增加延时,确保webp文件成功保存至本地 + + time.sleep(1) + + count += 1 + + if "FileTransfer finish" in out_content2: + + break + + else: + + case_fail += 1 + + # 数据存储至列表 + + data_list.append([row_num, class_name, case_name1, case[2], case_result]) + + row_num += 1 + + # 取完图后,删除设备中所有图片 + + delete_pictures(bundle_name) + + try: + + # 将用例执行结果写入Excel + + self.write_excel_data(excel_path, sheet_name=case[0], result_data=data_list) + + except Exception as e: + + print("【ERROR】write_excel_data: %s" % str(e)) + + + + # 执行单条取图 + + elif class_name and case_name: + + # 用例执行成功才从设备中取资源保存至本地 + + # 将用例执行结果写入Excel + + # try: + + # self.write_excel_data(excel_path, result_data=result[0], compare=2) + + # except Exception as e: + + # print("【ERROR】write_excel_data: %s" % str(e)) + + + + run_result = "" + + if type(result) == tuple: + + try: + + run_result = result[0][0][1] + + except: + + result[0][0] = [case_name, "CASE_FAIL: run testcase fail", "0"] + + run_result = result[0][0][1] + + # print("run_result: ", run_result) + + # 若用例执行成功,将设备中webp文件保存至本地 + + if run_result == "PASS": + + # 用例执行成功,才会创建保存图片的文件夹 + + if os.path.exists(base_path) == False: + + os.makedirs(base_path) + + # run_count = 2 + + # while run_count <= 2: + + # txt_path = os.path.join(base_path, case_name + ".txt") + + # remote_txt = "/storage/media/100/local/files/Documents/TXT_test.txt" + + # out_content2 = run_cmd("hdc -t %s file recv %s %s" % (sn, remote_txt, txt_path)) + + webp_path = os.path.join(base_path, case_name + ".webp") + + remote_webp = "data/app/el2/100/base/{0}/haps/entry_test/files/IMG_test.webp".format(case[2]) + + out_content2 = run_cmd("hdc -t %s file recv %s %s" % (sn, remote_webp, webp_path)) + + print(out_content2) + + if "FileTransfer finish" in out_content2: + + # 累加执行用例成功且成功取图的用例个数 + + pass_count += 1 + + print("%s: %s.webp文件保存成功\n" % (sn, case_name)) + + elif "no such file" in out_content2: + + # 取图失败,重新执行用例后再取图三次 + + print("设备中 %s 文件不存在,保存本地失败\n" % remote_webp) + + result = checkResult(command, "stream=Tests run:", case_name) + + if result == "PASS": + + # 用例执行成功再取图片 + + count = 0 + + while count < 3: + + time.sleep(5) + + out_content2 = run_cmd("hdc -t %s file recv %s %s" % (sn, remote_webp, webp_path)) + + print(out_content2) + + if "FileTransfer finish" in out_content2: + + pass_count += 1 + + print("%s: %s.webp文件保存成功\n" % (sn, case_name)) + + break + + count += 1 + + else: + + # 用例执行失败 + + case_fail += 1 + + else: + + count = 0 + + while count <= 30: + + # 增加延时,确保webp文件成功保存至本地 + + time.sleep(1) + + count += 1 + + if "FileTransfer finish" in out_content2: + + pass_count += 1 + + print("%s: %s.webp文件保存成功\n" % (sn, case_name)) + + break + + if "no such file" in out_content2: + + get_fail += 1 + + file_path = out_content2.split("path:")[1] + + # 取图失败,更新用例执行结果数据 + + result[0][0][1] = "GET_FAIL: save image fail: {}".format(file_path) + + print("设备%s中 %s 文件不存在,保存本地失败\n" % (sn, file_path)) + + with open(report_path, "a") as file: + + file.write("%s: %s save fail: 设备%s中该文件不存在\n" % (class_name, case_name, sn)) + + else: + + case_fail += 1 + + if len(result[0]) == 1: + + result_list.append(result[0][0]) + + except Exception as e: + + print("[ERROR] Get Image fail: ", str(e)) + + time.sleep(5) + + # 用例执行结束,卸载hap + + if bundle_name is not None: + + run_cmd("hdc -t %s uninstall %s" % (sn, bundle_name)) + + time.sleep(2) + + if mode == "0": + + print("{}.xlsx 中所有用例均已执行,基线图源均已获取".format(excel_name)) + + elif mode == "1": + + print("{}.xlsx 中所有用例均已执行,对比图源均已获取".format(excel_name)) + + if pass_count != len(result_list) - case_fail - get_fail: + + pass_count = len(result_list) - case_fail - get_fail + + if len(result_list) <= 0: + + total_num = case_fail + get_fail + + else: + + total_num = len(result_list) + + result_data = {"Total": total_num, + + "Pass": pass_count, + + "Case_fail": case_fail, + + "Get_fail": get_fail, + + "Pass_rate": str(int((pass_count/len(data))*100)) + "%", + + "result_list": result_list, + + "module_name": class_name} + + # print("result_data: ", result_data) + + return result_data + + + + def read_excel_data(self, excel_path): + + # 读取Excel表中类名和用例名 + + if os.path.exists(excel_path) == False: + + print("当前Excel路径不存在: %s" % excel_path) + + return False + + else: + + data_list = [] + + try: + + wb = openpyxl.load_workbook(excel_path) + + # 默认取第一张表 + + sheet = wb.worksheets[0] + + rows = sheet.max_row + + + + for row in range(1, rows): + + # 获取第二列的数据:类名 + + class_name = sheet.cell(row + 1, 2).value + + if class_name is None: + + print("Excel表中有效数据行数: ", row - 1) + + break + + # 获取第三列的数据:用例名 + + case_name = sheet.cell(row + 1, 3).value + + # 获取第四列的数据:bundle_name + + bundle_name = sheet.cell(row + 1, 4).value + + data_list.append((class_name, case_name, bundle_name)) + + print('data_list: ', data_list) + + except Exception as e: + + print(str(e)) + + return data_list + + + + def write_excel_data(self, report_path, sheet_name="Sheet1", result_data=[], x=1, compare=0): + + # 将执行报告数据写入Excel表中 + + if os.path.exists(excel_path) == False: + + print("当前Excel路径不存在: %s" % excel_path) + + return False + + print("write_excel_data: ", excel_path) + + # 读取Excel表数据 + + try: + + wb = openpyxl.load_workbook(excel_path) + + if compare == 2: + + # 默认取第一张表(执行单条用例) + + sheet = wb.worksheets[0] + + elif sheet_name in wb.sheetnames: + + sheet = wb[sheet_name] + + else: + + # 若sheet页不存在,创建新的sheet页 + + sheet = wb.create_sheet(sheet_name) + + print("add sheet %s succ" % sheet_name) + + if compare == 0: + + sheet.append(["序号", "类名", "用例名", "bundle name", "生成图片结果"]) + + print("标题写入完成") + + elif compare == 1: + + sheet.append(["用例名", "对比结果", "耗时"]) + + for testcase in result_data: + + sheet.append(testcase) + + print("对比结果写入完成") + + wb.save(excel_path) + + # 写入result数据 + + rows = sheet.max_row + + cols = sheet.max_column + + if compare == 0 or compare == 2: + + if result_data == []: + + print("[ERROR] write excel data error") + + elif len(result_data) == 1: + + # 单条用例 + + for num in range(1, rows + 1): + + # print("num: ", num) + + if sheet.cell(num, 3).value == result_data[0][0]: + + for i in range(5, 100): + + if sheet.cell(num, i).value is None: + + sheet.cell(num, i, result_data[0][1]) + + if num == 2: + + print("单条用例:报告时间写入完成") + + sheet.cell(1, i, now_time) + + break + + break + + else: + + # 多条用例 + + if sheet.cell(x + 1, 1).value is None: + + # 首次写入 + + for data in result_data: + + sheet.append([data[0], data[1], data[2], data[3], data[4]]) + + print("write %s succ" % data[2]) + + else: + + # 非首次写入 + + if sheet.cell(rows, cols + 1).value is None: + + sheet.cell(1, cols + 1, now_time) + + print("多条用例:报告时间写入完成") + + cols += 1 + + for data in result_data: + + sheet.cell(data[0] + 1, cols, data[4]) + + print("add write %s succ" % data[2]) + + wb.save(excel_path) + + if sheet.cell(2, 1).value is None: + + # 删除空行 + + sheet.delete_rows(2) + + # 保存Excel文件 + + wb.save(excel_path) + + print('result_data: %s succ' % result_data) + + except Exception as e: + + with open(report_path, "a") as r1: + + r1.write("write Excel data error: {}\n".format(excel_path)) + + print(str(e), type(e)) + + if "Permission denied" in str(e): + + print("【ERROR】请先关闭本地已打开的Excel表格,再重新执行") + + + + def get_diff_files(self, excel_path, base_path, compare_path, run_result, now_time): + + # 比较两个文件夹中所有的webp文件,返回所有不同的文件名 + + base_path_exists = True + + if os.path.isdir(base_path) == False: + + base_path_exists = False + + print("{}基线图源文件夹路径不存在".format(base_path)) + + report_diff_list = [] + + case_fail_count = 0 + + get_fail_count = 0 + + base_image_fail = 0 + + compare_fail = 0 + + pass_count = 0 + + for case_name, case_result, use_time in run_result["result_list"]: + + if case_result == "PASS": + + baseImage_path = os.path.join(base_path, case_name + ".webp") + + compareImage_path = os.path.join(compare_path, case_name + ".webp") + + print("baseImage_path: ", baseImage_path) + + print("compareImage_path: ", compareImage_path) + + use_time = "0" + + if base_path_exists == False: + + # 基线图源文件夹路径不存在 + + base_image_fail += 1 + + case_result = "BASE_IMAGE: BaseImage moudle path does not exist: {}".format(base_path) + + elif os.path.exists(baseImage_path) == False: + + # 基线图源文件不存在 + + base_image_fail += 1 + + case_result = "BASE_IMAGE: BaseImage does not exist: {}".format(baseImage_path) + + elif os.path.exists(compareImage_path) == False: + + # 对比图片文件不存在 + + get_fail_count += 1 + + case_result = "GET_FAIL: Save image fail: {}".format(compareImage_path) + + else: + + start_time = datetime.timestamp(datetime.now()) + + # 对比图片,不同时会生成差异图 + + if self.compare_files(baseImage_path, compareImage_path) == False: + + case_result = "COMPARE_FAIL" + + compare_fail += 1 + + else: + + case_result = "PASS" + + pass_count += 1 + + end_time = datetime.timestamp(datetime.now()) + + use_time = str(round(end_time - start_time, 3)) + + elif "CASE_FAIL" in case_result: + + case_fail_count += 1 + + elif "GET_FAIL" in case_result: + + get_fail_count += 1 + + # 将用例执行结果数据保存至列表 + + report_diff_list.append([case_name, case_result, use_time]) + + + + # 将对比执行结果写入Excel + + # self.write_excel_data(excel_path, sheet_name="diff_%s" % now_time, result_data=report_diff_list, compare=1) + + case_count = run_result["Total"] + + if case_count == 0: + + pass_rate = 0 + + else: + + # 防止除数为0,导致异常 + + pass_rate = int(pass_count / case_count * 100) + + if pass_count != case_count - case_fail_count - get_fail_count - base_image_fail - compare_fail: + + pass_count = case_count - case_fail_count - get_fail_count - base_image_fail - compare_fail + + result_data = {"Total": case_count, + + "Pass": pass_count, + + "Case_fail": case_fail_count, + + "Get_fail": get_fail_count, + + "Base_image_fail": base_image_fail, + + "Compare_fail": compare_fail, + + "Pass_rate": str(pass_rate) + "%", + + "result_list": report_diff_list} + + print(result_data) + + return result_data + + + + def modify_image_color(self, num, height_unit, width, img_array, dst): + + # 修改图片像素颜色 + + height_1 = num * height_unit + + height_2 = (num + 1) * height_unit + + for h, w in product(range(height_1, height_2), range(width)): + + (b, g, r) = img_array[h, w] + + if (b, g, r) == (0, 0, 0): # 黑色 + + img_array[h, w] = (255, 255, 255) # 白色 + + else: + + img_array[h, w] = (255, 0, 0) # 剩余差异部分红色显示 + + dst[h, w] = img_array[h, w] + + return dst + + + + def compare_files(self, file1, file2): + + # 比较两个webp文件,如果它们相同则返回True,否则返回False + + if os.path.exists(file1) == False: + + print("当前文件路径不存在,请确认后重试:", file1) + + return False + + if os.path.exists(file2) == False: + + print("当前文件路径不存在,请确认后重试:", file2) + + return False + + # if filecmp.cmp(file1, file2) == True: + + if self.compare_file(file1, file2) == True: + + print("两张图片内容:完全相同") + + return True + + else: + + """ + + 比较图片,如果有不同则生成展示不同的图片 + + @参数一: file1: 基线图片的路径 + + @参数二: file2: 对比图片的路径 + + """ + + module_name = file1.split("\\")[-2] + + diff_path = os.path.join(reports_path, "diff_" + now_time, module_name) + + print("diff_path: ", diff_path) + + if os.path.exists(diff_path) == False: + + os.makedirs(diff_path) + + try: + + image_one = Image.open(file1) + + image_two = Image.open(file2) + + except Exception as e: + + print(str(e)) + + return False + + size1 = image_one.size + + size2 = image_two.size + + print("BaseImage size: {}\nCompareImage size: {}".format(size1, size2)) + + if size1 != size2: + + # 两张图片大小不一致, 无需对比,且不会生成差异图 + + if module_name not in image_size_diff: + + image_size_diff.append(module_name) + + path = os.path.join(reports_path, module_name + ".txt") + + with open(path, "a") as file: + + file.write("截图大小不一致组件列表: %s !!!\n" % str(image_size_diff)) + + with open(report_path, "a") as file: + + file.write("截图大小不一致组件列表: %s !!!\n" % str(image_size_diff)) + + return False + + try: + + diff = ImageChops.difference(image_one, image_two) + + if diff.getbbox() is None: + + # 两张图片相同 + + return True + + img_array = np.array(diff) # 把图像转成数组格式img = np.asarray(image) + + shape = img_array.shape + + height = shape[0] + + width = shape[1] + + dst = np.zeros((height, width, 3)) + + # for h, w in product(range(height), range(width)): + + # (b, g, r) = img_array[h, w] + + # if (b, g, r) == (0, 0, 0): # 黑色 + + # img_array[h, w] = (255, 255, 255) # 白色 + + # else: + + # img_array[h, w] = (255, 0, 0) # 剩余差异部分红色显示 + + # dst[h, w] = img_array[h, w] + + black_pixels = np.where( + + (img_array[:, :, 0] == 0) & (img_array[:, :, 1] == 0) & (img_array[:, :, 2] == 0)) + + dst[black_pixels] = [255, 255, 255] + + other_pixels = np.where( + + (img_array[:, :, 0] != 0) | (img_array[:, :, 1] != 0) | (img_array[:, :, 2] != 0)) + + dst[other_pixels] = [255, 0, 0] + + diff_image = Image.fromarray(np.uint8(dst)) + + print("【+】We are the not same!") + + # 保存差异图、基线图和对比图到diff_path下,命名规则:用例名_diff,用例名_base,用例名_compare + + case_name = file1.split("\\")[-1].split(".")[0] + + diff_save_path = os.path.join(diff_path, case_name + '_diff.webp') + + base_image_path = os.path.join(diff_path, case_name + '_base.webp') + + compare_image_path = os.path.join(diff_path, case_name + '_compare.webp') + + diff_image.save(diff_save_path) + + shutil.copy(file1, base_image_path) + + shutil.copy(file2, compare_image_path) + + except ValueError as e: + + text = ("表示图片大小和box对应的宽度不一致,参考API说明:Pastes another image into this image." + + "The box argument is either a 2-tuple giving the upper left corner, a 4-tuple defining the left, upper, " + + "right, and lower pixel coordinate, or None (same as (0, 0)). If a 4-tuple is given, the size of the pasted " + + "image must match the size of the region.使用2纬的box避免上述问题") + + print("【{0}】{1}".format(e, text)) + + print("两张图片内容:存在差异") + + return False + + + + def compare_file(self, file1, file2): + + with open(file1, "rb") as f1: + + data1 = f1.read() + + with open(file2, "rb") as f2: + + data2 = f2.read() + + return data1 == data2 + + + + def generate_report(self, different_files, report_path): + + # 生成报告显示具体哪个webp文件不同 + + if len(different_files) == 0: + + print("两个文件夹中的所有webp文件都相同。") + + return + + + + report = "以下图片在两个文件夹中存在差异:\n" + + for file in different_files: + + report += f"{file}\n" + + with open(report_path, "w") as r1: + + r1.write(report) + + print("webp文件比对完成,已生成报告:", report_path) + + + + + +def connect_device(device_list): + + # 检查设备是否成功连接 + + time.sleep(3) + + result = run_cmd("hdc list targets") + + now_device_list = result.split("\r\n")[-1] + + print("应连接设备 %d 台" % len(device_list)) + + + + # 先循环等待是否全部连接成功 + + count = 0 + + while len(device_list) != len(now_device_list) and count < 5: + + time.sleep(2) + + count += 1 + + + + # 获取未连接设备sn号 + + disconnect_device = [] + + if len(device_list) != len(now_device_list): + + for device in device_list: + + if device not in now_device_list: + + disconnect_device.append(device) + + else: + + print("设备均已成功连接PC") + + + + # 重试拉起未连接设备hdc,再查询 + + if len(disconnect_device) >= 1: + + print("设备连接异常, 开始重连设备") + + for sn in disconnect_device: + + for i in range(1, 16): + + SN = run_cmd("hdc -t {} shell power-shell setmode 602".format(sn)) + + time.sleep(2) + + # print("SN: ", SN) + + if "[Fail]" in SN: + + print("重连第 %d 次" % i) + + continue + + else: + + break + + run_cmd("hdc -t {} shell power-shell display -s 0".format(sn)) + + if len(device_list) == len(run_cmd("hdc list targets").split("\r\n")[-1]): + + print("设备均已成功连接PC") + + else: + + # 更新设备列表 + + device_list = run_cmd("hdc list targets").split("\r\n")[-1] + + return device_list + + + + + +def delete_and_reboot(sn): + + # 跑用例前删包,重启操作 + + run_cmd("hdc -t {} shell mount -o remount,rw /sys_prod".format(sn)) + + run_cmd("hdc -t {} shell rm -rf /sys_prod/app/SystemResourcesOverlay".format(sn)) + + # 重启设备 + + #run_cmd("hdc -t {} shell reboot".format(sn)) + + #print("设备 {} 重启中,请耐心等待50秒......".format(sn)) + + #time.sleep(50) + + # 当前设备类型 + + device = run_cmd('hdc -t {} shell param get const.product.model'.format(sn)) + + if "Fail" in device: + + # 设备断连,尝试重连 + + connect_device(device_list) + + else: + + print("当前设备类型:", device) + + # 解锁设备 + + if "WGR" in device: + + # 若是WGR需点击屏幕中间才可解锁 + + run_cmd('hdc -t {} shell uinput -T -m 1280 800 1280 800 1000'.format(sn)) + + elif "NOH" in device: + + # 手机:滑动界面即可解锁 + + run_cmd('hdc -t {} shell uinput -T -m 500 2000 500 500 600'.format(sn)) + + else: + + # 设备断连,尝试重连 + + connect_device([sn]) + + run_cmd('hdc -t {} shell uinput -T -m 1280 800 1280 800 1000'.format(sn)) + + run_cmd('hdc -t {} shell uinput -T -m 500 2000 500 500 600'.format(sn)) + + # 设置设备常亮 + + out = run_cmd('hdc -t {} shell power-shell setmode 602'.format(sn)) + + if "Mode Success" in out: + + print("当前设备 {} 已设置常亮!!!".format(sn)) + + # 调低亮度,确保有足够电量进行测试 + + run_cmd('hdc -t {} shell power-shell display -s 0'.format(sn)) + + else: + + print("当前设备 {} 连接异常,请成功连接设备后重新执行".format(sn)) + + + + + +def run_get_image(args): + + # 获取基线图 + + # device_dict, excel_path, excel_name, report_path, base_path, now_time, dir_path + + global device_dict + + device_dict = args[0] + + excel_path = args[1] + + excel_name = args[2] + + report_path = args[3] + + now_time = args[5] + + dir_path = args[6] + + print(excel_name, " before run device_dict: ", device_dict) + + if len(device_dict) == 1: + + for key, value in device_dict.items(): + + sn = key + + elif len(device_dict) > 1: + + sn = device_dict.keys()[0] + + # print("sn: ", sn) + + run_flag = False + + if device_dict[sn] == True: + + # 有空闲设备时,占用并更新设备状态不可用(False) + + tmp = device_dict + + tmp[sn] = False + + device_dict = tmp + + print(excel_name, " running device_dict: ", device_dict) + + elif device_dict[sn] == False: + + index = 0 + + # 单个组件执行用例超过50分钟,可能该设备已闲置,启用该设备 + + while run_flag == False and index < 50 * 60: + + for device, status in device_dict.items(): + + # 监测到有空闲设备时 + + if status == True: + + # 有空闲设备时,占用并更新设备状态不可用(False) + + tmp = device_dict + + tmp[device] = False + + device_dict = tmp + + sn = device + + run_flag = True + + print(excel_name, " running device_dict: ", device_dict) + + break + + if run_flag == True: + + # 有空闲设备时,退出循环,开始执行用例 + + break + + # 等待直到出现空闲设备 + + time.sleep(1) + + index += 1 + + global base_path + + base_path = os.path.join(dir_path, "BaseImages_" + now_time) + + print('base_path: ', base_path) + + # 实例化对象 + + uiTools = UiCompareTools() + + data = uiTools.read_excel_data(excel_path) + + result_dict = {} + + if data != False: + + save_image_path = os.path.join(base_path, excel_name) + + try: + + case_result = uiTools.run_testcases(sn, data, save_image_path, excel_path, report_path, excel_name, mode="0") + + result_dict[excel_name] = case_result + + # 将本次执行结果保存至json文件中,确保遇到异常中断,仍可生成总的html报告 + + if os.path.exists(run_json_path) == False: + + os.makedirs(run_json_path) + + json_data_path = os.path.join(run_json_path, excel_name + ".json") + + with open(json_data_path, "w") as f: + + json.dump(result_dict, f) + + # print("成功写入json文件:", result_dict) + + except Exception as e: + + print("[ERROR] get BaseImage fail: ", str(e)) + + print("result_dict: ", result_dict) + + # 用例执行完,更新当前设备状态为可用(True) + + device_dict[sn] = True + + print(excel_name, " after run device_dict: ", device_dict) + + else: + + print("[ERROR] The Excel path does not exist !!!") + + return device_dict, result_dict + + + + + +def run_compare_image(args): + + # 获取对比图,并对比图片 + + # device_dict, excel_path, excel_name, report_path, base_path, now_time, dir_path + + global device_dict + + device_dict = args[0] + + excel_path = args[1] + + excel_name = args[2] + + report_path = args[3] + + base_path = args[4] + + now_time = args[5] + + dir_path = args[6] + + print(excel_name, " before run device_dict: ", device_dict) + + if len(device_dict) == 1: + + for key, value in device_dict.items(): + + sn = key + + elif len(device_dict) > 1: + + sn = device_dict.keys()[0] + + # print("sn: ", sn) + + run_flag = False + + if device_dict[sn] == True: + + # 有空闲设备时,占用并更新设备状态不可用(False) + + tmp = device_dict + + tmp[sn] = False + + device_dict = tmp + + print(excel_name, " running device_dict: ", device_dict) + + elif device_dict[sn] == False: + + index = 0 + + # 单个组件执行用例超过50分钟,可能该设备已闲置,启用该设备 + + while run_flag == False and index < 50*60: + + for device, status in device_dict.items(): + + # 监测到有空闲设备时 + + if status == True: + + # 有空闲设备时,占用并更新设备状态不可用(False) + + tmp = device_dict + + tmp[device] = False + + device_dict = tmp + + sn = device + + run_flag = True + + print(excel_name, " running device_dict: ", device_dict) + + break + + if run_flag == True: + + # 有空闲设备时,退出循环,开始执行用例 + + break + + # 等待直到出现空闲设备 + + time.sleep(1) + + index += 1 + + + + compare_path = os.path.join(dir_path, "CompareImages_" + now_time) + + print('compare_path: ', compare_path) + + count = 0 + + # 校验基线图片路径是否合法 + + while os.path.isdir(base_path) == False or os.path.exists(base_path) == False: + + if os.path.isdir(base_path) == False: + + base_path = input("路径非文件夹,请重新输入基线图源文件夹所在路径:") + + elif os.path.exists(base_path) == False: + + base_path = input("路径不存在,请重新输入基线图源文件夹所在路径:") + + count += 1 + + if os.path.isdir(base_path) == True and os.path.exists(base_path) == True: + + # 路径输入正确,跳出循环继续往下执行 + + break + + if count == 3: + + # 输入三次非法参数,程序退出 + + sys.exit(0) + + + + # 实例化对象 + + uiTools = UiCompareTools() + + data = uiTools.read_excel_data(excel_path) + + diff_dict = {} + + if data != False: + + # 基线图片路径 + + base_image_path = os.path.join(base_path, excel_name) + + # 对比图片路径 + + save_image_path = os.path.join(compare_path, excel_name) + + # 执行生成对比图片用例,并将执行和保存图片的结果写入Excel表中 + + uiTools = UiCompareTools() + + try: + + case_result = uiTools.run_testcases(sn, data, save_image_path, excel_path, report_path, excel_name, mode="1") + + # 用例执行完,更新当前设备状态为可用(True) + + device_dict[sn] = True + + # 开始对比图片,并将对比结果写入Excel表中,有差异时生成差异图保存至reports\diff_XXX\module_name\XXX.webp + + different_files = uiTools.get_diff_files(excel_path, base_image_path, save_image_path, case_result, now_time) + + # 将执行用例的结果、保存图片的结果与对比图片的结果合并,得到最终展示至报告中的结果 + + # 更新该模块用例总数 + + if different_files["Total"] < len(different_files["result_list"]): + + different_files["Total"] = len(different_files["result_list"]) + + # 将该模块数据添加至字典 + + diff_dict[excel_name] = different_files + + # 将本次执行结果保存至json文件中,确保遇到异常中断,仍可生成总的html报告 + + if os.path.exists(run_json_path) == False: + + os.makedirs(run_json_path) + + json_data_path = os.path.join(run_json_path, excel_name + "_diff.json") + + with open(json_data_path, "w") as f: + + json.dump(diff_dict, f) + + print("成功写入json文件:", result_dict) + + + + # 生成对比报告 + + report_diff_path = os.path.join(reports_path, "report_diff_{0}.txt".format(now_time)) + + uiTools.generate_report(different_files["result_list"], report_diff_path) + + except Exception as e: + + print("[ERROR] run Compare fail: ", str(e)) + + print("{}.xlsx 中所有用例图片均已对比完成".format(excel_name)) + + print("diff_dict: ", diff_dict) + + else: + + print("[ERROR] The Excel path does not exist !!!") + + print(excel_name, " after run device_dict: ", device_dict) + + return device_dict, diff_dict + + + + + +if __name__ == '__main__': + + # 程序入口 + + # 1小时后开始生成基线图 + + # time.sleep(1 * 60 * 60) + + start_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) + + start_time_second = datetime.timestamp(datetime.now()) + + # 创建reports文件夹 + + if os.path.exists(reports_path) == False: + + os.makedirs(reports_path) + + result_list = [] + + if mode == "0" or mode == "1": + + # 判断用例数据的Excel所在文件夹内是否包含有效数据(必须为xlsx格式的Excel) + + count = 0 + + while os.path.exists(excel_path) == False: + + excel_path = input("路径不存在,请重新输入Excel所在文件夹路径:") + + count += 1 + + if os.path.exists(excel_path) == False and count == 3: + + # 尝试三次错误输入后,退出程序 + + sys.exit(0) + + + + # 获取所有Excel表的全路径 + + excel_name_list = [] + + excel_path_list = [] + + if os.path.exists(excel_path) == True: + + excel_name_list = get_file_list(excel_path, ".xlsx") + + count = 0 + + # 路径无效时,尝试三次输入 + + while len(excel_name_list) == 0: + + excel_path = input("路径中不存在xlsx格式的Excel文件,请检查后重新输入Excel所在文件夹路径:") + + excel_name_list = get_file_list(excel_path, ".xlsx") + + count += 1 + + if len(excel_name_list) == 0 and count == 3: + + # 尝试三次错误输入后,退出程序 + + sys.exit(0) + + # 路径有效时,获取全路径列表 + + for excel_name in excel_name_list: + + excel_full_path = os.path.join(excel_path, excel_name) + + excel_name = excel_name.split(".")[0] + + excel_path_list.append((excel_full_path, excel_name)) + + + + flag = 0 + + func_name = "" + + while flag < 3: + + if mode == "0": + + # 获取基线图 + + func_name = run_get_image + + break + + elif mode == "1": + + # 对比图片 + + func_name = run_compare_image + + break + + else: + + mode = input("您输入有误,请重新输入(输入0可获取基线图源,输入1可对比图片):") + + flag += 1 + + if flag == 3: + + # 错输三次,退出程序 + + sys.exit(0) + + report_path = os.path.join(reports_path, "reports_run_%s.txt" % now_time) + + + + # 兼容本地无hdc.exe的情况 + + content = run_cmd("hdc list targets") + + print("当前设备SN号: \n", content) + + if content == "": + + position = run_cmd("where hdc_std") + + print("本地hdc_std.exe所在路径: ", position) + + position = position.splitlines()[0] + + print("本地hdc_std.exe所在第一个路径: ", position) + + shutil.copy(position, position.replace("hdc_std.exe", "hdc.exe")) + + content = run_cmd("hdc list targets") + + + + device_list = content.split("\r\n")[:-1] + + print("device_list: ", device_list) + + # 最大进程数,即连接设备数 + + process_num = len(device_list) + + # 跑用例前删包,重启操作 + + if process_num == 1: + + # 单台设备 + + delete_and_reboot(device_list[0]) + + print("单设备执行") + + elif process_num > 1: + + # 多设备、多进程 + + print("多设备、多进程执行") + + with Pool(process_num) as p: + + outputs = p.map(delete_and_reboot, device_list) + + # 关闭进程池 + + p.terminate() + + # 检查设备是否成功连接,若连接异常尝试重连 + + connect_device(device_list) + + + + # 利用进程池Pool自动帮我们管理子进程 + + excel_num = len(excel_path_list) + + device_num = len(device_list) + + print("excel_path_list: ", excel_path_list) + + dir_path = os.path.join(dir_path) + + + + if mode == "0": + + base_path = "" + + + + if device_num == 1: + + # 仅连接单台设备时 + + device_dict = {device_list[0]: True} + + for excel_path, excel_name in excel_path_list: + + result_data = [] + + if mode == "0": + + result_data = run_get_image((device_dict, excel_path, excel_name, report_path, base_path, now_time, dir_path)) + + elif mode == "1": + + result_data = run_compare_image( + + (device_dict, excel_path, excel_name, report_path, base_path, now_time, dir_path)) + + else: + + print("您输入的type有误,请您重新输入!") + + sys.exit(0) + + result_list.append(result_data) + + elif device_num > 1: + + # 连接多台设备时 + + # 未执行用例前,所有设备均可用(True) + + device_dict = Manager().dict() + + for device in device_list: + + device_dict[device] = True + + # 最大进程数:PC已连接的设备数 + + p = Pool(device_num) + + res_l = [] + + excel_index = 0 + + for excel_path, excel_name in excel_path_list: + + res = p.apply_async(func_name, ((device_dict, excel_path, excel_name, report_path, base_path, now_time, dir_path),)) + + res_l.append(res) + + excel_index += 1 + + p.close() + + p.join() + + + + for res in res_l: + + # 汇总用例执行结果 + + result_list.append(res.get()) + + # 关闭进程池 + + p.terminate() + + if mode == "2": + + # 获取所有的json路径 + + all_json_path = [] + + json_name_list = get_file_list(json_path, ".json") + + if "_diff.json" in json_name_list[0]: + + mode = "1" + + else: + + mode = "0" + + base_path = "" + + for json_name in json_name_list: + + all_json_path.append(os.path.join(json_path, json_name)) + + print("all_json_path: ", all_json_path) + + for json_data_path in all_json_path: + + with open(json_data_path, "r") as f: + + data = json.loads(f.read()) + + # print("解析后json文件:", data) + + result_list.append(({}, data)) + + + + end_time = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) + + end_time_second = datetime.timestamp(datetime.now()) + + run_time = end_time_second - start_time_second + + moudle_count = len(result_list) + + total_count = 0 + + pass_count = 0 + + case_fail_count = 0 + + get_fail_count = 0 + + + + if mode == "0": + + # 获取基线图 + + result_dict = {} + + for run_dict in result_list: + + for key, value in run_dict[1].items(): + + result_dict[key] = value + + total_count += value["Total"] + + pass_count += value["Pass"] + + case_fail_count += value["Case_fail"] + + get_fail_count += value["Get_fail"] + + if total_count == 0: + + pass_rate = 0 + + else: + + pass_rate = int(pass_count / total_count * 100) + + # if pass_count != total_count - case_fail_count - get_fail_count: + + # pass_count = total_count - case_fail_count - get_fail_count + + result_dict["Total_data"] = {"moudle_count": str(moudle_count), + + "Total": str(total_count), + + "Pass": str(pass_count), + + "Case_fail": str(case_fail_count), + + "Get_fail": str(get_fail_count), + + "Pass_rate": str(pass_rate) + "%", + + "start_end_time": str(start_time) + "/ " + str(end_time), + + "run_time": str(time.strftime("%H:%M:%S", time.gmtime(run_time))) + + } + + # 生成获取基线图的html报告 + + write_report_html(result_dict, mode="0", image_path=base_path) + + print("获取图片结束,result_dict: ", result_dict) + + elif mode == "1": + + # 与基线图对比,并生成差异图和报告 + + base_image_fail_count = 0 + + compare_fail_count = 0 + + diff_dict = {} + + for run_dict in result_list: + + for key, value in run_dict[1].items(): + + diff_dict[key] = value + + # 累加获取各状态总数 + + total_count += value["Total"] + + pass_count += value["Pass"] + + case_fail_count += value["Case_fail"] + + get_fail_count += value["Get_fail"] + + base_image_fail_count += value["Base_image_fail"] + + compare_fail_count += value["Compare_fail"] + + if total_count == 0: + + pass_rate = 0 + + else: + + pass_rate = int(pass_count / total_count * 100) + + diff_dict["Total_data"] = {"moudle_count": str(moudle_count), + + "Total": str(total_count), + + "Pass": str(pass_count), + + "Case_fail": str(case_fail_count), + + "Get_fail": str(get_fail_count), + + "Base_image_fail": str(base_image_fail_count), + + "Compare_fail": str(compare_fail_count), + + "Pass_rate": str(pass_rate) + "%", + + "start_end_time": str(start_time) + "/ " + str(end_time), + + "run_time": str(time.strftime("%H:%M:%S", time.gmtime(run_time)))} + + diff_path = os.path.join(reports_path, "diff_" + str(now_time)) + + # 生成对比图片后的html报告 + + write_report_html(diff_dict, mode="1", image_path=diff_path) + + print("对比图片结束,diff_dict: ", diff_dict) + diff --git a/function/ui_compare_rh/uicompare_tools/excel/actionSheet.xlsx b/function/ui_compare_rh/uicompare_tools/excel/actionSheet.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..d8c3be79f5bf717b930196cf91fe131ad3c18ad6 Binary files /dev/null and b/function/ui_compare_rh/uicompare_tools/excel/actionSheet.xlsx differ diff --git a/function/ui_compare_rh/uicompare_tools/excel/uicompare.xlsx b/function/ui_compare_rh/uicompare_tools/excel/uicompare.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..8d0255136e1831e0437d42d19471ca5fdf3733c4 Binary files /dev/null and b/function/ui_compare_rh/uicompare_tools/excel/uicompare.xlsx differ diff --git a/function/ui_compare_rh/uicompare_tools/mode.html b/function/ui_compare_rh/uicompare_tools/mode.html new file mode 100644 index 0000000000000000000000000000000000000000..c56f5b11a876b0ac7afc98f4b4895e32baacc4a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare_tools/mode.html @@ -0,0 +1,432 @@ + + + + + <!--{title_name}--> + + + + + + + + +
+ + + + + + + + + + + + + +
Test Summary
Platform:PhoneTest Type:Test
Device Name:7001005458*************e1c8933900 + \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare_tools/run.bat b/function/ui_compare_rh/uicompare_tools/run.bat new file mode 100644 index 0000000000000000000000000000000000000000..900108445dfae615d0d224a0c3a637091f06ccc9 --- /dev/null +++ b/function/ui_compare_rh/uicompare_tools/run.bat @@ -0,0 +1,22 @@ + +@ECHO OFF +reg add HKEY_CURRENT_USER\Console /v QuickEdit /t REG_DWORD /d 00000000 /f +echo "======使用说明======" +echo "--type: 输入0:获取基线图,输入1:对比生成差异图,输入2:生成总html报告" +echo "--excel: 用例数据的Excel所在文件夹路径(Excel仅支持xlsx格式)" +echo "--dir: 基础图源文件夹所在路径(type=1时必填)" +echo "--hap: 用例hap文件夹所在路径(必填)" +echo "--json: 执行用例生成的 json文件所在文件夹路径(type=2时必填)" +echo "入参范例:--type0--excel D:\UI\All_Excel\--hap D:\UI\hap" +echo "入参范例:--type1--excel D:\UI\All_Excel\--dir D:\UI\BaseImages_20230504_174004 --hap D:\UI\hap" +echo "入参范例:--type2--json D:\UI\run_json_20230810_163907\" +echo "温馨提示:执行用例前,请先确保已关闭上述路径中所有的Excel表,否则将会导致用例结果写入Excel后保存失败" +echo "======使用说明======" + + +set /p param= 输入入参: + + +python UiCompareTools_progress.py %param% + +pause \ No newline at end of file