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/ComponentTextRicheditorAITest/ComponentTextRicheditorAITests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorAITest/ComponentTextRicheditorAITests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ccf64109a71855014aa23478caa9812a07ba94e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorAITest/ComponentTextRicheditorAITests.test.ets @@ -0,0 +1,864 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_RICHEDITOR_AI_0010:AI相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorAITests() { + + describe('ComponentTextRicheditorAITests', () => { + + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0010 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击蓝色识别信息,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0010 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0010"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0010')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorAI0010')); + await rich1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0010.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0020 + *des:1、安装测试 demo + 2、输入混合文本,包含:邮箱、地址、电话 + 、网址这四个信息内容,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0020"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0020')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0020.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0030 + *des:"1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击“关闭AI分析”按钮(设置 + enableDataDetector为 false)" + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0030 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0030"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0030')); + await rich.click(); + await Utils.sleep(1000); + let open = await driver.findComponent(ON.id('open')); + await open.click(); + await Utils.sleep(1000); + let close = await driver.findComponent(ON.id('close')); + await close.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0030.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0040 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击“识别: 电话号码”按钮(设置 + dataDetector{ types: + [TextDataDetectorType. PHONE_NUMBER]}) + 3、点击“识别:网址”按钮(设置 + dataDetector{ types: + [TextDataDetectorType. URL]}) + 4、点击“识别:邮箱”按钮(设置 + dataDetector{ types: + [TextDataDetectorType. EMAIL]}) + 5、点击“识别: 地址”按钮(设置 + dataDetector{ types: + [TextDataDetectorType. ADDRESS]}) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0040 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0040"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0040')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let tel = await driver.findComponent(ON.id('tel')); + await tel.click(); + await Utils.sleep(1000); + let url = await driver.findComponent(ON.id('url')); + await url.click(); + await Utils.sleep(1000); + let email = await driver.findComponent(ON.id('email')); + await email.click(); + await Utils.sleep(1000); + let addr = await driver.findComponent(ON.id('addr')); + await addr.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0040.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0050 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击“识别: 电话号码、网址”按钮(设置 + dataDetector{ types: + [ToxtDataDetectorType. PHONE_NUNBER, + ToxtDataDetectorType. URL]}) + 3、点击“识别: 电话、网址、邮箱”按钮(设 + 置dataDetector{ types: + [TextDataDetectorType. PHONE_NUMBER, + TextDataDetectorType. URL, + TextDataDetectorType. EMAIL]}) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0050 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0050"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0050')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let url = await driver.findComponent(ON.id('url')); + await url.click(); + await Utils.sleep(1000); + let email = await driver.findComponent(ON.id('email')); + await email.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0050.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0060 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击“识别: 电话、网址、邮箱、地址”按钮(设置dataDetector{ types: + [TextDataDetectorType. PHONE_NUNBER, + TextDataDetectorType. URL, + TextDataDetectorType. EMAIL, + TextDataDetectorType. ADDRESS]}) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0060 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0060"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0060')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let url = await driver.findComponent(ON.id('url')); + await url.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0060.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0070 + *des:1、点击“关闭AI分析”按钮(设置 + enableDataDetector为 false). + 2、点击“识别: 电话、网址、邮箱、地址”按 + 钮(设置dataDetector{ types: + [TextDataDetectorType. PHONE_NUNBER, + TextDataDetectorType. URL, + TextDataDetectorType. EMAIL, + TextDataDetectorType. ADDRESS]}) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0070 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0070"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0070')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let url = await driver.findComponent(ON.id('url')); + await url.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0070.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0080 + *des:1、点击“识别: 电话、网址、邮箱、地址”按 + 钮(设置dataDetector{ types: + [ToxtDataDetectorType. PHONE_NUNBER, + TextDataDetectorType. URL, + TextDataDetectorType. EMAIL, + TextDataDetectorType. ADDRESS]}) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0080 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0080"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0080')); + await rich.click(); + await Utils.sleep(1000); + let url = await driver.findComponent(ON.id('url')); + await url.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0080.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0090 + *des:1、检查enableDataDetector和 + dataDetectorConfig接口文档说明 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0090 start.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0090"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0090.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0100 + *des:1、点击“上划线”按钮(设置 decoration值为 + Overline) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0100 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0100"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0100')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0100.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0110 + *des:1、点击“上划线”按钮(设置 decoration值为 + LineThrough) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0110 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0110"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0110')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0110.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0120 + *des:1、点击“下划线”按钮(设置 decoration值为 + Underline) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0120 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0120"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0120')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0120.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0130 + *des:1、点击“字体颜色:红色”按钮(设置 + fontColor值为 Red). + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0130 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0130"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0130')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0130.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0140 + *des:1、点击“字体大小:30”按钮(设置fontSize| + 值为30) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0140 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0140"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0140')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0140.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0150 + *des:1、点击“字体样式:斜体”按钮(设置 + fontStyle值为 Italic) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0150 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0150"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0150')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0150.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0160 + *des:1、点击“字体宽度:细”按钮(设置 + fontVeight值为 Lighter) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true? + 3、点击“字体宽度: 正常”按钮(设置 + fontVeight值为 Normal) + 3、点击“字体宽度:粗”按钮(设置 + fontVeight值为 Bolder) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0160 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0160"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0160')); + await rich.click(); + await Utils.sleep(1000); + let setStyle = await driver.findComponent(ON.id('setStyle')); + await setStyle.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let setStyle1 = await driver.findComponent(ON.id('setStyle1')); + await setStyle1.click(); + await Utils.sleep(1000); + let setStyle2 = await driver.findComponent(ON.id('setStyle2')); + await setStyle2.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0160.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0170 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、输入文本 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0170 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0170"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0170')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_9); + await Utils.sleep(100); + let close = await driver.findComponent(ON.id('close')); + await close.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0170.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0180 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、删除文本 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0180 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0180"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0180')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + let close = await driver.findComponent(ON.id('close')); + await close.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0180.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0190 + *des:1、点击“插入 Span内容”(设置 Span内包含邮 + 箱、地址、电话、网址这四个信息内容) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0190 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0190"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0190')); + await rich.click(); + await Utils.sleep(1000); + let insert = await driver.findComponent(ON.id('insert')); + await insert.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0190.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0200 + *des:1、在邮箱、地址、电话、网址信息处点击“插 + 入图片”(设置InageSpan) + 2、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0200 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0200"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0200')); + await rich.click(); + await Utils.sleep(1000); + let insert = await driver.findComponent(ON.id('insert')); + await insert.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0200.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0210 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true? + 2、点击“减小文本框宽度”按钮(设置 vidth- + -) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0210 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0210"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0210')); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let setWidth = await driver.findComponent(ON.id('setWidth')); + await setWidth.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0210.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0220 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true? + 2、在邮箱、地址、电话、网址信息中手动换行 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0220 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0220"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0220')); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2012); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0220.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0230 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、滑动页面 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0230 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0230"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0230')); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let ponit = await rich.getBoundsCenter(); + await driver.mouseScroll({x:ponit.x, y:ponit.y}, false, 10, 2072,20) + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0230.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0240 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、滑动页面,使邮箱、地址、电话、网址等信 + 息在组件底部或顶部截断显示 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0240 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0240"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0240')); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + let ponit = await rich.getBoundsCenter(); + await driver.mouseScroll({x:ponit.x, y:ponit.y}, false, 10, 2072,20) + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0240.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0250 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0250 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0250"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0250')); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0250.`); + done(); + }) + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0260 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击蓝色识别信息 + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0260 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0260"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0260')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + await Utils.sleep(1000); + await driver.triggerKey(2012); + await Utils.sleep(100); + await driver.triggerKey(2012); + await Utils.sleep(100); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorAI0260')); + await rich1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0260.`); + done(); + }) + + /** + * NO.SUB_ACE_UI_RICHEDITOR_AI_0270 + *des:1、点击“开启AI分析”按钮(设置 + enableDataDetector为 true) + 2、点击“复制类型: NONE”按钮(设置 + CopyOptions为 None) + ,验证效果 + */ + it('SUB_ACE_UI_RICHEDITOR_AI_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0270 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0270"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorAI0270')); + await rich.click(); + await Utils.sleep(1000); + let AI = await driver.findComponent(ON.id('AI')); + await AI.click(); + let copy = await driver.findComponent(ON.id('copy')); + await copy.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_RICHEDITOR_AI_0270.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColors.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColors.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..52d51ef5aff767d6f265a10c68cc7dffa6e3376d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColors.test.ets @@ -0,0 +1,891 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_CUSTOMCOLORS:Colors相关自定义 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorCustomColors() { + + describe('ComponentTextRicheditorCustomColors', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0001 + *des:1、添加RichEditor组件,不设置光标、手柄、文本选中背景颜色 + 2、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0001 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0001") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0001")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0001 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0002 + *des:1、添加RichEditor组件 + 2、设置光标、手柄颜色为 Color. Orange,文本选中背景颜色为Color. Red. + 3、输入文本、长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0002 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0002") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0002")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0002 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0003 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为0x0110ff + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0003 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0003") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0003")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0003 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0004 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为0xffffffeeeeee + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0004") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0004")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0004 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0005 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为10000 + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0005 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0005") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0005")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0005 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0006 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为10000.5 + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0006 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0006") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0006")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0006 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0007 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为-15 + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0007 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0007") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0007")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0007 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0008 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为'#00ffff' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0008', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0008 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0008") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0008")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0008 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0009 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为'#ffffff00' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0009', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0009 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0009") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0009")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0009 finish.`); + done(); + }) + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0010 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为' rgb(255,0,255)' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0010 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0010") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0010")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0010 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0011 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为" rgba(0,0,255,0.5)" + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0011 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0011") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0011")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0011 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0012 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为'#0ccccoo' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0012") + await Utils.sleep(1000) + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0012")); + await richeditor.click(); + await Utils.sleep(2000) + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0012 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0013 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为' rgba(255,0,255,2)' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0013") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0013")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0013 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0014 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为' rgb(255,0,300)' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0014 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0014") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0014")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0014 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0015 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为'#abcdefə' + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0015 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0015") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0015")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0015 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0016 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 + $r(' app. color. color') + 3、输入文本,长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0016 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0016") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0016")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0016 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0017 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 + $r(' app. media. startIcon') + 3、输入文本, 长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0017', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0017 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0017") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0017")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0017 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0018 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文字、图片、表情、特殊符号混合文本,长按文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0018', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0018 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0018") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0018")); + await richeditor.click(); + await Utils.sleep(2000); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0018 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0019 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、添加textSpan\symbolSpan\inageSpan\buildSpan,长按文本 + 内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0019 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0019") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0019")); + await richeditor.click(); + await Utils.sleep(2000); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0019 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0020 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本,长按文本内容 + 4、改变字体大小,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0020") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0020")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0020finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0021 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本, 长按文本内容 + 4、改变字体样式,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0021', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0021 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0021") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0021")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot() + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0021finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0022 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本, 长按文本内容 + 4、改变行高和字符间距,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0022 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0022") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0022")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0022finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0023 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本,长按文本内容 + 4、软键盘删除选中文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0023', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0023") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0023")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DEL) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0023finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0025 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本,长按文本内容 + 4、切换横竖屏,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0025', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0025 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0025") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0025")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0025finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0026 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本,鼠标点击 richeditor,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0026', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0026 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0026") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0026")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0026finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0028 + *des:1、添加RichEditor组件 + 2、设置光标、手柄、文本选中背景颜色为 Red + 3、输入文本 + 4、调用setSeleotion选中文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0028', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0028 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0028") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomColor0028")); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let select = await driver.findComponent(ON.id("set select")); + await select.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOB_CUSTOMCOLORS_0028finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnceTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnceTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b2d84b04a8397d09b63bff3a0dcb5dde53ac5934 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnceTests.test.ets @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE:CustomkeyBoardAvoidAnce相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorCustomkeyBoardAvoidAnceTests() { + + describe('ComponentTextRicheditorCustomkeyBoardAvoidAnceTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0001 + *des:1、添加RichEditor组件位于页面底部 + 2、点击RichEditor组件, 激活自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0001 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0001") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0001")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0001.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0002 + *des:1、设置KeyboardOptions为 false + 2、添加RichEditor组件位于页面底部 + 3、点击RichEditor组件,激活自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0002 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0002") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0002")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0002.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0003 + *des:1、设置KeyboardOptions为 true,设置键盘避 + 让方式为OFFSET + 2、添加RichEditor组件,输入超长文本 + 3、分别点击文本不同位置,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0003 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0003") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0003")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0003.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0004 + *des:1、设置KeyboardOptions为 true,设置键盘避 + 让方式为RESIZE + 2、添加RichEditor组件,输入超长文本 + 3、分别点击文本不同位置,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0004") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0004")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0004.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0005 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为OFFSET + 2、页面添加 Row组件(固定宽高),添加 + RichEditor组件 + 3、点击RichEditor组件, 调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0005 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0005") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0005")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0005.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0006 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为OFFSET + 2、页面添加 Row组件(百分比宽高),添加 + RichEditor组件 + 2、点击RichEditor组件,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0006 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0006") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0006")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0006.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0007 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为RESIZE + 2、页面添加 Row组件(固定宽高) ,添加 + RichEditor组件 + 3、点击RichEditor组件, 调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0007 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0007") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0007")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0007.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0008 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为RESIZE + 2、页面添加 Row组件(百分比宽高),添加 + RichEditor组件 + 3、点击RichEditor组件, 调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0008', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0008 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0008") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0008")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0008.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0009 + *des:1、添加RichEditor组件位于页面顶部 + 2、点击RichEditor组件,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0009', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0009 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0009") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0009")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0009.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0010 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为OFFSET + 2、添加RichEditor组件, 在RichEditor上下 + 方添加 row组件 + 3、点击RichEditor组件, 调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0010 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0010") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0010")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0010.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0011 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为RESIZE + 2、添加RichEditor组件, 在RichEditor上下 + 方添加 row组件 + 3、点击RichEditor组件,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0011 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0011") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0011")); + await richeditor.click(); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0011.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0012 + *des:1、设置KeyboardOptions为 true,设置键盘避 + 让方式为OFFSET + 2、页面添加多个RichEditor组件 + 3、分别点击不同RichEditor组件,调出自定义 + 键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0012") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0012")); + await richeditor.click(); + await Utils.sleep(1000); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0012_01")); + await richeditor1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0012.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0013 + *des:1、设置KeyboardOptions为 true, 设置键盘避 + 让方式为RESIZE + 2、添加RichEditor组件, 在RichEditor上下 + 方添加 row组件 + 3、点击RichEditor组件,调出自定义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0013") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0013")); + await richeditor.click(); + await Utils.sleep(1000); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0013_01")); + await richeditor1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0013.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0016 + *des:1、设置KeyboardOptions为 true,设置键盘避 + 让方式为OFFSET + 2、页面添加RichEditor组件 + 3、切换横屏, 点击RichEditor组件, 调出自定 + 义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0016 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0016") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0016")); + let change = await driver.findComponent(ON.id("changeScreen")); + await change.click(); + await Utils.sleep(2000); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0016")); + await richeditor1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0016.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0017 + *des:1、设置KeyboardOptions为 true,设置键盘避 + 让方式为RESIZE + 2、页面添加RichEditor组件 + 3、切换横屏, 点击RichEditor组件, 调出自定 + 义键盘,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0017', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0017 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0017") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0017")); + await Utils.sleep(1000); + let change = await driver.findComponent(ON.id("changeScreen")); + await change.click(); + await Utils.sleep(2000); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0017")); + await richeditor1.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0017.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0019 + *des:1、设置KeyboardOptions为 true + 2、页面添加RichEditor组件 + 3、点击RichEditor组件,调出自定义键盘 + 4、改变自定义键盘高度,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0019 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0019") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorCustomkeyBoardAvoidAnce0019")); + await richeditor.click(); + await Utils.sleep(1000); + let change = await driver.findComponent(ON.id("changeScreen")); + await change.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_CUSTOMKEYBOARDAVOIDANCE_0019.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeatures.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeatures.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..43a5f58645bb47dee6b5c60aaf5e40835b81ad5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeatures.test.ets @@ -0,0 +1,943 @@ + /* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@ohos.multimodalInput.keyCode' +import { MouseButton } from '@kit.TestKit' + +/* + * fontfeatures cases + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorFontfeatures() { + + describe('ComponentTextRicheditorFontfeatures', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0001 + *des:设置fontStyle 属性为FontStyle.Normal,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0001 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0001") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0001 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0002 + *des:设置fontFeature 属性为“ sups ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0002 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0002") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0002 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0003 + *des:设置fontFeature 属性为“ sups ,0",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0003 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0003") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0003 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0004 + *des:设置fontFeature 属性为“ sups ,1",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0004 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0004") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0004 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0005 + *des:设置fontFeature 属性为“ sups ,0ff",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0005 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0005") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0005 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0006 + *des:设置fontFeature 属性为“ subs ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0006 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0006") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0006 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0007 + *des:设置fontFeature 属性为“ sinf ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0007 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0007") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0007 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0008 + *des:设置fontFeature 属性为“ numr ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0008', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0008 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0008") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0008 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0009 + *des:设置fontFeature 属性为“ dnom ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0009', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0009 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0009") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0009 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0010 + *des:设置fontFeature 属性为“ locl ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0010 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0010") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0010 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0011 + *des:设置fontFeature 属性为“ tnum ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0011 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0011") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0011 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0012 + *des:设置fontFeature 属性为“ pnum ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0012 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0012") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0012 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0013 + *des:设置fontFeature 属性为“ case ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0013 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0013") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0013 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0014 + *des:设置fontFeature 属性为“ frac ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0014 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0014") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0014 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0015 + *des:设置fontFeature 属性为“ ordn ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0015 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0015") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0015 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0016 + *des:设置fontFeature 属性为“ liga ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0016 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0016") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0016 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0017 + *des:设置fontFeature 属性为“ fwid ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0017', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0017 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0017") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0017 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0018 + *des:设置fontFeature 属性为“ hwid ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0018', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0018 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0018") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0018 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0019 + *des:设置fontFeature 属性为“ vert ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0019 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0019") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0019 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0020 + *des:设置fontFeature 属性为“ ss01 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0020 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0020") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0020 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0021 + *des:设置fontFeature 属性为“ ss02 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0021', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0021 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0021") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0021 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0022 + *des:设置fontFeature 属性为“ ss03 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0022 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0022") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0022 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0023 + *des:设置fontFeature 属性为“ ss04 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0023', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0023 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0023") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0023 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0024 + *des:设置fontFeature 属性为“ ss05 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0024', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0024 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0024") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0024 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0025 + *des:设置fontFeature 属性为“ ss06 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0025', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0025 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0025") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0025 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0026 + *des:设置fontFeature 属性为“ ss07 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0026', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0026 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0026") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0026 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0027 + *des:设置fontFeature 属性为“ ss08 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0027', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0027 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0027") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0027 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0028 + *des:设置fontFeature 属性为“ ss07 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0028', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0028 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0028") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0028 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0029 + *des:设置fontFeature 属性为“ ss09 and ss04 ,on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0029', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0029 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0029") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0029 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0030 + *des:设置fontFeature 属性为“ null",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0030 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0030") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0030 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0031 + *des:设置fontFeature 属性'\"abcdefgg&*\" on,\"ss04\" 12354hfnfn3',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0031', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0031 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0031") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0031 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0032 + *des:设置fontFeature 属性'\"ss04\" on,\"ss04\" off',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0032', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0032 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0032") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0032 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0033 + *des:输入纯文本,设置fontFeature 属性"\"ss04\" on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0033', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0033 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0033") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0033 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0034 + *des:输入纯文本+Symbol,设置fontFeature 属性"\"ss04\" on",Symbol无fontFeature属性(https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-symbolspan-V5),验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0034', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0034 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0034") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0034 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0035 + *des:输入纯文本+Image,设置fontFeature 属性"\"ss04\" on",Image无fontFeature属性(https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-imagespan-V5),验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0035', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0035 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0035") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0035 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0036 + *des:输入Emoji表情,通过updateSpanStyle设置fontFeature 属性"\"ss04\" on",验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0036', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0036 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0036") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0036 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0037 + *des:不同fontfeature效果的两个richEditor通过复制粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0037', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0037 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0037") + await Utils.sleep(1000) + let richEditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature003701")); + await richEditor1?.click() + await Utils.sleep(1000) + await richEditor1?.click() + await Utils.sleep(1000) + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click() + await Utils.sleep(500) + let copy = await driver.findComponent(ON.text('复制')) + await copy?.click() + await Utils.sleep(1000) + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature003702")); + await richEditor2?.click() + await Utils.sleep(1000) + await richEditor2?.click() + await Utils.sleep(1000) + let paste = await driver.findComponent(ON.text('粘贴')) + await paste?.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0037 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0038 + *des:相同fontfeature效果的两个richEditor通过复制粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0038', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0038 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0038") + await Utils.sleep(1000) + let richEditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature003801")); + await richEditor1?.click() + await Utils.sleep(1000) + await richEditor1?.click() + await Utils.sleep(1000) + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click() + await Utils.sleep(500) + let copy = await driver.findComponent(ON.text('复制')) + await copy?.click() + await Utils.sleep(1000) + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature003802")); + await richEditor2?.click() + await Utils.sleep(1000) + await richEditor2?.click() + await Utils.sleep(1000) + let paste = await driver.findComponent(ON.text('粘贴')) + await paste?.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0038 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0041 + *des:两次添加fontfeature 属性,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0041', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0041 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0041") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0041 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0042 + *des:通过onIMEInputComplete获取fontfeature属性,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0042', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0042 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0042") + await Utils.sleep(1000) + let richEditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0042")); + await richEditor?.click() + await Utils.sleep(1000) + await driver.triggerKey(KeyCode.KEYCODE_SPACE) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0042 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0043 + *des:添加多段span,通过aboutToDelete查询fontfearture属性,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0043', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0043 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0043") + await Utils.sleep(1000) + let richEditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0043")); + await richEditor?.click() + await Utils.sleep(1000) + await driver.triggerKey(KeyCode.KEYCODE_DEL) + await Utils.sleep(1000) + await driver.triggerKey(KeyCode.KEYCODE_DEL) + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0043 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0044 + *des:通过setTypingStyle设置fontFeature。通过getTypingStyle查询fontFeature,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0044', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0044 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0044") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0044 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0045 + *des:通过updateSpanStyle设置部分文本fontFeature,另一部分保持原有设置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0045', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0045 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0045") + await Utils.sleep(1000) + let richEditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0045")); + await richEditor1?.click() + await Utils.sleep(1000) + let select = await driver.findComponent(ON.id("select")); + await select?.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0045 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0046 + *des:通过getspans设置文本的fontFeature,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0046', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0046 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0046") + await Utils.sleep(1000) + let select = await driver.findComponent(ON.id("getspans")); + await select?.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0046 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0047 + *des:通过getSelection获取多段span各个的fontFeature,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0047', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0047 start.`); + let driver = Driver.create(); + await Utils.sleep(1000) + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0047") + await Utils.sleep(1000) + let select = await driver.findComponent(ON.id("getselection")); + await select?.click() + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0047 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0048 + *des:通过模拟手指选取内容,获取fontFeature,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0048', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0048 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0048") + await Utils.sleep(1000); + let richEditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0048")); + await richEditor1.click(); + await Utils.sleep(1000); + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0048 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0049 + *des:设置 fontColor: Color.Orange,fontFeature: '\"sups\" on,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0049', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0049 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0049") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0049 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0050 + *des:设置 fontStyle: FontStyle.Italic,fontFeature: '\"sups\" on,,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0050 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0050") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0050 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0051 + *des:设置 fontWeight: FontWeight.Bolder,fontFeature: '\"numr\" on',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0051', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0051 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0051") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0051 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0052 + *des:设置 fontFamily: 'HarmonyOS sans',fontFeature: '\"ss04\" on',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0052', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0052 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0052") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0052 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0053 + *des:设置 decoration: { type: TextDecorationType.Underline, color: Color.Black },fontFeature: '\"fwid\" on',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0053', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0053 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0053") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0053 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0054 + *des:设置 textShadow: { radius: 10, color: Color.Blue, offsetX: 10, offsetY: 0 }, fontFeature: '\"ss08\" on',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0054', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0054 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0054") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0054 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0055 + *des:设置 lineHeight: 50, fontFeature: '\"hwid\" on',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0055', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0055 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0055") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0055 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0056 + *des:添加多个RichEditor组件,设置不同的fontFeature,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0056', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0056 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0056") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0056 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0057 + *des:动态调整组件宽高,不影响fontfeature效果,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0057', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0057 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0057") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0057")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("justFeature")); + await justBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0057 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0058 + *des:动态调整组件padding和margin,不影响fontfeature效果,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0058', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0058 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0058") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0058")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("justFeature")); + await justBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0058 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0059 + *des:动态调整组件padding和margin,不影响fontfeature效果,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0059', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0059 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0059") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0059")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("justFeature")); + await justBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0059 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0039 + *des:1、拖拽A组件内的内容至B组件内',验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0039', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0039 start.`); + let driver = Driver.create(); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0039") + await Utils.sleep(1000) + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0039")); + let textArea = await driver.findComponent(ON.id('TextArea')); + await textArea.click() + await Utils.sleep(1000); + await textArea.click() + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click() + await Utils.sleep(1000); + await textArea.dragTo(richeditor) + await Utils.sleep(3000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0039 finish.`); + done() + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0040 + *des:添加多个RichEditor组件,设置相同的fentFeature,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0040 start.`); + let driver = Driver.create(); + Settings.createWindow("testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0040") + await Utils.sleep(1000) + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorFontfeature0040")); + let textArea = await driver.findComponent(ON.id('TextArea')); + await textArea.click() + await Utils.sleep(1000); + await textArea.click() + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click() + await Utils.sleep(1000); + await textArea.dragTo(richeditor) + await Utils.sleep(3000); + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_FONTFEATURE_0040 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorInterface/ComponentTextRicheditorInterfaceTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorInterface/ComponentTextRicheditorInterfaceTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3cc60c244088d674b1f01f95400fb97fcaf1deec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorInterface/ComponentTextRicheditorInterfaceTests.test.ets @@ -0,0 +1,3603 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0340:INTERFACE相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorInterfaceTests() { + + describe('ComponentTextRicheditorInterfaceTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0340 + *des:1、启动应用 + 2、输入多段10字符以上的文本,输入纯文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0340.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0340"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0340.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0350 + *des:1、启动成功 + 2、【1,10】所在段落呈现居中对齐以及缩进 + 200,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0350.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0350"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0350.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0360 + *des:1、启动成功 + 2、【1,10】范围所在段落居中对齐以及列表效 + 果,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0360.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0360"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0360.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0410 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0410.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0410"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0410')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0410.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0420 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入图片以及文字,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0420.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0420"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0420')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0420.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0430 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0430.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0430"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0430')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0430")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0430.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0440 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0440.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0440"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0440')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(2014); + await Utils.sleep(100); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0440")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0440.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0450 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0450.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0450"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0450')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0450")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0450.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0460 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0460.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0460"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0460')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0460.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0470 + *des:1、启动成果 + 3、文本颜色显示绿色,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0470.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0470"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0470')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0470.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0480 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0480.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0480"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0480')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0480")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0480.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0490 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0490.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0490"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0490')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0490")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0490.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0500 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0500.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0500"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0500')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0500")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0500.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0510 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0510.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0510"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0510')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0510.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0520 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0520.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0520"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0520')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0520.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0530 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0530.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0530"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0530')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0530")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0530.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0540 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0540.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0540"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0540')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0540")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0540.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0550 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0550.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0550"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0550')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0550")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0550.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0560 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0560.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0560"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0560')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0560.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0570 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0570.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0570"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0570')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0570.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0580 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0580.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0580"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0580')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0580")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0580.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0590 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0590.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0590"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0590')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0590")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0590.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0600 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0600.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0600"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0600')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0600")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0600.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0610 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0610.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0610"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0610')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0610.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0620 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0620.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0620"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0620')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0620.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0630 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0630.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0630"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0630')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0630")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0630.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0640 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0640.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0640"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0640')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0640")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0640.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0650 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0650.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0650"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0650')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0650")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0650.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0660 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0660.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0660"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0660')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0660.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0670 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0670.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0670"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0670')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0670.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0680 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0680.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0680"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0680')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0680")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0680.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0690 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0690.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0690"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0690')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0690")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0690.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0700 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0700.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0700"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0700')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0700")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0700.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0710 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0710.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0710"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0710')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0710")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0710.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0720 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0720.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0720"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0720')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0720.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0730 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0730', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0730.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0730"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0730')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0730.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0740 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0740', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0740.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0740"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0740')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0740")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0740.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0750 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0750.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0750"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0750')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0750")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0750.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0760 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0760.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0760"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0760')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0760")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0760.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0770 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0770', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0770.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0770"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0770')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0770.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0780 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0780.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0780"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0780')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0780.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0790 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0790.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0790"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0790')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0790")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0790.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0800 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0800.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0800"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0800')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0800")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0800.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0810 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0810.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0810"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0810')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0810")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0810.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0820 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0820.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0820"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0820')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0820.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0830 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0830.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0830"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0830')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0830.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0840 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0840.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0840"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0840')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0840")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0840.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0850 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0850', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0850.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0850"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0850')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0850")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0850.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0860 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0860', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0860.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0860"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0860')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0860.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0870 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0870', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0870.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0870"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0870')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0870.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0880 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0880', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0880.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0880"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0880')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0880")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0880.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0890 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0890', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0890.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0890"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0890')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0890")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0890.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0900 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0900', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0900.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0900"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0900')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0900")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0900.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0910 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0910', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0910.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0910"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0910')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0910.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0920 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0920', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0920.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0920"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0920')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0920.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0930 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0930.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0930"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0930')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0930")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0930.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0940 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0940.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0940"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0940')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0940")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0940.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0950 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0950', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0950.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0950"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0950')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0950")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0950.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0960 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0960.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0960"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0960')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0960.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0970 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0970', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0970.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0970"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0970')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0970.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0980 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0980', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0980.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0980"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0980')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0980")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0980.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0990 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0990', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0990.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0990"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface0990')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface0990")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_0990.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1000 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1000', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1000.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1000"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1000')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1000")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1000.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1010 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1010.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1010"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1010')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1010.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1020 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1020.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1020"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1020')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1020.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1030 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1030.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1030"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1030')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1030")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1030.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1040 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1040.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1040"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1040')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1040")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1040.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1050 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1050.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1050"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1050')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1050")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1050.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1060 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1060.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1060"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1060')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1060.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1070 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1070.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1070"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1070')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1070.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1080 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1080.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1080"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1080')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1080")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1080.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1090 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1090.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1090"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1090')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1090")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1090.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1100 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1100.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1100"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1100')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1100")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1100.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1110 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1110.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1110"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1110')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1110.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1120 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1120.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1120"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1120')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1120.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1130 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1130.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1130"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1130')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1130")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1130.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1140 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1140.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1140"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1140')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1140")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1140.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1150 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1150.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1150"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1150')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1150")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1150.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1160 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1160.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1160"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1160')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1160.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1170 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1170.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1170"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1170')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1170.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1180 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1180.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1180"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1180')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1180")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1180.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1190 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1190.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1190"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1190')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1190")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1190.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1200 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1200.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1200"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1200')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1200")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1200.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1210 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1210.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1210"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1210')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1210.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1220 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1220.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1220"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1220')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1220.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1230 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1230.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1230"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1230')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1230")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1230.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1240 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1240.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1240"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1240')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1240")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1240.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1250 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1250.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1250"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1250')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1250")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1250.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1260 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1260.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1260"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1260')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1260.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1270 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1270.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1270"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1270')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1270.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1280 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1280.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1280"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1280')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1280")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1280.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1290 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1290.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1290"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1290')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1290")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1290.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1300 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1300.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1300"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1300')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1300")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1300.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1310 + *des:1、启动应用 + 2、清空输入框内容 + 3、重新输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1310.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1310"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1310')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1310.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1320 + *des:1、启动应用 + 2、清空输入框内容 + 4、重新输入图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1320.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1320"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1320')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_1); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1320.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1330 + *des:1、启动应用 + 2、复制文本后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1330.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1330"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1330')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1330")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1330.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1340 + *des:1、启动应用 + 2、复制图文后粘贴到不同字体的文字中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1340.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1340"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1340')); + await rich.click(); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(500); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(500); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1340")); + await richEditor2?.click(); + await Utils.sleep(500); + await richEditor2?.click(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1340.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1350 + *des:1、启动应用 + 2、复制原本不同字体的文本后粘贴到其他内容 + 中,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1350.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1350"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1350')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let richEditor2 = await driver.findComponent(ON.id("ComponentTextRicheditorInterface1350")); + await richEditor2?.click(); + await Utils.sleep(1000); + await richEditor2?.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1350.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1360 + *des:1、启动应用 + 2、输入图文内容 + 3、长按选择部分文字内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1360.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1360"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1360')); + await rich.longClick(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1360.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1380 + *des:1、启动应用 + 2、输入一段图文内容 + 3、长按图片位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1380.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1380"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1380')); + await rich.longClick(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1380.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1400 + *des:1、启动应用 + 2、输入一段图文内容 + 3、长按选中图文内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1400.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1400"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorInterface1400')); + await rich.click(); + await Utils.sleep(500); + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_INTERFACE_1400.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcingTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcingTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..297c9628d07fb448acb33a87463ff4e5c0973cfb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcingTests.test.ets @@ -0,0 +1,209 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0001:KEYBOARDREINFORCING相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorKeyboardReinForcingTests() { + + describe('ComponentTextRicheditorKeyboardReinForcingTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0001 + *des:1、点击RichEditor组件,激活软键盘 + 2、观察软键盘右下角回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0001 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0001") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0001')); + await rich.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0001.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0002 + *des:1、点击RichEditor组件,激活软键盘 + 2、观察软键盘右下角回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0002 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0002") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0002')); + await rich.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0002.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0003 + *des:1、点击RichEditor组件,激活软键盘 + 2、观察软键盘右下角回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0003 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0003") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0003')); + await rich.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0003.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0004 + *des:1、点击RichEditor组件,激活软键盘 + 2、观察软键盘右下角回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0004") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0004')); + await rich.click() + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0004.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0012 + *des:1、设置onSubmit回调 + 2、点击RichEditor组件,拉起软键盘 + 3、动态切换EnterKeyType + 4、点击软键盘回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0012") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0012')); + await rich.click(); + await Utils.sleep(1000); + let switchType = await driver.findComponent(ON.id('switchType')); + await switchType.click(); + await Utils.sleep(1000); + let rich2 = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0012')); + await rich2.click(); + await Utils.sleep(1000); + await driver.triggerKey(2054); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0012.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0013 + *des:1、设置onSubmit回调 + 2、收起软键盘 + 3、动态切换EnterKeyTypo + 4、拉起软键盘 + 5、点击软键盘回车键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0013") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0013')); + await rich.click(); + await Utils.sleep(1000); + let switchType = await driver.findComponent(ON.id('switchType')); + await switchType.click(); + await Utils.sleep(1000); + let rich2 = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0013')); + await rich2.click(); + await Utils.sleep(1000); + await driver.triggerKey(2054); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0013.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0015 + *des:1、设置 onsubmit回调 + 2、动态切换EnterKeyType类型 + 3、点击键盘 Enter键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0015start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0015") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0015')); + await rich.click(); + await Utils.sleep(1000); + let switchType = await driver.findComponent(ON.id('switchType')); + await switchType.click(); + await Utils.sleep(1000); + let rich2 = await driver.findComponent(ON.id('ComponentTextRicheditorKeyboardReinForcing0015')); + await rich2.click(); + await Utils.sleep(1000); + await driver.triggerKey(2054); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_KEYBOARDREINFORCING_0015.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacingTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacingTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..140efa8e6d2156cc717c4d2f7fb4847ae47d681d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacingTests.test.ets @@ -0,0 +1,261 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING:LINEHEIGHT&LETTERSPACING相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorLineHeightLetterSpacingTests() { + + describe('ComponentTextRicheditorLineHeightLetterSpacingTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0014 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为10, letter- spacing值 + 为-100,输入纯文本内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0014 start.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0014") + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0014.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0014 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、onIMEInputComplete接口调用获取 + lineHeight、 letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0014 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0019") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0019")); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0019.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0020 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、aboutToDelete接口调用获取lineHeight、 + letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0020") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0020")); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_A); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0020.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0021 + *des:1、你从\ Icnual torsent + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、onSelect接口调用获取lineHeight、 + letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0021', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0021 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0021") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0021")); + await richeditor.longClick(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0021.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0022 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、getTypingStyle接口调用获取lineHeight + 、 letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0022 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0022") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0022")); + await richeditor.click(); + await Utils.sleep(1000); + let getStyles = await driver.findComponent(ON.id("getStyles")); + await getStyles.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0022.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0023 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、getSpans接口调用获取lineHeight、 + letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0023', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0023 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0023") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0023")); + await richeditor.click(); + await Utils.sleep(1000); + let getStyles = await driver.findComponent(ON.id("getStyles")); + await getStyles.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0023.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0024 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、 getsolection接口调用获取lineHeight、 + letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0024', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0024 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0024") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0024")); + await richeditor.click(); + await Utils.sleep(1000); + let getStyles = await driver.findComponent(ON.id("getStyles")); + await getStyles.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0024.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0025 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、setTypingStyle接口调用获取lineHeight + 、 letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0025', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0025 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0025") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0025")); + await richeditor.click(); + await Utils.sleep(1000); + let getStyles = await driver.findComponent(ON.id("getStyles")); + await getStyles.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0025.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0026 + *des:1、添加RichEditor组件 + 2、设置lineHeight值为30, letter- spacing + 值为30 + 3、updateSpanStyle接口调用获取lineHeight| + 、 letter- spacing属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHTLETTERSPACING_0026', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0026 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0026") + await Utils.sleep(2000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLineHeightLetterSpacing0026")); + await richeditor.click(); + await Utils.sleep(1000); + let getStyles = await driver.findComponent(ON.id("getStyles")); + await getStyles.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LINEHEIGHT&LETTERSPACING_0026.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectalls.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectalls.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..af1feae37182093bb11d04726e795ea938199fcf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectalls.test.ets @@ -0,0 +1,647 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0001:长按选中相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorLongPresstoselectalls() { + + describe('ComponentTextRicheditorLongPresstoselectalls', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0001 + *des:1、设置onLongPress回调函数里setSelection(1,2,{menuPolicy: MenuPolicy.SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0001', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0001 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0001") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0001")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0001.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0002 + *des:1、设置onLongPress回调函数里setSelection(1,2,{menuPolicy: MenuPolicy.HIDE }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0002', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0002 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0002") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0002")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0002.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0003 + *des:1、设置onLongPress回调函数里setSelection(1,2,{menuPolicy: MenuPolicy.DEFAULT }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0003', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0003 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0003") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0003")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0003.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0004 + *des:1、设置onLongPress回调函数里setSeleotion(1,2,{menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0004', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0004") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0004")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0004.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0005 + *des:1、设置onLongPress回调函数里setSelection(1,2,{menvuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0005', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0005 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0005") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0005")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0005.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0006 + *des:1、设置onLongPress回调函数里setSelection(1, 2,{menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0006', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0006 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0006") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0006")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0006.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0007 + *des:1、设置onLongPress回调函数里setSelection(1, 2,{menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0007', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0006 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0007") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0007")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0007.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0008 + *des:1、设置onLongPress回调函数里setSelection(1,2,{menuPolicy: MenuPolicy.HIDE }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0008', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0008 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0008") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0008")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0008.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0009 + *des:1、设置onLongPress回调函数里setSelection(-1,0,{menuPolicy: MenuPolicy.SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0009', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0009 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0009") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0009")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0009.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0010 + *des:1、设置onLongPress回调函数里setSelection(2,1,{menuPolicy: MenuPolicy.SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0010', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0010 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0010") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0010")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0010.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0011 + *des:1、设置onLongPress回调函数里setSelection(1, 1,(menuPolicy: SHOW )) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0011', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0011 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0011") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0011")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0011.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0012 + *des:1、设置onLongPress回调函数里setSelection(1, 1,{menuPolicy: HIDE }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0012', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0012") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0012")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0012.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0013 + *des:1、设置onLongPress回调函数里setSelection(1,2, + {menuPolicy:-1 }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0013', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0013") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0013")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0012.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0014 + *des:1、设置onLongPress回调函数里setSelection(1, 2, + (menuPolicy: 3 }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0014', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0014 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0014") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0014")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0014.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0015 + *des:1、设置onLongPress回调函数里setSelection(1, 2, + (menyPolicy: undefined }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0015', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0015 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0015") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0015")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0015.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0016 + *des:1、设置onLongPress回调函数里setSelection(-1,1000, + {menvaPolicy: HIDE }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0016', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0016 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0016") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0016")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0016.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017 + *des:1、设置onLongPress回调函数里setSelection(-1, 1000, + {menuPolicy: NEVER }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0017")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_157 + *des:1、设置onLongPress回调函数里setSelection(-1, 0. + {menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_157', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_157 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0017_157")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_157.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_157_029 + *des:1、设置onLongPress回调函数里setSeleotion(2, 1, + {menuPolicy: HIDE}) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_157_029', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_157_029 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157_029") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0017_157_029")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_157_029.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_429 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: default }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_429', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_429 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0017_429")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click() + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_429.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_429_005 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: default }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0017_429_005', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_429_005 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429_005") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0017_429_005")); + await richeditor.click(); + await Utils.sleep(1000) + await richeditor.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0017_429_005.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0018 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0018', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0018 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0018") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0018")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0018.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0019 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: SHOW }) + 2、长按富文本内任意位置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0019', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0019 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0019") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0019")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0019.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0020 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: ALWAYS }) + 2、长按富文本内任意位置,再拖动手柄,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0020', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0020") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0020")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + await richeditor.dragTo(richeditor); + await Utils.sleep(2000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0020.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0021 + *des:1、设置onLongPress回调函数里setSelection(1,2, + {menuPolicy: never }) + 2、长按富文本内任意位置触发接口调用 + 3、双击选区外其他文字内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0021', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0021 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0021") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0021")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + await richeditor.dragTo(richeditor); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0021")); + await richeditor1.click(); + await Utils.sleep(1000); + await richeditor1.click(); + await Utils.sleep(1000); + await richeditor1.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0021.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0022 + *des:1、设置onLongPress回调函数里setSelection(-1, -1, + {menuPolicy: default }) + 2、长按富文本内任意位置,再拖动手柄容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_LONGPRESSTOSELECTAIL_0022', 0, async (done: Function) => { + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0022 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0022") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0022")); + await richeditor.click(); + await Utils.sleep(1000) + let selectBtn = await driver.findComponent(ON.id('select')); + await selectBtn.click(); + await Utils.sleep(1000); + let richeditor1 = await driver.findComponent(ON.id("ComponentTextRicheditorLongPresstoselectall0022")); + await richeditor1.click(); + await Utils.sleep(1000) + await richeditor1.click(); + await Utils.sleep(1000) + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `ComponentTextRicheditorLongPresstoselectall0022.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChangeTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChangeTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f592251066066f69a70c309e3db37bf3a5f675ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChangeTests.test.ets @@ -0,0 +1,236 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE:onwillchange相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorOnWillChangeTests() { + + describe('ComponentTextRicheditorOnWillChangeTests', () => { + + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0001 + *des:2、富文本组件输入框无法输入, onWillChange回调中的replacedSpans中的值正常, onDidChang无回调值|,验证效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0001 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0001") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0001")); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0001.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0002 + *des:1、onWillChange返回值设置为 false. + 2、从其他组件拖拽文本内容到此RichEditor组件中(考虑手动 + 拖拽和鼠标拖拽),验证效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0002 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0002") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0002")); + let textArea = await driver.findComponent(ON.id('TextArea')); + await textArea.click(); + await Utils.sleep(1000); + await textArea.click() + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click(); + await Utils.sleep(1000); + await textArea.dragTo(richeditor) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0002.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0003 + *des:1、onWillChange返回值设置为 false + 2、点击AddTextSpan输入字符,验证效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0003 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0003") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0003")); + let changeBtn = await driver.findComponent(ON.id("changeFeature")); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0003.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0004 + *des:1、onWillChange返回值设置为 true + 2、输入文本内容,验证效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0004") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0004")); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0004.`+richeditor); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0004.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0005 + *des:1、onWillChange返回值设置为 true + 2、输入文本内容,验证效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0005start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0005") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0005")); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0005.`+richeditor); + await richeditor.click(); + await Utils.sleep(1000); + let deleteBtn = await driver.findComponent(ON.id("delete")); + await deleteBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0005.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0006 + *des:1、onWillChange返回值设置为 true + 2、输入文本内容 + 3、软/硬(BackSpace/ delete) 键盘删除部分文本,看预期效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0006start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0006") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0006")); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0006.`+richeditor); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0006.`); + done(); + }) + /** + * NO.SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0007 + *des:1、onWillChange返回值设置为 true + 2、输入文本内容 + 3、软/硬(BackSpace/ delete) 键盘删除部分文本,看预期效果 + */ + it('SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0007start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0007") + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorOnWillChange0007")); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0007.`+richeditor); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(100); + await driver.triggerKey(2641); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UT_COMPONENT_TEXT_RICHEDITOR_ONWILLCHANGE_0007.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholderTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholderTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..18c12f98f608bc25d1eae78f9f40ac7b86ff55d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholderTests.test.ets @@ -0,0 +1,2052 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * "SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0001":placeholder相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorPlaceholderTests() { + + describe('ComponentTextRicheditorPlaceholderTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0001 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 value为‘’这是提示文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0001 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0001"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0001.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0002 + *des:"1、添加RichEditor组件,设置较小长宽 + 2、接口中设置 placeholder的 value为‘前面章节介绍了如何创 + 建一个自定义组件。该自定义组件内部红结构固定,仅与使用方 + 进行数据传递。 Ark UI还提供了一种更轻量的VI元素复用机制 + ④vilder,④vilder所装饰的函数遵循 build()函数语法规则, + 开发者可以将重复使用的UI元素抽象成一个方法,在build方法 + 里调用。’" + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0002 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0002"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0002.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0003 + *des:"1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为“”" + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0003 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0003"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0003.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0004 + *des:"1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为“”" + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0004 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0004"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0004.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0005 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为“回头看了附近的 + hfkdshf \ nhfkdf& ldfkklf \n^7#@32345 () --#999@“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0005 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0005"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0005.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0006 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为正确资源类型例: + $r( app.string.common) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0006 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0006"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0006.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0007 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为正确资源类型例: $x(“ + app. media. startIcon) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0007 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0007"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0007.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0008 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“20gx” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0008', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0008 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0008"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0008.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0009 + *des:1、添加RichEditor组件,设置较小长宽 + 2、接口中设置 placeholder的 size为“100px“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0009', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0009 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0009"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0009.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0010 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为‘10’ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0010 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0010"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0010`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0011 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“23.40” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0011 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0011"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0011`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0012 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为‘50fp’ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0012 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0012"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0012`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0013 + *des:1、添加RichEditor组件。 + 2、接口中设置 placeholder的 size为‘50abedefg’ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0013 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0013"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0013`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0014 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“50dp” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0014 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0014"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0014`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0015 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为‘100%’ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0015 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0015"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0015`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0016 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“上班 qwer$k\n” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0016 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0016"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0016`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0017 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“-1px“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0017', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0017 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0017"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0017`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0018 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“ Opx“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0018', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0018 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0018"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0018`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0019 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为“0b1010” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0019 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0019"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0019`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0020 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为20 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0020 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0020"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0020`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0021 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为-10 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0021', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0021 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0021"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0021`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0022 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为0b1010 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0022 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0022"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0022`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0023 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为23.40 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0023', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0023 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0023"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0023`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0024 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为0x22 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0024', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0024 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0024"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0024`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0025 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为0 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0025', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0025 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0025"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0025`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0026 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为$r( + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0026', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0026 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0026"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0026`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0027 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 size为$r(“ app. media. startIcon + “) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0027', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0027 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0027"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0027`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0028 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的FontStyle为FontStyle. Italic + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0028', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0028 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0028"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0028`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0029 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的FontStyle为FontStyle. Normal + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0029', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0029 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0029"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0029`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0030 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“900” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0030 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0030"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0030`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0031 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“400” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0031', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0031 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0031"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0031`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0032 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“100” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0032', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0032 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0032"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0032`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0033 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“-1” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0033', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0033 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0033"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0033`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0034 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“0” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0034', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0034 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0034"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0034`); + done(); + }) + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0035 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“1000” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0035', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0035 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0035"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0035`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0036 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“901” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0036', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0036 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0036"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0036`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0037 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的 weight为“100.6” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0037', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0037 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0037"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0037`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0038 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为“0b1100100“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0038', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0038 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0038"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0038`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0039 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为“ abedefg” + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0039', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0039 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0039"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0039`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0040 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为900 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0040 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0040"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0040`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0041 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为400 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0041', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0041 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0041"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0041`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0042 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为100 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0042', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0042 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0042"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0042`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0043 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为0b1100100 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0043', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0043 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0043"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0043`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0044 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为-100 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0044', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0044 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0044"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0044`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0045 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为0 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0045', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0045 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0045"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0045`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0046 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为1000 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0046', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0046 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0046"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0046`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0047 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为99 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0047', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0047 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0047"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0047`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0048 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为901 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0048', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0048 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0048"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0048`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0049 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为900.6 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0049', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0049 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0049"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0049`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0050 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为100.6 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0050 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0050"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0050`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0051 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为101 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0051', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0051 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0051"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0051`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0052 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为499.9 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0052', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0052 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0052"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0052`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0053 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight. Lighter + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0053', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0053 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0053"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0053`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0054 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight. Normal + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0054', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0054 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0054"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0054`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0055 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight.Regular + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0055', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0055 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0055"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0055`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0056 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight. Medium + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0056', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0056 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0056"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0056`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0057 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight. Bold + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0057', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0057 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0057"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0057`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0058 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 weight为FontWeight. Bolder + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0058', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0058 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0058"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0058`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0059 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 family为“HarmonyOS Sans“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0059', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0059 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0059"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0059`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0060 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 family为‘ abedefg’ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0060 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0060"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0060`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0061 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 family为$r(“ + app. string mediunFanilyNane“) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0061', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0061 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0061"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0061`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0062 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 family为$r(“ + app. media startIcon“) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0062', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0062 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0062"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0062`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0063 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为 Color. Orange + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0063', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0063 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0063"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0063`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0064 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为0x0000ff + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0064', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0064 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0064"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0064`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0065 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为 Oxffffffeeeee + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0065', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0065 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0065"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0065`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0066 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为10000 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0066', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0066 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0066"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0066`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0067 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为10000.5 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0067', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0067 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0067"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0067`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0068 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为-15 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0068', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0068 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0068"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0068`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0069 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为“#00ffff“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0069', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0069 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0069"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0069`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0070 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为“#ffffff00“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0070 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0070"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0070`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0071 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为“ rgb(255.0.255)“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0071', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0071 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0071"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0071`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0072 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为“ rgba(0,0,255,0.5) + “ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0072', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0072 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0072"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0072`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0073 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为‘#0cccccc“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0073', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0073 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0073"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0073`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0074 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为“ rgba(255,0,255,2) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0074', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0074 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0074"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0074`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0075 + *des:1、添加RichEditor组件. + 2、接口中设置 placeholder的fontColor为“ rgb(255,0,300)“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0075', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0075 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0075"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0075`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0076 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholdar的fontColor为“# abcdefg“ + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0076', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0076 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0076"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0076`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0077 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为$r(“ + app. color. color“) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0077', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0077 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0077"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0077`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0078 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的fontColor为$r(“ + app. media. startIcon“) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0078', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0078 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0078"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0078`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079 + *des:"1、添加RichEditor组件 + 2、添加 button动态改变 font- size, font- weight, font- + style. font- family, fontcolor, value + 3、单次点击 button" + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0079')) + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')) + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079_932 + *des:"1、添加RichEditor组件 + 2、添加 button动态改变 font- size, font- weight, font- + style. font- family, fontcolor, value + 3、单次点击 button" + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079_932', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079_932"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0079_932')) + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')) + await changeBtn.click(); + await Utils.sleep(1000); + await rich.longClick(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0079_932`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0080 + *des:1、添加RichEditor组件 + 2、添加 button动态改变 font- size: font- weight, font- + style. font- family, fontcolor, value + 3、多次连续点击 button + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0080 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0080"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0080')) + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')) + await changeBtn.click(); + await Utils.sleep(1000); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0080`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0081 + *des:1、添加RichEditor组件 + 2、设置 value为“这是提示”,不设置 font + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0081', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0081 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0081"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0081`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0082 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3:点击输入框,使输入框获焦 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0082', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0082 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0082"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0082')); + await Utils.sleep(1000); + let changeText = await driver.findComponent(ON.id('change')); + changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0082`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0083 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、使用鼠标, 使输入框获焦 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0083', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0083 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0083"); + await Utils.sleep(1000); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0083')); + await Utils.sleep(1000); + let changeText = await driver.findComponent(ON.id('change')); + await changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + let ponit = await rich.getBoundsCenter(); + await driver.click( ponit.x, ponit.y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0083`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0084 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、使用键盘输入内容 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0084', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0084 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0084"); + await Utils.sleep(1000); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0084')); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0084`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0085 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、长按光标粘贴输入内容 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0085', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0085 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0085"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0085')); + let changeText = await driver.findComponent(ON.id('change')); + await changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await changeText.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(1000); + let copy = await driver.findComponent(ON.text('复制')); + await copy.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0085')); + let ponit = await rich1.getBoundsCenter(); + await driver.click( ponit.x, ponit.y); + await Utils.sleep(100); + await driver.longClick( ponit.x, ponit.y); + await Utils.sleep(100); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0085`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0086 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、拖拽输入内容 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0086', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0086 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0086"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0086')); + let changeText = await driver.findComponent(ON.id('change')); + await changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await changeText.click(); + await Utils.sleep(100); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(100); + await changeText.dragTo(rich); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0086`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0087 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、输入内容后键盘清除全部 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0087', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0087 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0087"); + await Utils.sleep(1000); + let changeText = await driver.findComponent(ON.id('change')); + await changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0087')); + let ponit = await rich1.getBoundsCenter(); + await driver.click( ponit.x, ponit.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0087`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0088 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、输入内容 + 4、键盘改变光标位置后再清除光标前内容 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0088', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0088 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0088"); + await Utils.sleep(1000); + let changeText = await driver.findComponent(ON.id('change')); + await changeText.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0088')); + let ponit = await rich1.getBoundsCenter(); + await driver.click( ponit.x, ponit.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0088`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0089 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、输入内容后键盘清除全部 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0089', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0089 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0089"); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0089')); + let ponit = await rich1.getBoundsCenter(); + await driver.doubleClick( ponit.x, ponit.y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0089`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0090 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、长按水印 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0090 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0090"); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0090')); + let ponit = await rich1.getBoundsCenter(); + await driver.longClick( ponit.x, ponit.y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0090`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0091 + *des:1、添加RichEditor组件 + 2、RichEditor( this. options) + . onReady(() =>{}中预置addTextSpan, + addImageSpan, addSymbolSpan, addBuilderSpan + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0091', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0091 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0091"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0091`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0092 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、RichEditor( this. options) + . onReady(()=>{}中预置addTextSpan, + addInageSpan, addSymbolSpan, addBuilderSpan + 3、键盘删除预置 span + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0092', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0092 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0092"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0092')); + let ponit = await rich.getBoundsCenter(); + await driver.click( ponit.x, ponit.y); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0092`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0093 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、RichEditor( this. options) + . onReady(() =>{}中预置addTextSpan, + addImageSpan, addSymbolSpan, addBuilderSpan + 4、按钮删除全部预置 span(deleteSpans()) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0093', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0093 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0093"); + await Utils.sleep(1000); + let deleteBtn = await driver.findComponent(ON.id('delete')); + await deleteBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0093`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0094 + *des:1、添加RichEditor组件 + 2、自定义水印内容 + 3、通过按钮添加、删除addTextSpan, addImageSpan, + addSymbolSpan, addBuilderSpan + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0094', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0094 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0094"); + await Utils.sleep(1000); + let addBtn = await driver.findComponent(ON.id('add')); + await addBtn.click(); + await Utils.sleep(1000); + let deleteBtn = await driver.findComponent(ON.id('delete')); + await deleteBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0094`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0095 + *des:1、添加RichEditor组件,设置百分比宽高 + 2、自定义水印内容,设置长文本 + 3、切换横竖屏 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0095', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0095 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0095"); + await Utils.sleep(1000); + let addBtn = await driver.findComponent(ON.id('setContent')); + await addBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0095`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0097 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为“’这是提示文本” + 3、设置 update Paragraph Style中 textAlim: TextAlim. End + 4、预置 span,内容水平对齐尾部,删除 span观察水印位置 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0097', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0097 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0097"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0097')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2015); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0097`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0098 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为“”这是提示文本 + 3、设置. align( Aligment. BottomStart) + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0098', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0098 start.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0098"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0098`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0099 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置输入内容向右空白缩进 + 4、输入内容后,删除 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0099', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0099 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0099"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder0099')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(2050); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_0099`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00100 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置 button增加/减小文本宽/高度 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00100 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00100"); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00100`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00101 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置 button增加/减小内边距属性 padding + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00101', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00101 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00101"); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00101`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00102 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置 button增加/减小外边距属性 margin + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00102', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00102 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00102"); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00102`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本。 + 3、设置 button增加/减小在父容器主轴方向上的基准尺寸 + flexBasis + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103"); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00104 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置 button增加/减小水印文本 size大小 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00104', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00104 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00104"); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder00104')); + await rich.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00104`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00105 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本 + 3、设置 button改变水印文本位置 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00105', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00105 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00105"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder00105')); + await rich.click(); + await Utils.sleep(1000); + let changeBtn = await driver.findComponent(ON.id('changeFeature')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00105`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为‘’这是提示文本_ + 3、输入多行文本后,上划文本至底部, 使用 deletespan清空内 + 容 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder00103_040')); + await rich.click(); + await Utils.sleep(1000); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_F); + await Utils.sleep(100); + let changeBtn = await driver.findComponent(ON.id('change')); + await changeBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040_934 + *des:1、添加RichEditor组件 + 2、接口中设置 placeholder的 value为。”这是提示文本_ + 3、从其他组件拖拽文本,至水印内容处,移动拖拽文本不松手 + ,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040_934', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040_934 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040_934"); + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorPlaceholder00103_040_934')); + let textArea = await driver.findComponent(ON.id('TextArea')); + await textArea.click(); + await Utils.sleep(1000); + await textArea.click() + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click(); + await Utils.sleep(1000); + await textArea.dragTo(textArea) + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_PLACEHOLDER_00103_040_934`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeysTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeysTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5adf8f6929a886e52cbfcda19fc26c82cf02dc78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeysTests.test.ets @@ -0,0 +1,1162 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' +import { MouseButton } from '@kit.TestKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0010:SHORTKCUTKEYS相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorShortKcutKeysTests() { + + describe('ComponentTextRicheditorShortKcutKeysTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0010 + *des:1、第一个输入框中输入长文本,设置字体样式为红色、料体、较粗;使用快捷键ctrl+c复制ctrl+v粘贴到另一个输入框中 + 2、查看第二个输入框中文本显示,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0010 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0010") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0010')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0010_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0010.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0020 + *des:1、第一个输入框中输入三张图片,使用ctrl+A全选后快捷键ctrl+c夏制ctrl+v粘贴到另一个输入框中 + 2、查看第二个输入框中的显示,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0020") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0020')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0020_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0020.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0030 + *des:1、第一个输入框中输入三张图片,选中一张图片后快捷键ctrl+c复制ctrl+v粘贴到另一个输入框中 + 2、查看第二个输入框中的显示,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0030 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0030") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0030')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0030_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0030.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0040 + *des:1、在第一个输入框中添加长文本,使用ctrl+A,全选;ctrl+a进行复制 + 2、在第二个输入框中ctrl+V连续十次进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0040 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0040") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0040')); + await rich.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0040_01')); + await rich1.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0040.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0050 + *des:1、添加两个输入框,在第一个输入枉中添加长文本,在文本中间按回车进行换行(长文本变成两个自然段),右键点击菜单中复制选项 + 2、在第二个输入框中点击粘贴,粘贴的文本仍未两个自然段保留手动换行,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0050 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0050") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0050')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0050_01')); + await rich1.click(); + await Utils.sleep(1000); + await rich1.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0050.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0060 + *des:1、添加两个输入框,在第一个输入框中添加长文本和图片,使用快捷键ctrl+c进行复制,文本内容,再用快捷键复制图片 + 2、在第二个输入框中ctrl+v粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0060 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0060") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0060')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0060_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0060.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0070 + *des:1、在第一个输入框中选中文本进行复制 + 2、在第二个输入框中选中一段文本/图片 + 3、ctrl+v进行粘贴操作,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0070 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0070") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0070')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0070_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0070.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0080 + *des:1、在第一个输入框中输入长本文,手势长按文本弹出菜单栏,点击”复制 + 2、在第二个输入框中手势长按进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0080 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0080") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0080')); + await rich.click(); + await Utils.sleep(1000); + await rich.click(); + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')); + await selectAll?.click(); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0080_01')); + await rich1.click(); + await Utils.sleep(1000); + await rich1.click(); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0080.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0090 + *des:1、在第一个输入框中输入长本文,使用 ctrl+c夏制文本内容 + 2、在第二个输入框中使用快捷键ctrl+v进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0090 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0090") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0090')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0090_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0090.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0100 + *des:1、在第一个输入框中输入长本文,使用 ctrl+c夏制文本内容 + 2、在第二个输入框中使用快捷键ctrl+v进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0100 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0100") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0100')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0100_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0100.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0110 + *des:1、在第一个输入框中输入长本文,鼠标右键弹出菜单栏,点击复制 + 2、在第二个输入框中使用快捷键ctrl+v进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0110 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0110") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0110')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + let ponit = await rich.getBoundsCenter(); + await Utils.sleep(1000); + await driver.mouseClick(ponit, MouseButton.MOUSE_BUTTON_RIGHT); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0110_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0110.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0120 + *des:1、在第一个输入框中输入长本文,使用ctrl+c复制文本内容 + 2、在第二个输入框中右键粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0120 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0120") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0120')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0120_01')); + await rich1.click(); + await Utils.sleep(1000); + let ponit = await rich1.getBoundsCenter(); + await Utils.sleep(1000); + await driver.mouseClick(ponit, MouseButton.MOUSE_BUTTON_RIGHT); + await Utils.sleep(1000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0120.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0130 + *des:1、在第一个输入框中输入图片,鼠标右键弹出菜单栏,点击”复制 + 2、第二个输入框中使用快捷键ctrl+v进行拈贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0130 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0130") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0130')); + await rich.click(); + await Utils.sleep(1000); + let ponit = await rich.getBounds(); + await Utils.sleep(500); + await driver.mouseClick({x:ponit.left+57,y:ponit.top+57}, MouseButton.MOUSE_BUTTON_RIGHT); + await Utils.sleep(500); + let copy = await driver.findComponent(ON.text('复制')); + await copy?.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0130_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0130.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0140 + *des:1、在第一个输入框中长文本,选中一段文字后,使用ctrl+x剪切 + 2、第二个输入框中使用快捷键ctrl+v进行粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0140 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0140") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0140')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0140_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0140.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0150 + *des:1、在第一个输入框中输入长文本,选中一段文字后,使用ctrl+x剪切 + 2、再在第一个输入框中选中一段文字,使用ctrl+c复制一段文本 + 3、在第二个输入框中使用ctrl+v粘贴一段文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0150 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0150") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0150')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0150_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0150.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0160 + *des:1、在第一个输入框中输入长文本,选中一段文字后,使用ctrl+x剪切 + 2、再在第一个输入框中选中一段文字,使用ctrl+c复制一段文本 + 3、在第二个输入框中使用ctrl+v粘贴一投文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0160 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0160") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0160')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0160_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0160.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0170 + *des:1、在第一个输入框中输入长文本,选中一段文字后,使用ctrl+x剪切 + 2、再使用ctrl+z撒销剪切的文本 + 3、在第二个输入框中使用ctrl+v粘贴一段文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0170 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0170") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0170')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Z); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0170_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0170.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0180 + *des:1、在第一个输入框中3张图片,选中一张图片后,使用ctrl+x剪切 + 2、在第二个输入框中使用ctrl+v粘贴图片,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0180 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0180") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0180')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0180_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0180.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0190 + *des:1、在第一个输入框中3张图片,选中一张图片后,使用ctrl+x剪切 + 2、再选中另一张图片,使用ctrl+x剪切 + 3、在第二个输入框中使用ctrl+v粘贴图片,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0190 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0190") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0190')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0190_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0190.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0200 + *des:1、在第一个输入框中输入图片和文字,选中一段文字后,使用ctrl+x剪切 + 2、再选中另一张图片,使用ctrl+x剪切 + 3、在第二个输入框中使用ctrl+v粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0200 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0200") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0200')); + await rich.click(); + await Utils.sleep(1000); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(1000); + let select1 = await driver.findComponent(ON.id('select1')); + await select1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0200_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0200.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0210 + *des:1、在第一个输入框中输入图片和文字,选中一张图片后,使用ctrl+x剪切 + 2、再选中一段文字,使用ctrl+x剪切 + 3、在第二个输入框中使用ctrl+v,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0210 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0210") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0210')); + await rich.click(); + await Utils.sleep(1000); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(1000); + let select1 = await driver.findComponent(ON.id('select1')); + await select1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0210_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0210.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0220 + *des:1、在第一个输入框中输入文字,使用手势长按一段文本选中 + 再弹出的菜单栏中,点击”剪切" + 2、在第二个输入框中使用ctrl+v,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0220 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0220") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0220')); + await rich.longClick(); + await Utils.sleep(1000); + let cut = await driver.findComponent(ON.text('剪切')); + await cut.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0220_01')); + await rich1.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0220.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0230 + *des:1、在第一个输入框中输入文字,选中一段文本后,使用ctrl+x剪切文本内容 + 2、在第二个输入框中使用手势长按,点击”粘贴按钮,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0230 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0230") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0230')); + await rich.click(); + await Utils.sleep(1000); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0230_01')); + await rich1.click(); + await Utils.sleep(500); + await rich1.longClick(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0230.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0240 + *des:1、在第一个输入框中输入图片,选中一张图片后,使用手势长 + 按 ·弹出菜单,点击”剪切",剪切图片 + 2、在第二个输入框中使用 ctrl+y,粘贴图片内容,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0240 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0240") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0240')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0240_01')); + await rich1.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0240.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0260 + *des:1、在第一个输入框中输入长文本内容,选中一段文字,ctrl+c剪切 + 2、在第二个输入框中手势长按,弹出菜单,点击粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0260 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0260") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0260')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0260_01')); + await rich1.click(); + await Utils.sleep(500); + await rich1.longClick(); + await Utils.sleep(500); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0260.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0270 + *des:1、在第一个输入框中输入图片内容,选中一张图片,手势长 + 按,点击的切图片 + 2、在第二个输入框中使用ctrl+v,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0270 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0270") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0270')); + await rich.longClick(); + await Utils.sleep(1000); + let cut = await driver.findComponent(ON.text('剪切')); + await cut.click(); + await Utils.sleep(1000); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0270_01')); + await rich1.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0270.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0280 + *des:1、在第一个输入框中输入长文本内容,使用ctrl+c复制文本内容 + 2、在第二个输入框中使用ctrl+v粘贴文本内容 + 3、ctrl+z散销粘贴操作 + 4、ctrl+y或ctrl+shift+z,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0280 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0280") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0280')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + let rich1 = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0280_01')); + await rich1.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await rich1.click(); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Z); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0280.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0290 + *des:1、在第一个输入框中输入长文本内容,对文本内容进行删除 + 2、ctrl+z撤销删除操作 + 3、ctrl+y或ctrl+shift+z,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0290 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0290") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0290')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Z); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0290.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0300 + *des:1、在第一个输入框中输入长文本内容,使用ctrl+c夏制文本内容 + 2、 ctrl+v粘贴文本内容 + 3、ctrl+y或ctrl+shift+z,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0300 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0300") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0300')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_C); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_V); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0300.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0310 + *des:1、在第一个输入框中输入长文本内容,使用ctrl+剪切文本内 + 容 + 2、再次选中一段文本内容 + 3、ctrl+y或ctrl+shift+z,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0310 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0310") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0310')); + await rich.longClick(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_X); + await Utils.sleep(500); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_A); + await Utils.sleep(500); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_Y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0310.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0320 + *des:1、在第一个输入框中输入长文本内容,分成3个自然段 + 2、光标位于第一自然段段首 + 3、按ctrl+↓,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0320 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0320") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0320')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_RIGHT, KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_RIGHT, KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0320.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0330 + *des:1、在第一个输入框中输入长文本内容,分成3个自然段 + 2、光标位于第一自然段段尾 + 3、按ctrl+↓,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0330 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0330") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0330')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0330.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0340 + *des:1、在第一个输入框中输入长文本内容,分成3个自然段 + 2、光标位于第二自然段段首 + 3、按ctrl+↑,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0340 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0340") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0340')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(500); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_LEFT, KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0340.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0350 + *des:1、在第一个输入框中输入长文本内容,分成3个自然段 + 2、光标位于自然段段首 + 3、按ctrl+↓,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0350 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0350") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0350')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_RIGHT, KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_RIGHT, KeyCode.KEYCODE_DPAD_UP); + await Utils.sleep(100); + await driver.triggerCombineKeys(KeyCode.KEYCODE_CTRL_RIGHT, KeyCode.KEYCODE_DPAD_DOWN); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0350.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0360 + *des:1、输入长文本,光标位于自然段段中 + 2、按ctrl+←,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0360 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0360") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0360')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0360.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0370 + *des:1、输入长文本,光标位于自然段段中 + 2、按Ctrl+→,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0370 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0370") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0370')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DPAD_RIGHT); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0370.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0380 + *des:1、输入长文本,光标位于自然段段中 + 2、按Ctrl+home,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0380 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0380") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorShortKcutKeys0380')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey( KeyCode.KEYCODE_DPAD_LEFT); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_MOVE_HOME); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDIT0R_SHORTKCUTKEYS_0380.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformanceTests.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformanceTests.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c33d01b5f19061279baa229c523d05297559db91 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformanceTests.test.ets @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0006:UXCONFORMANCE相关用例 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorUxConformanceTests() { + + describe('ComponentTextRicheditorUxConformanceTests', () => { + + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0006 + *des:1、调用addTextSpan添加一段文本, 设定装饰 + 线颜色不设定字体颜色,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0006 start.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0006") + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0006.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0007 + *des:1、调用addTextSpan添加一段文本, 设定装饰 + 线颜色为 Red, 字体颜色为 Pink,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0007 start.`); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0007") + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0007.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0011 + *des:1、点击多张图片中间位置,将光标放至任意一张图片后 + 2、点击虚拟键盘上的删除按钮 + 3、再次点击虚拟键盘上的删除按钮,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0011 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0011") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0011')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0011.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0012 + *des:1、 richeditor添加多张图片 + 2、点击多张图片中间位置,将光标放至任意一 + 张图片后 + 3、点击物理键盘上的 backspace键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0012") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0012')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0012.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0013 + *des:1、 richeditor添加多张图片 + 2、点击多张图片中间位置,将光标放至任意一 + 张图片后 + 3、点击物理键盘上的 delete键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0013") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0013')); + await rich.click(); + await Utils.sleep(1000); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(2014); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0013.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0014 + *des:1、选中一段内容,图片在选中内容首位/末尾/ + 中间 + 2、点击虚拟键盘上的删除按钮,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0014 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0014") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0014')); + await rich.click(); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0014.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0015 + *des:1、选中一段内容,图片在选中内容首位/末尾/ + 中间 + 2、点击物理键盘上的 backspace键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0015 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0015") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0015')); + await rich.click(); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0015.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0016 + *des:1、选中一段内容, 图片在选中内容首位/末尾/ + 中间 + 2、点击物理键盘上的 delete键,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0016 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0016") + await Utils.sleep(1000); + let rich = await driver.findComponent(ON.id('ComponentTextRicheditorUxConformance0016')); + await rich.click(); + let select = await driver.findComponent(ON.id('select')); + await select.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_UXCONFORMANCE_0016.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreaks.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreaks.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..747d60888c73b40d62ebaa983fd15794b3343990 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreaks.test.ets @@ -0,0 +1,602 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 { afterEach, describe, it } 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, On } from '@ohos.UiTest' +import { KeyCode } from '@kit.InputKit' + +/* + * SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK:设置断行规则 + * + * Settings.createWindow(config.url): + * 创建窗口,更改窗口基本配置,更改方式详见model/Settings createWindow方法 + * + * windowSnap.snapShot(globalThis.context): + * 窗口截屏&图片文件保存,存储在设备端 + * 存储文件固定,单挑用例执行后覆盖,用于自动化UI对比 + * 支持调试更改文件名为时间戳格式,更改model/snapShot createAndGetFile方法 注释L35,放开L32,L33 + * + * Logger日志使用方法: + * import Logger form './model/Logger' + * Logger.info(TAG,`config = ${config}, err = ${JSON.stringify(exception)}`) + * */ + +export default function ComponentTextRicheditorWordbreaks() { + + describe('ComponentTextRicheditorWordbreaks', () => { + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0001 + *des:wordBreak不设置属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0001', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0001 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0001"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0001 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0002 + *des:wordBreak设置属性 WordBreak.NORMAL,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0002', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0002 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0002"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0002 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0003 + *des:wordBreak设置属性-1,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0003', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0003 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0003"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0003 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0004 + *des:wordBreak默认设置为 wordBreak:WordBreak.NORMAL,更新为不设置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0004', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0004 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0004"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0004")); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0004 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0005 + *des:wordBreak更新为WordBreak.BREAK_ALL,更新为不设置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0005', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0005 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0005"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0005")); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0005 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0006 + *des:wordBreak更新为-1,更新为不设置,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0006 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0006"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0006")); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0006 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0007 + *des:wordBreak设置属性wordBreak:WordBreak.NORMAL,数字、 Non-CJK文本(如英文等) 只能在空白符处断行 + CJK(中文、日文、韩文)文本文本可以在任意2个字符间断行 + 图片、 Symbol、表情、特殊符号可以在任意2个字符间断行,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0007', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0007 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0007"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0007 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0008 + *des:wordBreak设置属性wordBreak:WordBreak.BREAK_ALL,数字、 Non-CJK文本(如英文等) 只能在空白符处断行 + CJK(中文、日文、韩文)文本文本可以在任意2个字符间断行 + 图片、 Symbol、表情、特殊符号可以在任意2个字符间断行,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0008', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0008 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0008"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0008 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0009 + *des:wordBreak设置属性wordBreak:WordBreak.BREAK_ALL,数字、 Non-CJK文本(如英文等) 只能在空白符处断行 + CJK(中文、日文、韩文)文本文本可以在任意2个字符间断行 + 图片、 Symbol、表情、特殊符号可以在任意2个字符间断行,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0009', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0009 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0009"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0009 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0010 + *des:设置 clip属性为 false.设置wordBreak属性值为NOBMAL, 输入不包含空白符的超长英文文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0010 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0010"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0010 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0011 + *des:设置 RichEditor分别设置workBreak属性为NORMAL、BREAK_AIL、BREAK_WORD + 2、输入 Non-CJK文本(如英文等) 和CJK(中文、日文、韩文)文 + 本混合文本,并使换行处为 Non-CJK文本 + 3、换行处的 Non-CJK文本前为CJK文本 + 4、换行处的 Non-CJK文本前为空格 + 5、换行处的 Non-CJK文本前为换行符,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0011', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0011 start.`); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0011"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0011 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0012 + *des:1、添加RichEditor组件 + 2、输入文本内容,通过updateParagraphStyle设置 workbreak属性为NORMAL + 3、addTextSpan不设置 workbreak属性,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0012', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0012 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0012"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0012")); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0012 finish.` + justBtn); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0012 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0013 + *des:1、添加RichEditor组件 + 2、输入文本内容,通过apdateParagraphStyle设置 workbreak属性为NORMAL + 3、addTextSpan设置 workbreak属性为BREAK_AIL,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0013', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0013 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0013"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0013")); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0013 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0014 + *des:1、添加RichEditor组件 + 2、输入文本内容,通过updateParagraphStyle设置 workbreak属性为NORMAL + 3、updateParagraphStyle更新部分文本 workbreak属性为 + BREAK_ALL,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0014 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0014"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0014")); + await richeditor.click(); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0014 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0015 + *des:1、添加RichEditor组件 + 2、addTextSpan设置vordBreak属性为NORMAL + 3、 update?aragraphStyle更新部分文本 workbreak属性为BREAK _ALL_,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0015', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0015 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0015"); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0015")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0015 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0016 + *des:1、添加RichEditor组件 + 2、设置wordBreak属性值为NORMAL,文本内容同时有 Non-CJK文本(如英文等)和CJK(中文、日文、韩文)文本以及图片、Symbol、表情、数字、特殊符号 + 3、改变组件大小,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0016', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0016 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0016"); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0016")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0016 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0017 + *des:1、添加RichEditor组件 + 2、设置wordBreak属性值为NORMAL,文本内容同时有 Non-CJIS本(如英文等) 和CJK(中文、日文、韩文)文本以及图片、Symbol、表情、数字、特殊符号 + 3、改变字体大小,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0017', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0017 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0017"); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0017")); + await Utils.sleep(1000); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0017 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0018 + *des:1、添加RichEditor组件、 + 2、addTextSpan设置wordBreak属性为NORMAL + 3、通过软件盘删除部分文本,再输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0018', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0018 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0018"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0018")); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0018 start.` + richeditor); + await richeditor.click(); + await Utils.sleep(1000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0018 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019 + *des:1、添加RichEditor组件、 + 2、addTextSpan设置wordBreak属性为NORMAL + 3、通过软件盘删除全部文本,再输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0019"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0019")); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019 start.` + richeditor); + await richeditor.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_DEL); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + ; + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0020 + *des:1、添加RichEditor组件 + 2、addTextSpan设置wordBreak属性为NORMAL + 3、通过delSpan删除全部textSpan,再输入文本,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0020 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0020"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0020")); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0019 start.` + richeditor); + await richeditor.click(); + let justBtn = await driver.findComponent(ON.id("updateParagraphStyle")); + await justBtn.click(); + await Utils.sleep(2000); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_V); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(100); + await driver.triggerKey(KeyCode.KEYCODE_7); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0020 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0021 + *des:1、添加RichEditor组件 + 2、输入文本内容,设置wordBreak属性值为NORMAL + 3、长按文本内容,点击粘贴,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0021', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0021 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0021"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0021")); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0021 start.` + richeditor); + await richeditor.longClick(); + await Utils.sleep(2000); + let paste = await driver.findComponent(ON.text('粘贴')); + await paste?.click(); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0021 finish.`); + done(); + }) + /** + * NO.SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0022 + *des:1、添加RichEditor组件 + 2、输入文本内容,设置wordBreak属性值为NORMAL + 3、从其他组件拖拽文本到RichEditor,验证效果 + */ + it('SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0022', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0022 start.`); + let driver = Driver.create(); + await Utils.sleep(1000); + Settings.createWindow("testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0022"); + await Utils.sleep(1000); + let richeditor = await driver.findComponent(ON.id("ComponentTextRicheditorWordbreak0022")); + let textArea = await driver.findComponent(ON.id('TextArea')); + await textArea.click(); + await Utils.sleep(1000); + await textArea.click() + await Utils.sleep(1000); + let selectAll = await driver.findComponent(ON.text('全选')) + await selectAll?.click(); + await Utils.sleep(1000); + await textArea.dragTo(richeditor) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_RICHEDITOR_WORDBREAK_0022 finish.`); + done(); + }) + }) +} 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..3f4effdb9f5a809147de218c0b8958bdda3f98c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.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. + */ + + +import ComponentTextRicheditorFontfeatures + from './ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeatures.test'; +import ComponentTextRicheditorCustomColors + from './ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColors.test'; +import ComponentTextRicheditorWordbreaks + from './ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreaks.test'; +import ComponentTextRicheditorLongPresstoselectalls + from './ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectalls.test'; +import ComponentTextRicheditorPlaceholderTests + from './ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholderTests.test'; + +import ComponentTextRicheditorCustomkeyBoardAvoidAnceTests + from './ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnceTests.test'; +import ComponentTextRicheditorKeyboardReinForcingTests + from './ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcingTests.test'; +import ComponentTextRicheditorLineHeightLetterSpacingTests + from './ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacingTests.test'; +import ComponentTextRicheditorUxConformanceTests + from './ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformanceTests.test'; +import ComponentTextRicheditorAITests from './ComponentTextRicheditorAITest/ComponentTextRicheditorAITests.test'; +import ComponentTextRicheditorOnWillChangeTests + from './ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChangeTests.test'; +import ComponentTextRicheditorInterfaceTests + from './ComponentTextRicheditorInterface/ComponentTextRicheditorInterfaceTests.test'; +import ComponentTextRicheditorShortKcutKeysTests + from './ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeysTests.test'; + +export default function testsuite() { + ComponentTextRicheditorFontfeatures(); + ComponentTextRicheditorCustomColors(); + ComponentTextRicheditorWordbreaks(); + ComponentTextRicheditorLongPresstoselectalls(); + ComponentTextRicheditorPlaceholderTests(); + ComponentTextRicheditorCustomkeyBoardAvoidAnceTests(); + ComponentTextRicheditorKeyboardReinForcingTests(); + ComponentTextRicheditorLineHeightLetterSpacingTests(); + ComponentTextRicheditorUxConformanceTests(); + ComponentTextRicheditorAITests(); + ComponentTextRicheditorOnWillChangeTests(); + ComponentTextRicheditorInterfaceTests(); + ComponentTextRicheditorShortKcutKeysTests(); +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/LeadingMaginCreator.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/LeadingMaginCreator.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a727f463650a8215b253ceae9be7bbcef5bbfef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/LeadingMaginCreator.ets @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const canvasWidth = 1000; +const canvasHeight = 100; +const Indentation = 40; + +export default class LeadingMarginCreator { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private offscreenCanvas: OffscreenCanvas = new OffscreenCanvas(canvasWidth, canvasHeight); + private offContext: OffscreenCanvasRenderingContext2D = this.offscreenCanvas.getContext("2d", this.settings); + public static instance: LeadingMarginCreator = new LeadingMarginCreator(); + + // 获得字体字号级别,分别是从0到4级 + public getFontSizeLevel(fontSize: number) { + const fontScaled: number = Number(fontSize) / 16; + + enum FontSizeScaleThreshold { + SMALL = 0.9, + NORMAL = 1.1, + LEVEL_1_LARGE = 1.2, + LEVEL_2_LARGE = 1.4, + LEVEL_3_LARGE = 1.5 + } + + let fontSizeLevel: number = 1; + + if (fontScaled < FontSizeScaleThreshold.SMALL) { + fontSizeLevel = 0; + } else if (fontScaled < FontSizeScaleThreshold.NORMAL) { + fontSizeLevel = 1; + } else if (fontScaled < FontSizeScaleThreshold.LEVEL_1_LARGE) { + fontSizeLevel = 2; + } else if (fontScaled < FontSizeScaleThreshold.LEVEL_2_LARGE) { + fontSizeLevel = 3; + } else if (fontScaled < FontSizeScaleThreshold.LEVEL_3_LARGE) { + fontSizeLevel = 4; + } else { + fontSizeLevel = 1; + } + + return fontSizeLevel; + } + + // 获得字体字号级别,分别是从0到4级 + public getmarginLevel(Width: number) { + let marginlevel: number = 1; + if (Width == 40) { + marginlevel = 2.0; + } else if (Width == 80) { + marginlevel = 1.0; + } else if (Width == 120) { + marginlevel = 2 / 3; + } else if (Width == 160) { + marginlevel = 0.5; + } else if (Width == 200) { + marginlevel = 0.4; + } + return marginlevel; + } + + public genStrMark(fontSize: number, str: string): PixelMap { + this.offContext = this.offscreenCanvas.getContext("2d", this.settings); + this.clearCanvas(); + this.offContext.font = fontSize + 'vp sans-serif'; + this.offContext.fillText(str + '.', 0, fontSize * 0.9); + return this.offContext.getPixelMap(0, 0, fontSize * (str.length + 1) / 1.75, fontSize); + } + + public genSquareMark(fontSize: number): PixelMap { + this.offContext = this.offscreenCanvas.getContext("2d", this.settings); + this.clearCanvas(); + const coordinate = fontSize * (1 - 1 / 1.5) / 2; + const sideLength = fontSize / 1.5; + this.offContext.fillRect(coordinate, coordinate, sideLength, sideLength); + return this.offContext.getPixelMap(0, 0, fontSize, fontSize); + } + + // 生成圆圈符号 + public genCircleMark(fontSize: number, width: number, level?: number): PixelMap { + const indentLevel = level ?? 1; + const offsetLevel = [22, 28, 32, 34, 38]; + const fontSizeLevel = this.getFontSizeLevel(fontSize); + const marginlevel = this.getmarginLevel(width); + const newCanvas = new OffscreenCanvas(canvasWidth, canvasHeight); + const newOffContext: OffscreenCanvasRenderingContext2D = newCanvas.getContext("2d", this.settings); + const centerCoordinate = 50; + const radius = 10; + this.clearCanvas(); + newOffContext.ellipse(100 * (indentLevel + 1) - centerCoordinate * marginlevel, offsetLevel[fontSizeLevel], + radius * marginlevel, radius, 0, 0, 2 * Math.PI); + newOffContext.fillStyle = '66FF0000'; + newOffContext.fill(); + return newOffContext.getPixelMap(0, 0, 100 + 100 * indentLevel, 100); + } + + private clearCanvas() { + this.offContext.clearRect(0, 0, canvasWidth, canvasHeight); + } +} + + + + 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..54e8c1c7a76a15edfd3cd3b024ca61eba51fb7cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/model/Settings.ets @@ -0,0 +1,320 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 } 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 = true; + windowClass: window.Window | undefined = undefined + windowCreateType: string = "changeWindow"; + private static DEFAULT_WIDTH: number = 720; + private static DEFAULT_HEIGHT: number = 1280; + private static DEFAULT_DPI: number = 240; + private static DEFAULT_OFFSET_X: number = 0; + private static DEFAULT_OFFSET_Y: number = 60; + 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.`); + }) + } + } + + /* + * 窗口页面更新 + * 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..5b2992dcb24394039f4c71907479c34895c1a73a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -0,0 +1,82 @@ +/* + * 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) + + windowStage.loadContent('testability/pages/Index', (err) => { + 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.'); + }); + } + + 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/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..f42dd076efe1e661abd8bc21633297a1e7bb5059 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0010.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = [TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.URL,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0010') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1c728b21a6cd586b65e19a022789f7f2aafc82c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0020.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = true; + @State types: TextDataDetectorType[] = [TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.URL,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = false; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0020') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..3871b6eff45163abd863223a563885a197429050 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0030.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 ComponentTextRicheditorAI0030 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = [TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.URL,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + + build() { + Row() { + Column() { + Button('open') + .id('open') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('close') + .id('close') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = false; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0030') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..365f7448ba1b961f81b898d1fa1610d93a150672 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0040.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI0040 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL]; + }) + Button('tel') + .id('tel') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.PHONE_NUMBER]; + }) + Button('addr') + .id('addr') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.ADDRESS]; + }) + Button('email') + .id('email') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.EMAIL]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0040') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c0ace4e481b09c1b1344e8d8c1160669ddc2596 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0050.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 ComponentTextRicheditorAI0050 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER]; + }) + Button('email') + .id('email') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.EMAIL,TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0050') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..6aaac03675ab6b697e00dd5254e06c6bf4573a63 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0060.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 ComponentTextRicheditorAI0060 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0060') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..a4d00a316b330c0a3f9d40f25c0a04e2366cb6eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0070.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 ComponentTextRicheditorAI0070 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = false; + }) + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0070') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..a46e26d043fb5d550013e271165d684cbe40284d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0080.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 ComponentTextRicheditorAI0080 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0080') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fefa20769c957070d324cfc98ca2f315e4f4fa5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0090.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 ComponentTextRicheditorAI0090 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State url: string = 'www.baidu.com'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('url') + .id('url') + .width(100) + .height(50) + .onClick(() => { + this.types =[TextDataDetectorType.URL,TextDataDetectorType.PHONE_NUMBER,TextDataDetectorType.EMAIL,TextDataDetectorType.ADDRESS]; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + + }) + .id('ComponentTextRicheditorAI0090') + .enableDataDetector(this.enableDataDetector) + .dataDetectorConfig({types : this.types, onDetectResultUpdate: (result: string)=>{}}) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..e154a0d205ec0ab855e95c69fa1d5b39d9c3acb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0100.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 ComponentTextRicheditorAI00100 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + decoration: { type: TextDecorationType.Overline } + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0100') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..a16d0d6810bf52f0fd9702865eb24bb457c61d44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0110.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 ComponentTextRicheditorAI00110 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + decoration: { type: TextDecorationType.LineThrough } + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0110') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c5a35c728da257de59569377dae06970de2b749 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0120.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 ComponentTextRicheditorAI00120 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + decoration: { type: TextDecorationType.Underline } + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0120') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..519159993f52c8d81f6e4801b8c97e3099b2f6e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0130.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 ComponentTextRicheditorAI00130 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontColor: Color.Red, + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30, + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30, + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30, + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30, + } + }); + }) + .id('ComponentTextRicheditorAI0130') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..26e1a0e42c47cbf8722f126d2b5995517c8335fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0140.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 ComponentTextRicheditorAI00140 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontSize:30 + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + }); + this.controller.addTextSpan('地址:' + this.address, + { + }); + }) + .id('ComponentTextRicheditorAI0140') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..da9bf3e6f1811d6d9cf63f43881e61cc9ff4f538 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0150.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 ComponentTextRicheditorAI00150 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontStyle:FontStyle.Italic + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + }); + this.controller.addTextSpan('地址:' + this.address, + { + }); + }) + .id('ComponentTextRicheditorAI0150') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..de1cefb0c826ee9553befedf8bc37d69debab9c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0160.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00160 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('setStyle') + .id('setStyle') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontWeight:FontWeight.Lighter + } + }); + }) + Button('setStyle1') + .id('setStyle1') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontWeight:FontWeight.Normal + } + }); + }) + Button('setStyle2') + .id('setStyle2') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: + { + fontWeight:FontWeight.Bolder + } + }); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0160') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..9587365668f118fb97a843b549d3dca8e9af015e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0170.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 ComponentTextRicheditorAI00170 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('close') + .id('close') + .width(100) + .height(50) + .onClick(() => { + this.controller.stopEditing(); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0170') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5d1d7263bf16ca3622243615d5a166ca94f673b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0180.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 ComponentTextRicheditorAI00180 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('close') + .id('close') + .width(100) + .height(50) + .onClick(() => { + this.controller.stopEditing(); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0180') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..1449b384e713d1b9e734ef3d318324cbc0f39f4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0190.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. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00190 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('insert') + .id('insert') + .width(100) + .height(50) + .onClick(() => { + this.controller.addTextSpan('insert URL:' + this.url + '\n', + { + }); + this.controller.addTextSpan('insert 电话号码:' + this.phoneNumber + '\n', + { + }); + this.controller.addTextSpan('insert 邮箱:' + this.email + '\n', + { + }); + this.controller.addTextSpan('insert 地址:' + this.address, + { + }); + this.controller.stopEditing(); + }) + + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0190') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a396bf1ed72c0fc95e5dcfe0cbb22cf8cc8baeb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0200.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 ComponentTextRicheditorAI00200 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('insert') + .id('insert') + .width(100) + .height(50) + .onClick(() => { + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }) + this.controller.stopEditing(); + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0200') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b34e2bd3594e46e0305eb6d3793b2811471e754 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0210.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 ComponentTextRicheditorAI00210 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + @State widthRich : number = 300; + @State heightRich : number = 800; + + build() { + Row() { + Column() { + Button('setWidth') + .id('setWidth') + .width(100) + .height(50) + .onClick(() => { + this.widthRich = 100; + this.heightRich = 500; + }) + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0210') + .enableDataDetector(this.enableDataDetector) + .width(this.widthRich) + .height(this.heightRich) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4d07b9f1fd1af03d5badfef8254e17936d587e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0220.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00220 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0220') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..70c0b80803fe015976c661bced846be141279d1a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0230.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00230 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0230') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..4edb12a44c668be5189542c667565882802cffc5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0240.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00240 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0240') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..b3881764c1c30b5e5fed86761f9df962650cf081 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0250.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00250 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0250') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..37a445ff7bdc126c4b27ff9888744a2f165455cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0260.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00260 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0260') + .enableDataDetector(this.enableDataDetector) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c0ce696824b95cac966810ed399125446f4dc8f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0270.ets @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorAI00270 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State phoneNumber: string = '029-49781104'; + @State url: string = 'www.baidu.com'; + @State email: string = '***@example.com'; + @State address: string = 'XX省XX市XX区XXXX'; + @State enableDataDetector: boolean = false; + @State types: TextDataDetectorType[] = []; + @State copyState: CopyOptions = CopyOptions.InApp; + + build() { + Row() { + Column() { + Button('AI') + .id('AI') + .width(100) + .height(50) + .onClick(() => { + this.enableDataDetector = true; + }) + Button('copy') + .id('copy') + .width(100) + .height(50) + .onClick(() => { + this.copyState = CopyOptions.None; + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('URL:' + this.url + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('电话号码:' + this.phoneNumber + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('邮箱:' + this.email + '\n', + { + style: + { + fontSize: 30 + } + }); + this.controller.addTextSpan('地址:' + this.address, + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorAI0270') + .enableDataDetector(this.enableDataDetector) + .copyOptions(this.copyState) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..154fed3b05bc00aac8d0ca5955f7ec526f0a1b58 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0001.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 ComponentTextRicheditorCustomColor0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0001') + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..b58f4324b63286719bb56fd59406720fc5aacbc4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0002.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 ComponentTextRicheditorCustomColor0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0002') + .caretColor(Color.Orange) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b65f6c28743d4cd6184299f4f6813b5ec3792e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0003.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 ComponentTextRicheditorCustomColor0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0003') + .caretColor(0x0110ff) //光标颜色 + .selectedBackgroundColor(0x0110ff) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..f4ffa9c109230939e0e6e36d510c61c689780407 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0004.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 ComponentTextRicheditorCustomColor0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0004') + .caretColor(0xffffffeeeeee) //光标颜色 + .selectedBackgroundColor(0xffffffeeeeee) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf263c8ae17944dca7fbab5cc5bb9ba277afa24d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0005.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 ComponentTextRicheditorCustomColor0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0005') + .caretColor(10000) //光标颜色 + .selectedBackgroundColor(10000) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..f119d322d39ffdac7b4e46029cff4e418c336e61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0006.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 ComponentTextRicheditorCustomColor0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0006') + .caretColor(10000.5) //光标颜色 + .selectedBackgroundColor(10000.5) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..8788608294f5c39e17b98b84baf5cf4f98ec2ccb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0007.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 ComponentTextRicheditorCustomColor0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0007') + .caretColor(-15) //光标颜色 + .selectedBackgroundColor(-15) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..5da579b22d0247b876c8400a919112f6cc32bc92 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0008.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 ComponentTextRicheditorCustomColor0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0008') + .caretColor("#00ffff") //光标颜色 + .selectedBackgroundColor('#00ffff') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e5d74660011e486d6a86a0a5c65857d27a5efdf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0009.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 ComponentTextRicheditorCustomColor0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0009') + .caretColor('#ffffff00') //光标颜色 + .selectedBackgroundColor('#ffffff00') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..5894ff30fc009ca54620370f979af6b935952889 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0010.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 ComponentTextRicheditorCustomColor0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0010') + .caretColor(' rgb(255,0,255)') //光标颜色 + .selectedBackgroundColor(' rgb(255,0,255)') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f1402bda752896a59962f7871bd7f857ccb12ff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0011.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 ComponentTextRicheditorCustomColor0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0011') + .caretColor(" rgba(0,0,255,0.5)") //光标颜色 + .selectedBackgroundColor(" rgba(0,0,255,0.5)") //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee4d5ae064a3877e8939fd87542a13281bf76f7b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0012.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 ComponentTextRicheditorCustomColor0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0012') + .caretColor('#0ccccoo') //光标颜色 + .selectedBackgroundColor('#0ccccoo') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..b80a685713bfb00cf66e3b26a9a76a9822674755 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0013.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 ComponentTextRicheditorCustomColor0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0013') + .caretColor(' rgba(255,0,255,2)') //光标颜色 + .selectedBackgroundColor(' rgba(255,0,255,2)') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ffda5924cc29dd654873cd1cc129a4a87a212c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0014.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 ComponentTextRicheditorCustomColor0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0014') + .caretColor(' rgb(255,0,300)') //光标颜色 + .selectedBackgroundColor(' rgb(255,0,300)') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b036394399ddc0a7ff0af0266a7b0e6b270a383 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0015.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 ComponentTextRicheditorCustomColor0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0015') + .caretColor('#abcdefə') //光标颜色 + .selectedBackgroundColor('#abcdefə') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a39a4fa6d62c795be753d7acb44434ce3e6b804 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0016.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 ComponentTextRicheditorCustomColor0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0016') + .caretColor(getContext().resourceManager.getColorSync($r("app.color.yellow"))) //光标颜色 + .selectedBackgroundColor(getContext().resourceManager.getColorSync($r("app.color.yellow"))) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..66ba2ee434fcd274fda1973a284e0f11c24c9ebc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0017.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 ComponentTextRicheditorCustomColor0017 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorCustomColor0017') + .caretColor('cat.jpg') //光标颜色 + .selectedBackgroundColor( 'cat.jpg') //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0018.ets new file mode 100644 index 0000000000000000000000000000000000000000..d37f315648a0cbf4977ddfe3745222fe20234aef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0018.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorCustomColor0018 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あなたのことが好きです사랑해jhsfdhhhhhjhjhh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + + }); + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + + }); + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + + }); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }) + }) + .id('ComponentTextRicheditorCustomColor0018') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..d86af071a84b8b97809ae96c142b02f411b76f45 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0019.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 ComponentTextRicheditorCustomColor0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あなたのことが好きです사랑해jhsfdhhhhhjhjhh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + + }) + }) + .id('ComponentTextRicheditorCustomColor0019') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..e3edb95f75bb8a7aca39694c1ed91ca40c992724 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0020.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 ComponentTextRicheditorCustomColor0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + + }) + }) + .id('ComponentTextRicheditorCustomColor0020') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-1); + this.controller.updateSpanStyle({ start:-1,end:-1, + textStyle: { + fontSize:30 + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6aa93f1eed007892513cfd9d997c7f44e0bda09 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0021.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 ComponentTextRicheditorCustomColor0021 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .id('ComponentTextRicheditorCustomColor0021') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-1); + this.controller.updateSpanStyle({ start:-1,end:-1, + textStyle: { + lineHeight:FontStyle.Italic + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..6409ddce7822d4b8298d8f25e8b1e8f3cfd1660e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0022.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 ComponentTextRicheditorCustomColor0022 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .id('ComponentTextRicheditorCustomColor0022') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-1); + this.controller.updateSpanStyle({ start:-1,end:-1, + textStyle: { + lineHeight:50, + letterSpacing:15 + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0023.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0023.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a0f8803e35e28d1300aaca258f799306b6c1a3b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0023.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorCustomColor0023 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .id('ComponentTextRicheditorCustomColor0023') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-1); + this.controller.updateSpanStyle({ start:-1,end:-1, + textStyle: { + + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0025.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0025.ets new file mode 100644 index 0000000000000000000000000000000000000000..455ef11ce8792e42cf687b34ea420fc578089ad5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0025.ets @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorCustomColor0025 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + 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) { + } + ; + } + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .id('ComponentTextRicheditorCustomColor0025') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-1); + this.setOrientation(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0026.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0026.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f691481d7bab89def1aa6dba96e3a884a445894 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0026.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 ComponentTextRicheditorCustomColor0026 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .id('ComponentTextRicheditorCustomColor0026') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0028.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0028.ets new file mode 100644 index 0000000000000000000000000000000000000000..b430022c59d5402842014bc5e6dd35be163c2f18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0028.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 ComponentTextRicheditorCustomColor0028 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .id('ComponentTextRicheditorCustomColor0028') + .caretColor(Color.Red) //光标颜色 + .selectedBackgroundColor(Color.Red) //选中背景色 + + Button('', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('set select') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection( -1,-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/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..11704217c70eae11f9f9d63a15781dc6dfc911d7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0001.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .height(40) + .width(100) + .customKeyboard(this.CustomKeyboardBuilder()) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0001') + } + .width('100%') + .height('100%') + .margin({ top: 700 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a96ebbe8571636441f5ebe7a4eb063ad91c429a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0002.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0002{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .height(40) + .width(100) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: false }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0002') + } + .width('100%') + .height('100%') + .margin({ top: 700 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..a157310fca7db2066bc9c7ef147d55cbfeb973bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0003.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0003') + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..6ff195999ebeaa91beb618ec46306d26d2ba97c1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0004.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0004') + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..a11cfb511b93d72cb471cf9dcc67fe4cbae481bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0005.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0005') + } + .width(100) + .height(100) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..8849414dc670f58ac4c068fcfbd329925742c207 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0006.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0006') + } + .width('50%') + .height('50%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a6418e4c63c8159aa9e36f404c7197c518a0820 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0007.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0007') + } + .width(100) + .height(1000) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc4b46176ceb36e4e92c682bbdf1ff60c4e6e557 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0008.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0008') + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..dceb7f3bbab2e1e4ccb8e392ba292454495f6b3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0009.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. + */ + + +@Entry +@Component +struct ComponentTextRicheditorCustomkeyBoardAvoidAnce0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder()) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0009') + } + .width(100) + .height(100) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..bed6f67cf03dee0259b897621a2f39a681806164 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0010.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Row(); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0010'); + Row(); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..2967ec3fed8c7d3499ddfcce3cfd36a47ac5b208 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0011.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Row(); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0011'); + Row(); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ffb7f94382c8becd78aa0e9127ca646537d6ce4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0012.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorCustomkeyBoardAvoidAnce0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Row(); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0012'); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0012_01'); + Row(); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..0225c8faac48ad9c723e010de69463bb9f225fa9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0013.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorCustomkeyBoardAvoidAnce0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Row(); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0013'); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0013_01'); + Row(); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c99ee1854cf0490f00fa4c94b6f4a10762f6b02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0016.ets @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorCustomkeyBoardAvoidAnce0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + 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) { + } + ; + } + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Button('changeScreen') + .id('changeScreen') + .width(100) + .height(50) + .onClick(()=>{ + this.setOrientation(); + }); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(0); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0016'); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..b88564c46b7cd71380af9e45d191b929100d0c4b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0017.ets @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT 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 '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorCustomkeyBoardAvoidAnce0017 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + 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) { + } + ; + } + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Button('changeScreen') + .id('changeScreen') + .width(100) + .height(50) + .onClick(()=>{ + this.setOrientation(); + }); + RichEditor(this.options) + .onReady(() => { + this.getUIContext().setKeyboardAvoidMode(1); + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0017'); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e32b6d376b1d40502f841e480e72e6fb23dec34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0019.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 ComponentTextRicheditorCustomkeyBoardAvoidAnce0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State heightCustom : number = 200; + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.controller.addTextSpan(item + '', { + offset: this.controller.getCaretOffset(), + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }); + this.controller.setCaretOffset(this.controller.getCaretOffset() + item.toString().length); + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5).height(this.heightCustom) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Button('changeScreen') + .id('changeScreen') + .width(100) + .height(50) + .onClick(()=>{ + this.heightCustom = 400; + }); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }); + }) + .customKeyboard(this.CustomKeyboardBuilder(),{ supportAvoidance: true }) + .border({ width: 1 }) + .id('ComponentTextRicheditorCustomkeyBoardAvoidAnce0019'); + } + .width('50%') + .height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..13e3915becb27fa509cfd240fbb057d81e9d12a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0001.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 ComponentTextRicheditorFontfeature0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .key('ComponentTextRicheditorFontfeature0001') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b98f6087fd1d0cdd15560b257a3d467423ca992 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0002.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 ComponentTextRicheditorFontfeature0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + '123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0002') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..299909bbb6df5304fdaf663349d9daed2c27cecc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0003.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 ComponentTextRicheditorFontfeature0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + '0000' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 0" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0003') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..20f6feb8fb7b116e265aa99f9a6005c4b63c26ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0004.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 ComponentTextRicheditorFontfeature0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + '0000' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 1" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0004') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d6df9a618e0998b061652237347330c21223148 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0005.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 ComponentTextRicheditorFontfeature0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + '123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" off" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0005') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..db4ee88af9e54e2e8eae4848c4e6053b74c56cbd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0006.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 ComponentTextRicheditorFontfeature0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is subs on :' + '123456' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"subs\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0006') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..6ba1c233fd70a1ce0adfcf113669814e93a3564b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0007.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 ComponentTextRicheditorFontfeature0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sinf on :' + '123' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sinf\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0007') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf8832241d0b8f7e9167898608a282b333eff618 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0008.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 ComponentTextRicheditorFontfeature0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is numr on :' + '456' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"numr\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0008') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..52f8018fb483197d60701c9a6abf374d17c84edb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0009.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 ComponentTextRicheditorFontfeature0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is dnom on :' + '789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"dnom\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0009') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..865acdede2bbf74bd5072863fffd7584005adb35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0010.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 ComponentTextRicheditorFontfeature0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is locl on :' + '147' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"locl\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0010') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ae3237490a56836ea59740757de17e8b85a23eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0011.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 ComponentTextRicheditorFontfeature0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is tnum on :' + '0123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"tnum\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0011') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d7d21f3a5d8a90e77d3f71b27ad175af2a9a08d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0012.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 ComponentTextRicheditorFontfeature0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is pnum on :' + '0123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"pnum\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0012') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6916b7ffa00f5579f55a3ee11ced82ff30be648 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0013.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 ComponentTextRicheditorFontfeature0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is case on :' + '¿¡HO-HO—HO!?' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"case\" on" + } + }) + + }) + .key('ComponentTextRicheditorFontfeature0013') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e92cb940ea046a0bfaf2e90a3dbb3b5f05c708f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0014.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 ComponentTextRicheditorFontfeature0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is frac on :' + '1/2 2/3 1/45' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"frac\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0014') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..fb382c2dd1d5bef9e7c8469ad4d0f8d883f693e2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0015.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 ComponentTextRicheditorFontfeature0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ordn on :' + 'No.1 1a 1o' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ordn\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0015') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..a40eefd9d23fef6e39bb86a7cd7c876729af57b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0016.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 ComponentTextRicheditorFontfeature0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is liga on :' + 'ff fl fi ffi ffl' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"liga\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0016') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..db7aa9e11f26f6786c392a8ad168621586a2f07f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0017.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 ComponentTextRicheditorFontfeature0017 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is liga on :' + '123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"fwid\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0017') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0018.ets new file mode 100644 index 0000000000000000000000000000000000000000..601e5f0ce85a0a8b83c8a77d066b3991ddc639fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0018.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 ComponentTextRicheditorFontfeature0018 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is liga on :' + '123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"hwid\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0018') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..c02caa1a49205ce073101ea4b804e636dc071c05 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0019.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 ComponentTextRicheditorFontfeature0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is liga on :' + '【】' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"vert\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0019') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8b247dc03716ecce5438d0455de06fc772837d7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0020.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 ComponentTextRicheditorFontfeature0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is liga on :' + '0123456789,:/八-""C°F%%。' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss01\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0020') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ce8de4b17b56bdc1ef13d3beb179e515a2c9ae3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0021.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 ComponentTextRicheditorFontfeature0021 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss02 on :' + '0123456789,:/八-""C°F%%。' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss02\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0021') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d4a8abc2835f3a56920d21a4996f29db63f967e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0022.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 ComponentTextRicheditorFontfeature0022 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss03 on :' + '0123456789+-><' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss03\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0022') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0023.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0023.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ebea0618c2ff16f465e5e2ed2be5c6b6165e3c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0023.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 ComponentTextRicheditorFontfeature0023 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss04 on :' + '0123456789l' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0023') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0024.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0024.ets new file mode 100644 index 0000000000000000000000000000000000000000..f155c7dbf03f0281534584d540cd65e25eda6f70 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0024.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 ComponentTextRicheditorFontfeature0024 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss05 on :' + '€¥+-x÷1234' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss05\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0024') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0025.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0025.ets new file mode 100644 index 0000000000000000000000000000000000000000..857d10b75b0e712b3ebc7d61fe23d8cd70ff01df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0025.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 ComponentTextRicheditorFontfeature0025 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss06 on :' + '0123456789,。?!、123' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss06\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0025') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0026.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0026.ets new file mode 100644 index 0000000000000000000000000000000000000000..fb6f468f955b7be2359999a4762e10903728ef64 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0026.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 ComponentTextRicheditorFontfeature0026 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss07 on :' + 'HarmonyOS 001' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss07\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0026') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0027.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0027.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5c3a97e530bb783ed758496a85fe1b0b82a815c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0027.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 ComponentTextRicheditorFontfeature0027 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss08 on :' + ',。!、;?:123' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss08\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0027') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0028.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0028.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d70d96dcad31520ae7232ce9da29d17ba1276f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0028.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 ComponentTextRicheditorFontfeature0028 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is ss09 on :' + '4567890中国' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss09\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0028') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0029.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0029.ets new file mode 100644 index 0000000000000000000000000000000000000000..996295e8a125878d59020b55d964b9e467936535 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0029.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 ComponentTextRicheditorFontfeature0029 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is (ss09,ss04) on :' + 'l0123456789l'+'\n', + { + style: + { + fontSize: 30, + fontFeature: '\"ss09\",\"ss04\" on' + } + }) + }) + .key('ComponentTextRicheditorFontfeature0029') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..d62e5aaeb71ab73af5ac87c359f1c1d9badda300 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0030.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 ComponentTextRicheditorFontfeature0030 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is null on :' + '0123456789,。?!、123' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"null\"" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0030') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0031.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0031.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6e6bbd477db265d5a99ec48307bb85c5fcc2621 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0031.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 ComponentTextRicheditorFontfeature0031 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is bad features :' + '0123l' + '\n', + { + style: + { + fontSize: 30, + fontFeature: '\"abcdefgg&*\" on,\"ss04\" 12354hfnfn3' + } + }) + }) + .key('ComponentTextRicheditorFontfeature0031') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0032.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0032.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcf11b3da8cec05eb2bfe55d5c12766a51204101 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0032.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 ComponentTextRicheditorFontfeature0032 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is on an off features :' + '0123l' + '\n', + { + style: + { + fontSize: 30, + fontFeature: '\"ss04\" on,\"ss04\" off' + } + }) + }) + .key('ComponentTextRicheditorFontfeature0032') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0033.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0033.ets new file mode 100644 index 0000000000000000000000000000000000000000..08557e03a89098cde2b4de22462a6ea946f084b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0033.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 ComponentTextRicheditorFontfeature0033 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + 'shell脚本' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0033') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0034.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0034.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c41768414c6b1c2ee38befd6928ef4d68f3d745 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0034.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 ComponentTextRicheditorFontfeature0034 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + 'shell脚本' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }) + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + style: + { + fontSize: 30, + } + }) + }) + .key('ComponentTextRicheditorFontfeature0034') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0035.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0035.ets new file mode 100644 index 0000000000000000000000000000000000000000..a48cfc6b6dc4053a832e28cae6e6f68cf8adda7e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0035.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 ComponentTextRicheditorFontfeature0035 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + 'shell脚本' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }) + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }) + }) + .key('ComponentTextRicheditorFontfeature0035') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0036.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0036.ets new file mode 100644 index 0000000000000000000000000000000000000000..737f5b00348981ec79b98af4d9d2eba9b13afe7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0036.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 ComponentTextRicheditorFontfeature0036 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('\uD83D\uDE00', + { + style: + { + fontSize: 30, + } + }) + this.controller.updateSpanStyle({ + textStyle: { + fontFeature: "\"ss04\" on" + } + }) + }) + .key('ComponentTextRicheditorFontfeature0036') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0037.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0037.ets new file mode 100644 index 0000000000000000000000000000000000000000..987fb85df5e77d92f56fdc40172bd1c97c5c354e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0037.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 ComponentTextRicheditorFontfeature0037 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell123', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature003701') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + RichEditor(this.options1) + .onReady(() => { + this.controller1.addTextSpan('1', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature003702') + .width('100%') + .height(100) + .backgroundColor(0xD2B48C) + + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0038.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0038.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1eb9f4a3dfd108f957e7e2f477180ab5d05e96d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0038.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 ComponentTextRicheditorFontfeature0038 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell123', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature003801') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + RichEditor(this.options1) + .onReady(() => { + this.controller1.addTextSpan('1', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature003802') + .width('100%') + .height(100) + .backgroundColor(0xD2B48C) + + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0039.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0039.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d99b5797e6c89c557317281569917ed98a45037 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0039.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 ComponentTextRicheditorFontfeature0039 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + TextArea({text:"中国人ll1"}).draggable(true).width(100).height(50).id('TextArea').fontFeature("\"sups\" on"); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あadfll', + { + style: + { + fontFeature: "\"ss04\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature0039') + .draggable(true) + .width(200) + .height(50) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..542d624777577bf3915cfa5af3e0c5c02f53c607 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0040.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 ComponentTextRicheditorFontfeature0040 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + TextArea({text:"中国人ll1"}).draggable(true).width(100).height(50).id('TextArea').fontFeature("\"ss04\" on"); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あadfll', + { + style: + { + fontFeature: "\"ss04\" on" + } + }) + }) + .id('ComponentTextRicheditorFontfeature0040') + .draggable(true) + .width(200) + .height(50) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0041.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0041.ets new file mode 100644 index 0000000000000000000000000000000000000000..f87111f4db8a76e2fc2def771325eaa32bd62aa2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0041.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 ComponentTextRicheditorFontfeature0041 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('This is sups on :' + '123456789' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" on" + } + }); + this.controller.addTextSpan('This is ss04 on :' + 'Shell' + '\n', + { + style: + { + fontSize: 30, + fontFeature: "\"ss04\" on" + } + }); + }) + .key('ComponentTextRicheditorFontfeature41') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0042.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0042.ets new file mode 100644 index 0000000000000000000000000000000000000000..77f61bf16e5f33add89401343a20e89c53fe195b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0042.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 ComponentTextRicheditorFontfeature0042 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell123', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 1" + } + }) + }) + .onIMEInputComplete((value: RichEditorTextSpanResult)=>{ + console.info("textSpan fontFeature:" + value.textStyle.fontFeature) + }) + .id('ComponentTextRicheditorFontfeature0042') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0043.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0043.ets new file mode 100644 index 0000000000000000000000000000000000000000..e391580dd04e4a5e7b2c33a660092cca38ad6afd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0043.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 ComponentTextRicheditorFontfeature0043 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell123', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 1" + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .aboutToDelete((value: RichEditorDeleteValue) => { + value.richEditorDeleteSpans.forEach(item => { + if (typeof(item as RichEditorImageSpanResult)['imageStyle'] != 'undefined') { + console.log("fontFeature del:" + (item as RichEditorImageSpanResult).valueResourceStr); + } else { + console.log("fontFeature del:" + (item as RichEditorTextSpanResult).textStyle.fontFeature); + } + }) + return true; + }) + .id('ComponentTextRicheditorFontfeature0043') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0044.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0044.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ceb489ad264d24251aeb2294e1b312025e035e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0044.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 ComponentTextRicheditorFontfeature0044 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell123', + { + style: + { + fontSize: 30, + } + }); + this.controller.setTypingStyle( + { + fontWeight: 'medium', + fontColor: Color.Blue, + fontSize: 50, + fontStyle: FontStyle.Italic, + fontFeature: "\"ss04\" 1" + }); + console.info("getTypingStyle===="+ this.controller.getTypingStyle().fontFeature); + }) + .id('ComponentTextRicheditorFontfeature0044') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0045.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0045.ets new file mode 100644 index 0000000000000000000000000000000000000000..abe21c232c8cb7648e6501a6b4e2ac1cf1bfb699 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0045.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 ComponentTextRicheditorFontfeature0045 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 1" + } + }) + }) + .id('ComponentTextRicheditorFontfeature0045') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + Button('setSelection(0,4)', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id("select") + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection(0, 4); + this.controller.updateSpanStyle({ + start: 0, + end: 4, + textStyle: { + fontFeature: "\"ss04\" 1" + } + }); + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0046.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0046.ets new file mode 100644 index 0000000000000000000000000000000000000000..32500c5cf7524a0dfdd2a1967a33af70dddc6f3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0046.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 ComponentTextRicheditorFontfeature0046 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontSize: 30, + fontFeature: "\"sups\" 1" + } + }) + }) + .id('ComponentTextRicheditorFontfeature0046') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + Button('getspans', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id("getspans") + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.getSpans({ + start: -1, + end: -1 + }).forEach(item =>{ + console.info("getspans msg ==="+(item as RichEditorTextSpanResult).textStyle.fontFeature); + }); + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0047.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0047.ets new file mode 100644 index 0000000000000000000000000000000000000000..446c51f36b987bec533e46d725075a4f4b4c8ac9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0047.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 ComponentTextRicheditorFontfeature0047 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontSize: 30, + fontFeature: '\"sups\",\"ss04\" 1' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0047') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + Button('getselection', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id("getselection") + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.setSelection(-1,-1); + let selection = this.controller.getSelection(); + let spans = selection.spans; + spans.forEach((item: RichEditorTextSpanResult | RichEditorImageSpanResult, index) => { + console.info("fontfeature====" + (item as RichEditorTextSpanResult).textStyle.fontFeature); + }); + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0048.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0048.ets new file mode 100644 index 0000000000000000000000000000000000000000..a74182dd31dd4a44a4c84ececbc0303fda6c2548 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0048.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 ComponentTextRicheditorFontfeature0048 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('1010', + { + style: + { + fontSize: 30, + fontFeature: '\"sups\", 1' + } + }); + this.controller.addTextSpan('shell100', + { + style: + { + fontSize: 30, + fontFeature: '\"ss04\", 1' + } + }); + }) + .id('ComponentTextRicheditorFontfeature0048') + .height(100) + .backgroundColor(0xF5DEB3) + .width('100%') + .onSelect((value: RichEditorSelection) => { + this.controller.addTextSpan('选中内容属性'+value, + { + + }); + console.info("onSelect========"+JSON.stringify(value)); + }) + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + this.controller.setSelection(1, 2); + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0049.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0049.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef3250402eb8b29b688e780c17ecc3d0fda93a81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0049.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 ComponentTextRicheditorFontfeature0049 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontColor: Color.Orange, + fontFeature: '\"sups\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0049') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..62bc06d18a91c48f88b880074bb9ea464e21f408 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0050.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 ComponentTextRicheditorFontfeature0050 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontStyle: FontStyle.Italic, + fontFeature: '\"subs\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0050') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0051.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0051.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd3db960b4546d0fd6516d21a8bd7e56abc1a263 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0051.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 ComponentTextRicheditorFontfeature0051 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontWeight: FontWeight.Bolder, + fontFeature: '\"numr\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0051') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0052.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0052.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac05a4102b990f5ba7e4f318e8b3d02921541fc0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0052.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 ComponentTextRicheditorFontfeature0052 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + fontFamily: 'HarmonyOS sans', + fontFeature: '\"ss04\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0052') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0053.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0053.ets new file mode 100644 index 0000000000000000000000000000000000000000..867441242042f749f8763d57e0102e66f8e0682c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0053.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 ComponentTextRicheditorFontfeature0053 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + decoration: { type: TextDecorationType.Underline, color: Color.Black }, + fontFeature: '\"fwid\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0053') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0054.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0054.ets new file mode 100644 index 0000000000000000000000000000000000000000..e709bee5d73275a62799b0c9dd329f419c08cb87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0054.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 ComponentTextRicheditorFontfeature0054 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + textShadow: { radius: 10, color: Color.Blue, offsetX: 10, offsetY: 0 }, + fontFeature: '\"ss08\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0054') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0055.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0055.ets new file mode 100644 index 0000000000000000000000000000000000000000..d2aaf7a341e142034b4c3bfffa4914d535714e5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0055.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 ComponentTextRicheditorFontfeature0055 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('shell10', + { + style: + { + lineHeight: 50, + fontFeature: '\"hwid\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0055') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0056.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0056.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f52f090c0a51ee4378375d6c0f9a525021b06ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0056.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 ComponentTextRicheditorFontfeature0056 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('【】 123', + { + style: + { + letterSpacing: 20, + fontFeature: '\"vert\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0056') + .height(100) + .width('100%') + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0057.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0057.ets new file mode 100644 index 0000000000000000000000000000000000000000..87ac8fa0163f88d54fdd4ea1a1fe2bc8dd8c5028 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0057.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 ComponentTextRicheditorFontfeature0057 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State heightRichEditor: number = 100; + @State widthRichEditor: number = 200; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('【】 123', + { + style: + { + letterSpacing: 20, + fontFeature: '\"vert\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0057') + .height(this.heightRichEditor) + .width(this.widthRichEditor) + .backgroundColor(Color.Pink) + Button('justFeature', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('justFeature') + .height(30) + .fontSize(13) + .onClick(() => { + this.heightRichEditor = 200; + this.widthRichEditor = 300; + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0058.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0058.ets new file mode 100644 index 0000000000000000000000000000000000000000..22dc5f49c5d0a88ff105e2495f281c440bcb90ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0058.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 ComponentTextRicheditorFontfeature0058 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State paddingRichEditor: number = 1; + @State marginRichEditor: number = 2; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('【】 123', + { + style: + { + letterSpacing: 20, + fontFeature: '\"vert\" on' + } + }) + }) + .id('ComponentTextRicheditorFontfeature0058') + .height(100) + .width('100%') + .padding(this.paddingRichEditor) + .margin(this.marginRichEditor) + .backgroundColor(Color.Pink) + Button('justFeature', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('justFeature') + .height(30) + .fontSize(13) + .onClick(() => { + this.paddingRichEditor = 10; + this.marginRichEditor = 20; + }) + } + .borderWidth(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/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0059.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0059.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfa8b450cf05382222cd9cf8a4137666000c7097 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0059.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 ComponentTextRicheditorFontfeature0059 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State paddingRichEditor: number = 1; + @State marginRichEditor: number = 2; + + build() { + Flex({ direction: FlexDirection.Column }) { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('【】 123', + { + style: + { + letterSpacing: 20, + fontFeature: '\"vert\" on' + }, + paragraphStyle: { + textAlign: TextAlign.Start, + leadingMargin: 5 + } + }) + }) + .id('ComponentTextRicheditorFontfeature0059') + .height(100) + .width('100%') + .padding(this.paddingRichEditor) + .margin(this.marginRichEditor) + .backgroundColor(Color.Pink) + Button('justFeature', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('justFeature') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateParagraphStyle({ start: -1, end: -1, + style: { + textAlign: TextAlign.End, + leadingMargin:20 + } + }); + }) + } + .borderWidth(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/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8f8affff57d8dc93bfff5bd388bb55388760066 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0340.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. + */ +import LeadingMarginCreator from '../../../test/model/LeadingMaginCreator'; + +@Entry +@Component +struct ComponentTextRicheditorInterface0340 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + private leadingMarkCreatorInstance = LeadingMarginCreator.instance; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateParagraphStyle({ + start: 1, + end: 10, + style: { + leadingMargin: { + pixelMap: this.leadingMarkCreatorInstance.genCircleMark(20, 30, 1), + size: [30, 40] + } + } + }); + }) + .id('ComponentTextRicheditorInterface0340') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..238e2c3a92d6bcaaa85e6f1d6acf4a8ba117b2b3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0350.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 ComponentTextRicheditorInterface0350 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateParagraphStyle({ + start: 1, + end: 10, + style: { + textAlign:TextAlign.Center, + leadingMargin:200 + } + }); + }) + .id('ComponentTextRicheditorInterface0350') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..64e71c639d6918b26f22459c71cf35ece989c8c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0360.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 LeadingMarginCreator from '../../../test/model/LeadingMaginCreator'; + +@Entry +@Component +struct ComponentTextRicheditorInterface0360 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + private leadingMarkCreatorInstance = LeadingMarginCreator.instance; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateParagraphStyle({ + start: 1, + end: 10, + style: { + textAlign:TextAlign.Center, + leadingMargin: { + pixelMap: this.leadingMarkCreatorInstance.genCircleMark(20, 30, 1), + size: [30, 40] + } + } + }); + }) + .id('ComponentTextRicheditorInterface0360') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8f46f80241561c4898f4bd4402a1a41e19d9d50 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0410.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 ComponentTextRicheditorInterface0410 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = Color.Pink; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0410') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..269eeb9cf2fe64cda9ada4276a6c62f5c0ccbeb6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0420.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 ComponentTextRicheditorInterface0420 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = Color.Pink; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0420') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0430.ets new file mode 100644 index 0000000000000000000000000000000000000000..6589e339a63e492ae255d8e5c9f1b600d5825d10 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0430.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 ComponentTextRicheditorInterface0430 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = Color.Pink; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0430') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0440.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd66198b45840a4bd367389f964cf5efbb9b0465 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0440.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 ComponentTextRicheditorInterface0440 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = Color.Pink; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('我爱你中国' + '\n', + {}); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0440') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0450.ets new file mode 100644 index 0000000000000000000000000000000000000000..41b3782a10ff6e02c3f1ed668161d171ec4bf21d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0450.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 ComponentTextRicheditorInterface0450 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = Color.Pink; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我爱你中国', + {}); + this.controller.addTextSpan('我爱你中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0450') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0460.ets new file mode 100644 index 0000000000000000000000000000000000000000..32eb7f68790e6938c2c24150cca5a558229dae3a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0460.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 ComponentTextRicheditorInterface0460 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = 0x00ff00; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0460') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0470.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c618771493eea2f7d6862b2c4f4eb4af825dd47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0470.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 ComponentTextRicheditorInterface0470 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = 0x00ff00; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0470') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0480.ets new file mode 100644 index 0000000000000000000000000000000000000000..eabdac7952c3c901525347edaa364e74c5cc95fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0480.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 ComponentTextRicheditorInterface0480 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = 0x00ff00; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0480') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0490.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbd5de2b0a0ce14fcadef1184d8dc53919e95b7f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0490.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0490 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = 0x00ff00; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0490') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0500.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ae1e7b39c527bf963f7aeb09a22dd72e88aa494 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0500.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 ComponentTextRicheditorInterface0500 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color = 0x00ff00; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0500') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0510.ets new file mode 100644 index 0000000000000000000000000000000000000000..821584d11da1cdd95dfa63d762549162f2731c9b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0510.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 ComponentTextRicheditorInterface0510 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#000000'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0510') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0520.ets new file mode 100644 index 0000000000000000000000000000000000000000..f349cb296af834bf43134ffb87de85eabb6a6ffe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0520.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0520 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#000000'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0520') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0530.ets new file mode 100644 index 0000000000000000000000000000000000000000..00822b6fc8ab7296224eab3fa48120f92d56bafb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0530.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 ComponentTextRicheditorInterface0530 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#000000'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0530') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0540.ets new file mode 100644 index 0000000000000000000000000000000000000000..03a59e4541469d5049c944635c3173b013099445 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0540.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0540 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#000000'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0540') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0550.ets new file mode 100644 index 0000000000000000000000000000000000000000..58a8ba11a92d3829631c88eff5cc5aff62a7fbc8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0550.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 ComponentTextRicheditorInterface0550 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#000000'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0550') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0560.ets new file mode 100644 index 0000000000000000000000000000000000000000..65120f8ec2c7238afe301f8fc097b7f05f417b68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0560.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 ComponentTextRicheditorInterface0560 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#ff00FF00'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0560') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0570.ets new file mode 100644 index 0000000000000000000000000000000000000000..15058d5e675f17a93c7438751f28f2a424b160e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0570.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0570 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#ff00FF00'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0570') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0580.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfd9af47ad961262abbc6659e0ad099eeb6745df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0580.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 ComponentTextRicheditorInterface0580 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#ff00FF00'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0580') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0590.ets new file mode 100644 index 0000000000000000000000000000000000000000..4eabbbb1f9bb3aa64883475855fb25814e0a4b2e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0590.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0590 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#ff00FF00'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0590') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0600.ets new file mode 100644 index 0000000000000000000000000000000000000000..b41fbd84b434ca5690967fcce7e530516be5cf9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0600.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 ComponentTextRicheditorInterface0600 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = '#ff00FF00'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0600') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0610.ets new file mode 100644 index 0000000000000000000000000000000000000000..5361f8a71ad176d2dc4b0714e8b89ad0e715e166 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0610.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 ComponentTextRicheditorInterface0610 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = " rgba(255,0,0, 0.5)"; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0610') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0620.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f979a779663641719d4d2a4004d44410781a559 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0620.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0620 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = " rgba(255,0,0, 0.5)"; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0620') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0630.ets new file mode 100644 index 0000000000000000000000000000000000000000..8682c49f32e80bcfef25f40be4e73c1e17892520 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0630.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 ComponentTextRicheditorInterface0630 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = " rgba(255,0,0, 0.5)";; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0630') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0640.ets new file mode 100644 index 0000000000000000000000000000000000000000..fca16d4297200117626a3419bf623b6c50481e90 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0640.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0640 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = " rgba(255,0,0, 0.5)";; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0640') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0650.ets new file mode 100644 index 0000000000000000000000000000000000000000..029daa2fd6c159ce7db559a3e00df441722fe67f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0650.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 ComponentTextRicheditorInterface0650 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = " rgba(255,0,0, 0.5)";; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0650') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0660.ets new file mode 100644 index 0000000000000000000000000000000000000000..875f7e14e42ca63a64b164b8353031b4792f6b39 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0660.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 ComponentTextRicheditorInterface0660 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = getContext().resourceManager.getColorSync($r('app.color.yellow')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0660') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0670.ets new file mode 100644 index 0000000000000000000000000000000000000000..68cd04ec8135d5d49de1116d681cc1532ada4d8d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0670.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0670 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = getContext().resourceManager.getColorSync($r('app.color.yellow')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0670') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0680.ets new file mode 100644 index 0000000000000000000000000000000000000000..20a37f268dcebb809898899e11fd3060bdd71ef1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0680.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 ComponentTextRicheditorInterface0680 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = getContext().resourceManager.getColorSync($r('app.color.yellow')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0680') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0690.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4a36717f36a720550467dd64934ea45072f84a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0690.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0690 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = getContext().resourceManager.getColorSync($r('app.color.yellow')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0690') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0700.ets new file mode 100644 index 0000000000000000000000000000000000000000..55cd2526ebf776431fd6e488337e47d293f3b135 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0700.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 ComponentTextRicheditorInterface0700 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State color: Color | string = getContext().resourceManager.getColorSync($r('app.color.yellow')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + .id('ComponentTextRicheditorInterface0700') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontColor: this.color + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0710.ets new file mode 100644 index 0000000000000000000000000000000000000000..c636257c011f2d4a08f4c764f9234930e926c823 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0710.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 ComponentTextRicheditorInterface0710 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0710') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0720.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd97928bedb3d6bfae53e046c209935970c8a155 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0720.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 ComponentTextRicheditorInterface0720 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0720') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0730.ets new file mode 100644 index 0000000000000000000000000000000000000000..fb0e827be4ce2775275bac38ad0721d663d34a8e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0730.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0730 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0730') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0740.ets new file mode 100644 index 0000000000000000000000000000000000000000..01b0f182dbe5a1ad47767f4ec82e2592d0677af3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0740.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 ComponentTextRicheditorInterface0740 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0740') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0750.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c4e5fcd2b44ca1a6a253bedc4824b81cefa2c74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0750.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0750 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0750') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0760.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e8c6f906575ae17f6732580ba629b0d60afd968 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0760.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 ComponentTextRicheditorInterface0760 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number | Resource | string = '10px'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0760') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0770.ets new file mode 100644 index 0000000000000000000000000000000000000000..b84eeebe1516367af4f59926ef6764c81263bc22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0770.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 ComponentTextRicheditorInterface0770 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number | Resource | string = '10px'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0770') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0780.ets new file mode 100644 index 0000000000000000000000000000000000000000..39fb7fbd9f93b8f245cd7742e326c1bb0abd6195 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0780.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0780 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number | Resource | string = '10px'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0780') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0790.ets new file mode 100644 index 0000000000000000000000000000000000000000..1925392433fbc9e28c7fbd9d87c5e58bdd43049c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0790.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 ComponentTextRicheditorInterface0790 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number | Resource | string = '10px'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0790') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0800.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0800.ets new file mode 100644 index 0000000000000000000000000000000000000000..527705a25814583907bbdd92680971b141cf4b50 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0800.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0800 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: number | Resource | string = '10px'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0800') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0810.ets new file mode 100644 index 0000000000000000000000000000000000000000..d76a3eecad53f511b125c9120f02b61344145b35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0810.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 ComponentTextRicheditorInterface0810 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: string = getContext().resourceManager.getStringSync($r('app.string.font_20')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0810') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0820.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0820.ets new file mode 100644 index 0000000000000000000000000000000000000000..0cc63a08433a45c478208ff813ce168ec281921e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0820.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 ComponentTextRicheditorInterface0820 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: string = getContext().resourceManager.getStringSync($r('app.string.font_20')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0820') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0830.ets new file mode 100644 index 0000000000000000000000000000000000000000..58f1d79a4a9f7b95b669750bf0170e626172b868 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0830.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0830 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: string = getContext().resourceManager.getStringSync($r('app.string.font_20')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0830') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0840.ets new file mode 100644 index 0000000000000000000000000000000000000000..af7413f2423669355fd977b3c5d57d9b77a8d002 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0840.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 ComponentTextRicheditorInterface0840 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: string = getContext().resourceManager.getStringSync($r('app.string.font_20')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0840') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0850.ets new file mode 100644 index 0000000000000000000000000000000000000000..b345912721fe9026cacaaee93fa4d2729a07cd43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0850.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0850 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State sizeRich: string = getContext().resourceManager.getStringSync($r('app.string.font_20')); + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + .id('ComponentTextRicheditorInterface0850') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontSize: this.sizeRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0860.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a02b8f102691789a50cc671f8f5c3f48308d7bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0860.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 ComponentTextRicheditorInterface0860 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontStyleRich: FontStyle = FontStyle.Italic; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + .id('ComponentTextRicheditorInterface0860') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0870.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0870.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7a6a3f0df35890704ed0f747a9f11a935b36389 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0870.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0870 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontStyleRich: FontStyle = FontStyle.Italic; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + .id('ComponentTextRicheditorInterface0870') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0880.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0880.ets new file mode 100644 index 0000000000000000000000000000000000000000..453c3df2c7dcbfd4b9f6148b5ff538ec9f3926ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0880.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 ComponentTextRicheditorInterface0880 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontStyleRich: FontStyle = FontStyle.Italic; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + .id('ComponentTextRicheditorInterface0880') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0890.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0890.ets new file mode 100644 index 0000000000000000000000000000000000000000..cba4ca422c5c107c42c8a9774471669bea605445 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0890.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0890 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontStyleRich: FontStyle = FontStyle.Italic; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + .id('ComponentTextRicheditorInterface0890') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0900.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0900.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6d04e5882f59b6cecb76c84a736095327bf6cf4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0900.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 ComponentTextRicheditorInterface0900 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontStyleRich: FontStyle = FontStyle.Italic; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + .id('ComponentTextRicheditorInterface0900') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontStyle: this.fontStyleRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0910.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0910.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ffa139e5f5b1806f8ac44a222648e8f72f8ee48 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0910.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 ComponentTextRicheditorInterface0910 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Lighter; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0910') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0920.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0920.ets new file mode 100644 index 0000000000000000000000000000000000000000..01c9f1e5ab2c106365d12f4b2e45b9ed5eb35397 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0920.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0920 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Lighter; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0920') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0930.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1fd242be90f8f553316b163829c0b969f431852 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0930.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 ComponentTextRicheditorInterface0930 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Lighter; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0930') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0940.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2d796446d377aa70da376dec4f6d59923b75187 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0940.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0940 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Lighter; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0940') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0950.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0950.ets new file mode 100644 index 0000000000000000000000000000000000000000..0bb94f62c39c0e7cd87365792576e774574a34ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0950.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 ComponentTextRicheditorInterface0950 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Lighter; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0950') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0960.ets new file mode 100644 index 0000000000000000000000000000000000000000..35643cf84c41e2b22abc01a39af4962c26d16bbd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0960.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 ComponentTextRicheditorInterface0960 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = 900; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0960') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0970.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0970.ets new file mode 100644 index 0000000000000000000000000000000000000000..286d57d0c47f02a77c269c43cbef2584bcda7c07 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0970.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0970 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = 900; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0970') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0980.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e33ea4589a6ef5555392b413d86b504830af623 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0980.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 ComponentTextRicheditorInterface0980 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = 900; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0980') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0990.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0990.ets new file mode 100644 index 0000000000000000000000000000000000000000..3dc2bcdcedbd4aa983f28456392b384804071bb5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0990.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface0990 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = 900; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface0990') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1000.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1000.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d531f549a9b341332db8145f2d87a43e59e866a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1000.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 ComponentTextRicheditorInterface1000 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = 900; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1000') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1010.ets new file mode 100644 index 0000000000000000000000000000000000000000..4fa3a5ef007effe4be29b7126454c620c164ae5c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1010.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 ComponentTextRicheditorInterface1010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Bolder; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1010') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1020.ets new file mode 100644 index 0000000000000000000000000000000000000000..4506da57f17fe43c672c80d3d78984722ce7b333 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1020.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface1020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Bolder; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1020') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1030.ets new file mode 100644 index 0000000000000000000000000000000000000000..3dcb99027244ca512d2cf48e95692ca227c5a817 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1030.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 ComponentTextRicheditorInterface1030 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Bolder; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1030') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1040.ets new file mode 100644 index 0000000000000000000000000000000000000000..08073852d40ccc903de68ef7cfc65d4043320909 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1040.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface1040 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Bolder; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1040') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1050.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ff8f2359c90923c76534bd6f2a2f7bc40d3a206 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1050.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 ComponentTextRicheditorInterface1050 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontWweightRich: FontWeight = FontWeight.Bolder; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + .id('ComponentTextRicheditorInterface1050') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontWeight: this.fontWweightRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1060.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0b2affca6096d3b72a5835e158bbcf47cd680ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1060.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 ComponentTextRicheditorInterface1060 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'HarmonyOS Sans'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1060') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1070.ets new file mode 100644 index 0000000000000000000000000000000000000000..6561497648f638624f29de145f84c0272508f574 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1070.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface1070 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'HarmonyOS Sans'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1070') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1080.ets new file mode 100644 index 0000000000000000000000000000000000000000..1441b71fe803715bd35864ff56cdadf787f3b070 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1080.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 ComponentTextRicheditorInterface1080 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'HarmonyOS Sans'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1080') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1090.ets new file mode 100644 index 0000000000000000000000000000000000000000..62da9d1d4de9fef8d6a6a0b9726b10073c598f0b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1090.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. + */ + +@Entry +@Component +struct ComponentTextRicheditorInterface1090 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'HarmonyOS Sans'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1090') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1100.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ec24aaaffa85938a3b6f91db028396562e57a01 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1100.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 ComponentTextRicheditorInterface1100 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'HarmonyOS Sans'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1100') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily: this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1110.ets new file mode 100644 index 0000000000000000000000000000000000000000..79fd7e316afa638b2c07bcf3076d5da5cedd417f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1110.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 ComponentTextRicheditorInterface1110 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + .id('ComponentTextRicheditorInterface1110') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1120.ets new file mode 100644 index 0000000000000000000000000000000000000000..d74f83c699b50d54fe96ff2ec62572ebf169de3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1120.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 ComponentTextRicheditorInterface1120 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + .id('ComponentTextRicheditorInterface1120') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1130.ets new file mode 100644 index 0000000000000000000000000000000000000000..cfd12c767842c41548afc224a165c4b28a5d0aa9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1130.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 ComponentTextRicheditorInterface1130 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + .id('ComponentTextRicheditorInterface1130') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1140.ets new file mode 100644 index 0000000000000000000000000000000000000000..c29e75920e46c9cef9aea12e64752f053ba0d04a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1140.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 ComponentTextRicheditorInterface1140 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + .id('ComponentTextRicheditorInterface1140') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1150.ets new file mode 100644 index 0000000000000000000000000000000000000000..0eb36248612f019cf8fee4d7a2303ac0092abaca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1150.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 ComponentTextRicheditorInterface1150 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + .id('ComponentTextRicheditorInterface1150') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{ color: Color.Black,type: TextDecorationType.Underline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1160.ets new file mode 100644 index 0000000000000000000000000000000000000000..49acb4a092b4a0e643050a76147a577773bbe9e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1160.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 ComponentTextRicheditorInterface1160 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + .id('ComponentTextRicheditorInterface1160') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1170.ets new file mode 100644 index 0000000000000000000000000000000000000000..4316aee8d365c10c1f825839f4902c319f30c7b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1170.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 ComponentTextRicheditorInterface1170 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + .id('ComponentTextRicheditorInterface1170') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1180.ets new file mode 100644 index 0000000000000000000000000000000000000000..386bc41930ecf0f6aa788013b21170c263e81c4b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1180.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 ComponentTextRicheditorInterface1180 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + .id('ComponentTextRicheditorInterface1180') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1190.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff6c8f9e27f317c6207f4cadfa96ce3d20d77e31 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1190.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 ComponentTextRicheditorInterface1190 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + .id('ComponentTextRicheditorInterface1190') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1200.ets new file mode 100644 index 0000000000000000000000000000000000000000..2da57cb75a6ee10552d616f20779fe43c226f3f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1200.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 ComponentTextRicheditorInterface1200 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + .id('ComponentTextRicheditorInterface1200') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 'rgb(0,0,255)',type: TextDecorationType.LineThrough} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1210.ets new file mode 100644 index 0000000000000000000000000000000000000000..f20d58bcb3d1429b869b7529772849cb0857c026 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1210.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 ComponentTextRicheditorInterface1210 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1210') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1220.ets new file mode 100644 index 0000000000000000000000000000000000000000..5dc3536dcc085ef573848f40bf452e30e46734de --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1220.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 ComponentTextRicheditorInterface1220 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1220') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1230.ets new file mode 100644 index 0000000000000000000000000000000000000000..e597afb66687b4a0ad0cdb832564eed4b6639f61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1230.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 ComponentTextRicheditorInterface1230 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1230') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1240.ets new file mode 100644 index 0000000000000000000000000000000000000000..d250d6603b8dde8c59768a76648021e074f56803 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1240.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 ComponentTextRicheditorInterface1240 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1240') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1250.ets new file mode 100644 index 0000000000000000000000000000000000000000..1769df6e0fc2c92f2f04155f6c162087447dcac3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1250.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 ComponentTextRicheditorInterface1250 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1250') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: getContext().resourceManager.getColorSync($r('app.color.yellow')),type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1260.ets new file mode 100644 index 0000000000000000000000000000000000000000..5334a26ecba6caa498301ae50ba38c4b9ff21f8a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1260.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 ComponentTextRicheditorInterface1260 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color:0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1260') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1270.ets new file mode 100644 index 0000000000000000000000000000000000000000..28f4bfa11ca2ec7fcf44736ef2f8380025345cdb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1270.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 ComponentTextRicheditorInterface1270 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1270') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1280.ets new file mode 100644 index 0000000000000000000000000000000000000000..a06f543561c893bc88c076ddc36f0c55c4a41169 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1280.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 ComponentTextRicheditorInterface1280 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1280') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1290.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3d4e4c145119f8a3db052262480183e62c60e37 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1290.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 ComponentTextRicheditorInterface1290 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1290') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1300.ets new file mode 100644 index 0000000000000000000000000000000000000000..afe7b6c1cd8a7b515f0c4cf542679fe0c22bfe06 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1300.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 ComponentTextRicheditorInterface1300 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + .id('ComponentTextRicheditorInterface1300') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + decoration:{color: 0x00ff00,type: TextDecorationType.Overline} + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1310.ets new file mode 100644 index 0000000000000000000000000000000000000000..d47a462276f2203f923b16c5c255b06fb362aa9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1310.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 ComponentTextRicheditorInterface1310 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'Arial'; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1310') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1320.ets new file mode 100644 index 0000000000000000000000000000000000000000..e72cf6d09582a62e5e2aa474a9cde86c5e67600b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1320.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 ComponentTextRicheditorInterface1320 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'Arial'; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1320') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1330.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d01a445c000e6dc99a35f025d90db478f8e34c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1330.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 ComponentTextRicheditorInterface1330 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'Arial'; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1330') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1340.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe230b8e34bf4c0918e90dbb9c07e7b5bc5e7eef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1340.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 ComponentTextRicheditorInterface1340 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'Arial'; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('中国'+ '\n', + { + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1340') + .onIMEInputComplete(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1350.ets new file mode 100644 index 0000000000000000000000000000000000000000..765fadf70365a3ba83f2d2e9a2f24adcfd295457 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1350.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 ComponentTextRicheditorInterface1350 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontFamilyRich: string = 'Arial'; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addTextSpan('中国'+ '\n', + { + style:{ + fontStyle:FontStyle.Italic + } + }); + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + .id('ComponentTextRicheditorInterface1350') + .onIMEInputComplete(() => { + this.controller.updateSpanStyle({ + start: -1, + end: -1, + textStyle: { + fontFamily:this.fontFamilyRich + } + }); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1360.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fb92907d9e0655d878036494827c3541f90885b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1360.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 ComponentTextRicheditorInterface1360 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('CHina', + { + }); + }) + .id('ComponentTextRicheditorInterface1360') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1380.ets new file mode 100644 index 0000000000000000000000000000000000000000..11601a0ab94f0d97951db3e9f66b63bc53eadc71 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1380.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 ComponentTextRicheditorInterface1380 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorInterface1380') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1400.ets new file mode 100644 index 0000000000000000000000000000000000000000..89e6de11e89d780049b8d472ccf00408bf9bedd7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1400.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 ComponentTextRicheditorInterface1400 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('CHina', + { + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + + }) + .id('ComponentTextRicheditorInterface1400') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b77b3db34ee7d1ee6ad9ceda15a07c33fe7b692 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0001.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 ComponentTextRicheditorKeyboardReinForcing0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorKeyboardReinForcing0001') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..52317799a8c170e85f5fef57d896fa2b6cb02258 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0002.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 ComponentTextRicheditorKeyboardReinForcing0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorKeyboardReinForcing0002') + .enterKeyType(EnterKeyType.Go) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..21584abdb487efebe722373dd19d920ff4ce1bb3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0003.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 ComponentTextRicheditorKeyboardReinForcing0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorKeyboardReinForcing0003') + .enterKeyType(EnterKeyType.NEW_LINE) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..80516c80b0d7ec72d6efd87e7f73304c7444a264 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0004.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 ComponentTextRicheditorKeyboardReinForcing0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorKeyboardReinForcing0004') + .enterKeyType(-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/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d463ca035bc2d3b0cfd1a151c0ef7f0b9f83c6b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0012.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 ComponentTextRicheditorKeyboardReinForcing0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State type: EnterKeyType = EnterKeyType.Go; + + build() { + Row() { + Column() { + Button('switchType') + .id('switchType') + .width(100) + .height(50) + .onClick(() => { + this.type = EnterKeyType.NEW_LINE; + this.controller.stopEditing(); + }) + RichEditor(this.options) + .id('ComponentTextRicheditorKeyboardReinForcing0012') + .enterKeyType(this.type) + .onSubmit(() => { + + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..8cb80fe93819048b1d6e7468b07e689c66ec75cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0013.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 ComponentTextRicheditorKeyboardReinForcing0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State type: EnterKeyType = EnterKeyType.Go; + + build() { + Row() { + Column() { + Button('switchType') + .id('switchType') + .width(100) + .height(50) + .onClick(() => { + this.type = EnterKeyType.NEW_LINE; + this.controller.stopEditing(); + }) + RichEditor(this.options) + .id('ComponentTextRicheditorKeyboardReinForcing0013') + .enterKeyType(this.type) + .onSubmit(() => { + + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..caf4151b48eaf6a70003770492472ae6665d2a5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0015.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 ComponentTextRicheditorKeyboardReinForcing0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State type: EnterKeyType = EnterKeyType.Go; + + build() { + Row() { + Column() { + Button('switchType') + .id('switchType') + .width(100) + .height(50) + .onClick(() => { + this.type = EnterKeyType.NEW_LINE; + }) + RichEditor(this.options) + .id('ComponentTextRicheditorKeyboardReinForcing0015') + .enterKeyType(this.type) + .onSubmit(() => { + + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..b9be68bcf49292a4c8a9f7eaaefec861c83d2270 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0014.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 ComponentTextRicheditorLineHeightLetterSpacing0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('.....', { + style: { + lineHeight:10, + letterSpacing:-100 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0014') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..5836278dd9a3285b29e47a30ee51e1dcc728efbc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0019.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 ComponentTextRicheditorLineHeightLetterSpacing0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText : number | undefined = 0; + @State letterSpacingText : number | undefined = 0; + build() { + Row() { + Column() { + Text('lineHeight value ='+this.lineHeightText+'letterSpacing value ='+this.letterSpacingText); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight:30, + letterSpacing:30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0019') + .onIMEInputComplete((value: RichEditorTextSpanResult) => { + this.lineHeightText = value.textStyle.lineHeight; + this.letterSpacingText =value.textStyle.letterSpacing; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..d614af69d8d297aa23ec5a26fa48d73923dddeb1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0020.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 ComponentTextRicheditorLineHeightLetterSpacing0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined = 0; + @State letterSpacingText: number | undefined = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight: 30, + letterSpacing: 30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0020') + .aboutToDelete((value: RichEditorDeleteValue) => { + value.richEditorDeleteSpans.forEach(item => { + this.lineHeightText = (item as RichEditorTextSpanResult).textStyle.lineHeight; + this.letterSpacingText = (item as RichEditorTextSpanResult).textStyle.letterSpacing; + }) + return true; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..73afec7e67c94585ac8d2228a2ca27e78e73d185 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0021.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 ComponentTextRicheditorLineHeightLetterSpacing0021 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined = 0; + @State letterSpacingText: number | undefined = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight: 30, + letterSpacing: 30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0021') + .onSelect((value: RichEditorSelection) => { + value.spans.forEach(item => { + this.lineHeightText = (item as RichEditorTextSpanResult).textStyle.lineHeight; + this.letterSpacingText = (item as RichEditorTextSpanResult).textStyle.letterSpacing; + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..38b6aaf5e6d5f938a39badfb3dbad4a96a3fe028 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0022.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 ComponentTextRicheditorLineHeightLetterSpacing0022 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined | string | Resource = 0; + @State letterSpacingText: number | undefined | string = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + Button('getStyles') + .id('getStyles') + .width(100) + .height(50) + .onClick(() => { + this.letterSpacingText = this.controller.getTypingStyle().letterSpacing; + this.lineHeightText = this.controller.getTypingStyle().lineHeight; + }); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人'); + this.controller.setTypingStyle( + { + lineHeight: 30, + letterSpacing: 30 + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0022') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0023.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0023.ets new file mode 100644 index 0000000000000000000000000000000000000000..afc0b83953c6fdb7a3d634b0d62e03a4e29b5063 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0023.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 ComponentTextRicheditorLineHeightLetterSpacing0023 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined | string | Resource = 0; + @State letterSpacingText: number | undefined | string = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + Button('getStyles') + .id('getStyles') + .width(100) + .height(50) + .onClick(() => { + this.controller.getSpans().forEach(item => { + this.lineHeightText = (item as RichEditorTextSpanResult).textStyle.lineHeight; + this.letterSpacingText = (item as RichEditorTextSpanResult).textStyle.letterSpacing; + }); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight: 30, + letterSpacing: 30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0023') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0024.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0024.ets new file mode 100644 index 0000000000000000000000000000000000000000..eddb201ccfacd46a5257ece2b7f96b4e696b2c74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0024.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 ComponentTextRicheditorLineHeightLetterSpacing0024 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined | string | Resource = 0; + @State letterSpacingText: number | undefined | string = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + Button('getStyles') + .id('getStyles') + .width(100) + .height(50) + .onClick(() => { + console.info('lineHeight value'+this.controller.getSelection()); + console.info('lineHeight value'+this.controller.getSelection().spans); + this.controller.getSelection().spans.forEach(item => { + this.lineHeightText = (item as RichEditorTextSpanResult).textStyle.lineHeight; + this.letterSpacingText = (item as RichEditorTextSpanResult).textStyle.letterSpacing; + }); + }); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight: 30, + letterSpacing: 30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0024') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0025.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0025.ets new file mode 100644 index 0000000000000000000000000000000000000000..59a5d8ef7c4d8ac77b2e192367bcf441b2b17cd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0025.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 ComponentTextRicheditorLineHeightLetterSpacing0025 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined | string | Resource = 0; + @State letterSpacingText: number | undefined | string = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + Button('getStyles') + .id('getStyles') + .width(100) + .height(50) + .onClick(() => { + this.controller.setTypingStyle( + { + lineHeight: 40, + letterSpacing: 40 + }); + this.letterSpacingText = this.controller.getTypingStyle().letterSpacing; + this.lineHeightText = this.controller.getTypingStyle().lineHeight; + }); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + lineHeight: 30, + letterSpacing: 30 + } + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0025') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0026.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0026.ets new file mode 100644 index 0000000000000000000000000000000000000000..87fec0c9be2147f9bdd0ed70c25b6c95561e2e77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0026.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 ComponentTextRicheditorLineHeightLetterSpacing0026 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State lineHeightText: number | undefined | string | Resource = 0; + @State letterSpacingText: number | undefined | string = 0; + + build() { + Row() { + Column() { + Text('lineHeight value =' + this.lineHeightText + 'letterSpacing value =' + this.letterSpacingText); + Button('getStyles') + .id('getStyles') + .width(100) + .height(50) + .onClick(() => { + this.controller.updateSpanStyle( + { + textStyle: { + lineHeight: 40, + letterSpacing: 40 + } + }); + this.letterSpacingText = this.controller.getTypingStyle().letterSpacing; + this.lineHeightText = this.controller.getTypingStyle().lineHeight; + }); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人'); + this.controller.setTypingStyle( + { + lineHeight: 30, + letterSpacing: 30 + }); + }) + .id('ComponentTextRicheditorLineHeightLetterSpacing0026') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e7be8a87bf3efdd911b4309051a008a16a13285 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0001.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. + */ +import { prompt, SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + } + this.controller.setSelection(1, 2, options) + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0001') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..82dc7c8c7db25adcf0740bb70e7d03016733f434 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0002.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + } + this.controller.setSelection(1, 2, options) + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0002') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..b65f92fc7db944439fe439a09ff781f4e9612151 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0003.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + } + this.controller.setSelection(1, 2, options) + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0003') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..024b241c38684ff5a713a8e06574529565d8c7d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0004.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. + */ +import { prompt, SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + } + this.controller.setSelection(1, 2, options) + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0004') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..67dba32c72e74b856c607aa324a8b4de42018fab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0005.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 { prompt, SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + style: + { + fontSize: 30 + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0005') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fd605c2c5ea40c486a8fad91e166b7d42de5991 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0006.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 ComponentTextRicheditorLongPresstoselectall0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @Builder + builder() { + Text("hello").padding('20').borderWidth(1).width('100%') + } + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addBuilderSpan(()=>{ + this.builder() + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0006') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4feae8807c626c3b42c8d293a136fb0ddae8584 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0007.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('\uD83D\uDE00', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(1, 2, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0007') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + } + this.controller.setSelection(1, 2, options) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..f754b3e5a25c601968f79a8929ed1f3d9e516cc3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0008.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('E00', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + } + this.controller.setSelection(-1, -1, options) + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0008') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..c843264e32ee91e23dc13baaa7b9c7b4b6ef9ac2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0009.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('E00', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 0, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0009') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 0, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..f61ffab52603e9d0c6feb54feb8df4e528adcb3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0010.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('E00', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(2, 1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0010') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(2, 1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fd1c0af629c268e748672306d074664a5a8cdb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0011.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0011') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(1, 1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..a28c373ea7732f47b961c3c20935b91ed3354585 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0012.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(1, 1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0012') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(1, 1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..7075ee6bb252e89b18acecdc764c19f81715d872 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0013.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:-1 + }; + this.controller.setSelection(1, 2, options); + } + } + }) + }) + .id('ComponentTextRicheditorLongPresstoselectall0013') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: -1 + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..548f9d4fce00e9b2f2720a80b6351b3032d456ca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0014.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: 3 + }; + this.controller.setSelection(1, 2, options); + } + } + }) + }) + .id('ComponentTextRicheditorLongPresstoselectall0014') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: 3 + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..d162e98a91777e2f5a6527a4ac59614c1d133cf9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0015.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: undefined + }; + this.controller.setSelection(1, 2, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0015') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: undefined + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..902a32e259ed3b2fc703320e676e391b0be6cddf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0016.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0016') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..07a00d9ac99b829e857ccaccf7f0b14fed7a08c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0017 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0017') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(-1, 1000, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157.ets new file mode 100644 index 0000000000000000000000000000000000000000..22f47e66b89b054b1a6688271ea4a28177f512bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0017_157 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, 0, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, 0, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0017_157') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, 0, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157_029.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157_029.ets new file mode 100644 index 0000000000000000000000000000000000000000..79851651639f86263cf528c270a6aee176a493ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157_029.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0017_157_029 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(2, 1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(2, 1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0017_157_029') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(2,1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8edeb29601868f51170ad7af43cf5c1f3c8c071 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0017_429 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0017_429') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429_005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429_005.ets new file mode 100644 index 0000000000000000000000000000000000000000..af662768b26aa9bb49b1d5e13cbd57a9e1a2ad27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429_005.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0017_429_005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }) + }) + .id('ComponentTextRicheditorLongPresstoselectall0017_429_005') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0018.ets new file mode 100644 index 0000000000000000000000000000000000000000..f46192ccee955dcce2ef8c71ff80fae40b00c481 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0018.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0018 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0018') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9e19a40624f9f996f0b15270f877543c83870ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0019.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0019') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + } + this.controller.setSelection(-1, -1, options) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe7c2b326d55b4700811c6cfcf2b462149be6e38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0020.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0020') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.SHOW + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c23e3a216de3d3dea0ea1d592ddc0e66a958621 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0021.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0021 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(1, 2, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.HIDE + }; + this.controller.setSelection(1, 2, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0021') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.HIDE + }; + this.controller.setSelection(1, 2, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..2fe6611521c7aaafc758d7432faff7cc1002185f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0022.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. + */ +import { SelectOptions } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorLongPresstoselectall0022 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('123456', { + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + }, + gesture: { + onLongPress: (event) => { + let options: SelectionOptions = { + menuPolicy:MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + } + } + }); + }) + .id('ComponentTextRicheditorLongPresstoselectall0022') + Button('') + .id('select') + .margin(15) + .backgroundColor(Color.Transparent) + .onClick(() => { + let options: SelectionOptions = { + menuPolicy: MenuPolicy.DEFAULT + }; + this.controller.setSelection(-1, -1, options); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..8df652aeeecac3fca6984ffba3fb75d160595004 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0001.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. + */ + + +@Entry +@Component +struct ComponentTextRicheditorOnWillChange0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter).borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0001') + .borderColor(Color.Orange) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return false; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeBefore = JSON.stringify(rangeBefore); + this.rangeAfter = JSON.stringify(rangeAfter); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae2cce959b8727731fbc3af9ae311e3cabf2d5be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0002.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 ComponentTextRicheditorOnWillChange0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter).borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0002') + .borderColor(Color.Orange) + .borderWidth(1) + .draggable(true) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return false; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeBefore = JSON.stringify(rangeBefore); + this.rangeAfter = JSON.stringify(rangeAfter); + }) + TextArea({text:"我是TextArea"}).draggable(true).width(100).height(50).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/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..bdaba6047c8e08d7db69cb62763a312696481aa6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0003.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 ComponentTextRicheditorOnWillChange0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter).borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0003') + .borderColor(Color.Orange) + .borderWidth(1) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return false; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeBefore = JSON.stringify(rangeBefore); + this.rangeAfter = JSON.stringify(rangeAfter); + }) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(()=>{ + this.controller.addTextSpan('添加内容', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f2eb582cd28aff00d568ca84cc22e2f6d1e2fdd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0004.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 ComponentTextRicheditorOnWillChange0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter).borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0004') + .borderColor(Color.Orange) + .borderWidth(1) + .onWillChange((value: RichEditorChangeValue) => { + this.controller.setSelection(1,3); + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return true; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeBefore = JSON.stringify(rangeBefore); + this.rangeAfter = JSON.stringify(rangeAfter); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffbf7eb6fe581769d002280be3579115e8cff743 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0005.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 ComponentTextRicheditorOnWillChange0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter) + .borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0005') + .borderColor(Color.Orange) + .onReady(() => { + this.controller.addTextSpan('添加内容', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .borderWidth(1) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return true; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeBefore = JSON.stringify(rangeBefore); + this.rangeAfter = JSON.stringify(rangeAfter); + }) + Button("删除选择内容") + .id('delete') + .onClick(() => { + this.controller.deleteSpans(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..d760b5f9c31c904412d494102386a2e28adf401c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0006.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 ComponentTextRicheditorOnWillChange0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter) + .borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0006') + .borderColor(Color.Orange) + .onReady(() => { + this.controller.addTextSpan('添加内容', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .borderWidth(1) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return true; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeAfter = JSON.stringify(rangeAfter); + this.rangeBefore = JSON.stringify(rangeBefore); + }) + Button("删除选择内容") + .id('delete') + .onClick(() => { + this.controller.deleteSpans(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..00626ed63a6a87a779e9507e3456cbbdcc297955 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0007.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 ComponentTextRicheditorOnWillChange0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State replacedSpansValue: string = ''; + @State rangeBefore: string = ''; + @State rangeAfter: string = ''; + + build() { + Row() { + Column() { + Text('replacedSpans value====' + this.replacedSpansValue).borderColor(Color.Red); + Text('rangeBefore value=====' + this.rangeBefore + 'rangeAfter value=====' + this.rangeAfter) + .borderColor(Color.Green); + RichEditor(this.options) + .id('ComponentTextRicheditorOnWillChange0007') + .borderColor(Color.Orange) + .onReady(() => { + this.controller.addTextSpan('111', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .borderWidth(1) + .onWillChange((value: RichEditorChangeValue) => { + this.replacedSpansValue = JSON.stringify(value.replacedSpans); + return true; + }) + .onDidChange((rangeBefore: TextRange, rangeAfter: TextRange) => { + this.rangeAfter = JSON.stringify(rangeAfter); + this.rangeBefore = JSON.stringify(rangeBefore); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3b27fbdc3aa53bbff67315e1319efd2229559f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0001.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 ComponentTextRicheditorPlaceholder0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本') + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0001') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5e8937c24d39fcf71d8a8e11c07b4826f8a34c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0002.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 ComponentTextRicheditorPlaceholder0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('前面章节介绍了如何创建一个自定义组件。该自定义组件内部红结构固定,仅与使用方进行数据传递。 Ark UI还提供了一种更轻量的VI元素复用机制④vilder,④vilder所装饰的函数遵循 build()函数语法规则, 开发者可以将重复使用的UI元素抽象成一个方法,在build方法里调用。') + .key('ComponentTextRicheditorPlaceholder0002') + .borderWidth(1) + .borderColor(Color.Red) + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd255a4272061532a106256626959ca73e4b6d3b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0003.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 ComponentTextRicheditorPlaceholder0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('') + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0003') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c025d6790826524565ff91396f095230dd26a22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0004.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 ComponentTextRicheditorPlaceholder0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(' ') + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0004') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..f48595de1f41fc698f83db5259b1b61fb225dbd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0005.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 ComponentTextRicheditorPlaceholder0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('回头看了附近的hfkdshfnhfkdf& ldfkklf'+'\n'+'^7#@32345 () --#999@') + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0005') + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..1286c3e0f4568a5aa276fb3ab29996aba20def7e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0006.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 ComponentTextRicheditorPlaceholder0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(getContext().resourceManager.getStringSync($r("app.string.module_test_desc"))) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0006') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..df9fc4d15f7b87ecf686491ad5417f8e334da8f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0007.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 ComponentTextRicheditorPlaceholder0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder($r('app.media.cat')) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0007') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..3497cba6b8f45f96f77ab5df20528c796a8f0b4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0008.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 ComponentTextRicheditorPlaceholder0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '20gx' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0008') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfc115facb11b0388d6a8c9b216b39a8c4bd97c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0009.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 ComponentTextRicheditorPlaceholder0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '100px' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0009') + .width(100) + .height(50) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..f45985a25c98a28030f79874602926413f2e49bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0010.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 ComponentTextRicheditorPlaceholder0010{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '10' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0010') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00100.ets new file mode 100644 index 0000000000000000000000000000000000000000..05c64d92feb2aa77a3755111766f7bc7971f71bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00100.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00100 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State widthRich: number = 200; + @State heightRich: number = 50; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00100') + .width(this.widthRich) + .height(this.heightRich) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(() => { + this.widthRich = 100; + this.heightRich = 60; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00101.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00101.ets new file mode 100644 index 0000000000000000000000000000000000000000..fbd270ede10a770373bb585f54266b80244e0c69 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00101.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00101 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State paddingRich: number = 5; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00101') + .padding(this.paddingRich) + .width(100) + .height(100) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(() => { + this.paddingRich = 10; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00102.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00102.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc3eaddc50c9d959a448b88a56745f178e417e9d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00102.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. + */ +import { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0097 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State marginRich: number = 5; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0097') + .width(100) + .height(50) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(() => { + this.marginRich = 10; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103.ets new file mode 100644 index 0000000000000000000000000000000000000000..299ab0422d15f17f6f3f1125d5b56287cce6da94 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0097 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State flexBasisValue: number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0097') + .width(100) + .height(20) + .flexBasis(this.flexBasisValue) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(() => { + this.flexBasisValue = 50; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec6b77d01a3c3abd0b85408ef9163ff7a4897932 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00103_040 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + Button('change') + .id('change') + .margin(20) + .width(100) + .height(20) + .onClick(() => { + this.controller.deleteSpans(); + }) + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00103_040') + .width(100) + .height(40) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040_934.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040_934.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c207b688c2a8a90590fe17373ef2ecbd1645c42 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040_934.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00103_040_934 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State widthRich : number = 200; + @State heightRich : number = 60; + + build() { + Row() { + Column() { + TextArea({text:"我是TextArea"}).draggable(true).width(100).height(50).id('TextArea'); + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .draggable(true) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00103_040_934') + .width(this.widthRich) + .height(this.heightRich) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00104.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00104.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb3e6f7e7e4515b607508167bae1a0134b158975 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00104.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00104 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State richSize : number = 10; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', { + font:{ + size:this.richSize + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00104') + .width(100) + .height(40) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(()=>{ + this.richSize = 30; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00105.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00105.ets new file mode 100644 index 0000000000000000000000000000000000000000..f0c8402b049a7411127d430c787c4ddc0c684003 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00105.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder00105 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State widthRich : number = 200; + @State heightRich : number = 50; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder00105') + .width(this.widthRich) + .height(this.heightRich) + Button('changeFeature') + .id('changeFeature') + .margin(20) + .width(100) + .height(20) + .onClick(()=>{ + this.controller.setCaretOffset(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/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d0d3d8edf882b531454e3f772ef190b18f69dd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0011.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 ComponentTextRicheditorPlaceholder0011{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '23.40' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0011') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d53e0ebf6df79033ba1c535d592f58ab4c06dd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0012.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 ComponentTextRicheditorPlaceholder0012{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '50fp' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0012') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..2de6f4271e9b462711602d0ee4e7648308b2b9b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0013.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 ComponentTextRicheditorPlaceholder0013{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '50abedefg' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0013') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..9579bb1767b59cbd2c6842f255d76cbc36ba342c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0014.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 ComponentTextRicheditorPlaceholder0014{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '50dp' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0014') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ac27bfcd6268fef7119cbb1918078dc70323df4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0015.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 ComponentTextRicheditorPlaceholder0015{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '100%' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0015') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc2a18c070a98ed102cb23addba3ea5e4324d074 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0016.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 ComponentTextRicheditorPlaceholder0016{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '上班 qwer$k\\n' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0016') + .width(300) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..37fed5e278fab02fe32b139573a4d3d2d4f9cf1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0017.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 ComponentTextRicheditorPlaceholder0017{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '-1px' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0017') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0018.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d23b123a4bfd5e591f9fb4d00c0a7732a447d3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0018.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 ComponentTextRicheditorPlaceholder0018{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '0px' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0018') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..05204427b3546c2e13e879a3c27c2c927d36bf3c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0019.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 ComponentTextRicheditorPlaceholder0019{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: '0b1010' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0019') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..461d45e833477121768f05f273f6c92a56d06e2e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0020.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 ComponentTextRicheditorPlaceholder0020{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 20 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0020') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..015f2ae2e1c05a91cde9ee056d159085d894681b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0021.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 ComponentTextRicheditorPlaceholder0021{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: -10 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0021') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..eba8bddb35aa13e4eb9f7f38198cbe286c291a43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0022.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 ComponentTextRicheditorPlaceholder0022{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 0b1010 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0022') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0023.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0023.ets new file mode 100644 index 0000000000000000000000000000000000000000..034ee3520c336bf995161f2609926a7ad24d1e00 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0023.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 ComponentTextRicheditorPlaceholder0023{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 23.40 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0023') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0024.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0024.ets new file mode 100644 index 0000000000000000000000000000000000000000..22ffcdb81f48f9d84ec298c91f6844c927644401 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0024.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 ComponentTextRicheditorPlaceholder0024{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 0x22 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0024') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0025.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0025.ets new file mode 100644 index 0000000000000000000000000000000000000000..563960c67e15d3f5b829731f7d2f29125c24aed3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0025.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 ComponentTextRicheditorPlaceholder0025{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 0 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0025') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0026.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0026.ets new file mode 100644 index 0000000000000000000000000000000000000000..00d70bee5dbb47da3da814ee99556d623cd8a3d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0026.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 ComponentTextRicheditorPlaceholder0026{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: getContext().resourceManager.getStringSync($r('app.string.size_30')) + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0026') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0027.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0027.ets new file mode 100644 index 0000000000000000000000000000000000000000..43ce5581bcf5507b72aafc39a45075ce138ef217 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0027.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 ComponentTextRicheditorPlaceholder0027{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + size: 'cat.jpg' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0027') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0028.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0028.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc235b9a7324fe376d76368767527c6b4dd15917 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0028.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 ComponentTextRicheditorPlaceholder0028{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + style:FontStyle.Italic + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0028') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0029.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0029.ets new file mode 100644 index 0000000000000000000000000000000000000000..519ad68de5b2e08022cd5bcfe2ed333499928424 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0029.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 ComponentTextRicheditorPlaceholder0029{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + style:FontStyle.Normal + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0029') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc32e8bd912bb0662a606920545c759300eb388f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0030.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 ComponentTextRicheditorPlaceholder0030{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '900' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0030') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0031.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0031.ets new file mode 100644 index 0000000000000000000000000000000000000000..30980228e49de2435894f0bbfe9fae9cd1ab476d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0031.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 ComponentTextRicheditorPlaceholder0031{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '400' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0031') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0032.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0032.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc02e3a56b4428c6d08810ac86cb269294970559 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0032.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 ComponentTextRicheditorPlaceholder0032{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '100' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0032') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0033.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0033.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0d89a0fdcd9423bfbd0869e978d956288d744df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0033.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 ComponentTextRicheditorPlaceholder0033{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '-1' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0033') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0034.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0034.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b1c321fe9d1389f45c7e18b6266a6fc0a514a95 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0034.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 ComponentTextRicheditorPlaceholder0034{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '0' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0034') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0035.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0035.ets new file mode 100644 index 0000000000000000000000000000000000000000..4efdd7be2abba015ad901795840fae21560c6170 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0035.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 ComponentTextRicheditorPlaceholder0035{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '1000' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0035') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0036.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0036.ets new file mode 100644 index 0000000000000000000000000000000000000000..52e4af905709e2e61e7eb83435a52e8f7fcbb86a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0036.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 ComponentTextRicheditorPlaceholder0036{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '901' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0036') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0037.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0037.ets new file mode 100644 index 0000000000000000000000000000000000000000..26e4e4721a5e884bd33aa19eda00d34261ee73c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0037.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 ComponentTextRicheditorPlaceholder0037{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '100.6' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0037') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0038.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0038.ets new file mode 100644 index 0000000000000000000000000000000000000000..aba0960e3189f3c96dab475788095576b863c03c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0038.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 ComponentTextRicheditorPlaceholder0038{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: '0b1100100' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0038') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0039.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0039.ets new file mode 100644 index 0000000000000000000000000000000000000000..97ef6328f54b8b5bc0a1c6fe201e9ab74d5f3be5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0039.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 ComponentTextRicheditorPlaceholder0039{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 'abedefg' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0039') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..92030612be5988caa86b0ae17dd20460adf49b45 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0040.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 ComponentTextRicheditorPlaceholder0040{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 900 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0040') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0041.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0041.ets new file mode 100644 index 0000000000000000000000000000000000000000..2fd41e0f6e8f44e651f924e2b7fd34cb410b703b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0041.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 ComponentTextRicheditorPlaceholder0041{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 400 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0041') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0042.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0042.ets new file mode 100644 index 0000000000000000000000000000000000000000..57833907238d1ef7cc6df570fb8870e69e627dc5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0042.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 ComponentTextRicheditorPlaceholder0042{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 100 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0042') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0043.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0043.ets new file mode 100644 index 0000000000000000000000000000000000000000..6569b7b77f95f103d2c33dd6b589479a16ef52fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0043.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 ComponentTextRicheditorPlaceholder0043{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 0b1100100 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0043') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0044.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0044.ets new file mode 100644 index 0000000000000000000000000000000000000000..58458d317563a73b235ef1772a14d463dbfcb799 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0044.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 ComponentTextRicheditorPlaceholder0044{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: -100 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0044') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0045.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0045.ets new file mode 100644 index 0000000000000000000000000000000000000000..471b6b665a705f48c52c47819bee433c72cdf777 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0045.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 ComponentTextRicheditorPlaceholder0045{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 0 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0045') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0046.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0046.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd1371a5ceadd6753b3c62cce6a146c844ab8197 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0046.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 ComponentTextRicheditorPlaceholder0046{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 1000 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0046') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0047.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0047.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c67e49c9257b8af8f61592f7a0010ae0e75edfc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0047.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 ComponentTextRicheditorPlaceholder0047{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 99 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0047') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0048.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0048.ets new file mode 100644 index 0000000000000000000000000000000000000000..015aa5bcdbce236a36596fd3fe6517141150d8ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0048.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 ComponentTextRicheditorPlaceholder0048{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 901 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0048') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0049.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0049.ets new file mode 100644 index 0000000000000000000000000000000000000000..3badcd80e38bd518ed4e81a7e981efe52d62c678 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0049.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 ComponentTextRicheditorPlaceholder0049{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 900.6 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0049') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..96735da3ff074e4c7e7d469f1d108c73e71247a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0050.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 ComponentTextRicheditorPlaceholder0050{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 100.6 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0050') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0051.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0051.ets new file mode 100644 index 0000000000000000000000000000000000000000..a4c744bc2f5d7fc1c2e0d0605d964115aefb2f26 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0051.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 ComponentTextRicheditorPlaceholder0051{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 99.6 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0051') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0052.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0052.ets new file mode 100644 index 0000000000000000000000000000000000000000..5249c9cd374c90ff4e8dd972098c6ead1841a49b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0052.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 ComponentTextRicheditorPlaceholder0052{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: 499.9 + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0052') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0053.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0053.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f7fd09d1076fc375fa238704564e7297ecf9ae4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0053.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 ComponentTextRicheditorPlaceholder0053{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Lighter + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0053') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0054.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0054.ets new file mode 100644 index 0000000000000000000000000000000000000000..0305995a1e2ff24b8a9fb432835b1355ed02f6a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0054.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 ComponentTextRicheditorPlaceholder0054{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Normal + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0054') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0055.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0055.ets new file mode 100644 index 0000000000000000000000000000000000000000..03d7068642ec9fc46d4d86c072014fb286d8951c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0055.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 ComponentTextRicheditorPlaceholder0055{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Regular + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0055') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0056.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0056.ets new file mode 100644 index 0000000000000000000000000000000000000000..de8c9b0fd0113ae4d0f3316caca81d9d01b6c618 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0056.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 ComponentTextRicheditorPlaceholder0056{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Medium + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0056') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0057.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0057.ets new file mode 100644 index 0000000000000000000000000000000000000000..169e594584e08ae37581e576fdf0a35dda5ebc98 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0057.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 ComponentTextRicheditorPlaceholder0057{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Bold + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0057') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0058.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0058.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0c627335f279d4adf721eb98f2dbd5f7c528778 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0058.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 ComponentTextRicheditorPlaceholder0058{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + weight: FontWeight.Bolder + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0058') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0059.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0059.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6c3af591d2b91c56054f5afd5afe15ece80224d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0059.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 ComponentTextRicheditorPlaceholder0059{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + family: 'HarmonyOS Sans' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0059') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..f86ab81bce53dcef79b6289194409b7001daa77a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0060.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 ComponentTextRicheditorPlaceholder0060{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + family: 'abcdefg' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0060') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0061.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0061.ets new file mode 100644 index 0000000000000000000000000000000000000000..693af90c5a3b297547c89daacfaed7b7dfb6db56 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0061.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 ComponentTextRicheditorPlaceholder0061{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + family: getContext().resourceManager.getStringSync($r('app.string.fontfamily_1')) + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0061') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0062.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0062.ets new file mode 100644 index 0000000000000000000000000000000000000000..43350cea0c723c06128635e173d66f86b05ffb5a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0062.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 ComponentTextRicheditorPlaceholder0062{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Gray, + font: { + family: 'cat.jpg' + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0062') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0063.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0063.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdd19689a1028dc1d04e0fbc5f5a3483c5e24e34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0063.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 ComponentTextRicheditorPlaceholder0063{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: Color.Orange, + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0063') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0064.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0064.ets new file mode 100644 index 0000000000000000000000000000000000000000..0daa3eb9f42956dad136fd2c0a9befcda9b8085c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0064.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 ComponentTextRicheditorPlaceholder0064{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: 0x0000ff + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0064') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0065.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0065.ets new file mode 100644 index 0000000000000000000000000000000000000000..774f5fd796c13cd2c538f3bfad1d6eb362416cdc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0065.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 ComponentTextRicheditorPlaceholder0065{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: 'Oxffffffeeeee' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0065') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0066.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0066.ets new file mode 100644 index 0000000000000000000000000000000000000000..8abff3b796ad729ca51fc250aa9feb378b8aa64e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0066.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 ComponentTextRicheditorPlaceholder0066{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor: 10000 + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0066') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0067.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0067.ets new file mode 100644 index 0000000000000000000000000000000000000000..b39dfb68d64a9ec60901ed92aab8e25f4fee68b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0067.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 ComponentTextRicheditorPlaceholder0067{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:10000.5 + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0067') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0068.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0068.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a7c1e2d746768690730ca3344faec162f3a43db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0068.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 ComponentTextRicheditorPlaceholder0068{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:-15 + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0068') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0069.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0069.ets new file mode 100644 index 0000000000000000000000000000000000000000..afd4311a6c245238ed5504662fee95f209269194 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0069.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 ComponentTextRicheditorPlaceholder0069{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'#00ffff' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0069') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d3036ae11cf1efec2b2a91ec816f70a91c48160 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0070.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 ComponentTextRicheditorPlaceholder0070{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'#ffffff00' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0070') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0071.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0071.ets new file mode 100644 index 0000000000000000000000000000000000000000..4b1cd32aa6dd18afff3d6e498c604b6b27ed9d34 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0071.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 ComponentTextRicheditorPlaceholder0071{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'rgb(255,0,255)' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0071') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0072.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0072.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff859eaeb8be0351f382e5e624a899f4a9a828ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0072.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 ComponentTextRicheditorPlaceholder0072{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'rgba(0,0,255,0.5)' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0072') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0073.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0073.ets new file mode 100644 index 0000000000000000000000000000000000000000..14ac0d0b1f4598422d5e6e5d164722099a6bd611 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0073.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 ComponentTextRicheditorPlaceholder0073{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'#0cccccc' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0073') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0074.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0074.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae60d6765b276c524482e399e5eeb894321db365 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0074.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 ComponentTextRicheditorPlaceholder0074{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'rgba(255,0,255,2)' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0074') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0075.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0075.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d70b922e357c352111813ed9f7ae25af7e545ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0075.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 ComponentTextRicheditorPlaceholder0075{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'rgb(255,0,300)' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0075') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0076.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0076.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3554ff29c076c39118d77c91a57039490e627c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0076.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 ComponentTextRicheditorPlaceholder0076{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'abcdefg' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0076') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0077.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0077.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad242595cfc134df85254cd1b4b12c024e17464e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0077.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 ComponentTextRicheditorPlaceholder0077{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:getContext().resourceManager.getColorSync($r('app.color.yellow')) + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0077') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0078.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0078.ets new file mode 100644 index 0000000000000000000000000000000000000000..2217df65888c531e31b0ef91fbbefcd92616179b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0078.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 ComponentTextRicheditorPlaceholder0078{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("input...", { + fontColor:'cat.jpg' + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0078') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079.ets new file mode 100644 index 0000000000000000000000000000000000000000..34d603646b5f773f7aec38e304aed71f599e97ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079.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 ComponentTextRicheditorPlaceholder0079 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontSize: number = 20; + @State fontWeight: number = 100; + @State fontFamily: string = ''; + @State fontColor: Color = Color.Red; + @State fontStyle: FontStyle = FontStyle.Normal; + @State fontValue: ResourceStr = '点击改变属性'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.fontValue, { + fontColor:this.fontColor, + font:{ + family:this.fontFamily, + size:this.fontSize, + style:this.fontStyle, + weight:this.fontWeight + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0079') + .width(100) + .height(300) + Button('changeFeature') + .id('changeFeature') + .width(100) + .height(30) + .onClick(() => { + this.fontSize = 30; + this.fontWeight = 500; + this.fontColor = Color.Green; + this.fontValue = '我被点击了,我也改变了'; + this.fontStyle = FontStyle.Italic; + this.fontFamily = getContext().resourceManager.getStringSync($r('app.string.fontfamily_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/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079_932.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079_932.ets new file mode 100644 index 0000000000000000000000000000000000000000..a227eb891acfc4c8d7e98483cf04ce618fe4a14f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079_932.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 ComponentTextRicheditorPlaceholder0079_932 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontSize: number = 20; + @State fontWeight: number = 100; + @State fontFamily: string = ''; + @State fontColor: Color = Color.Red; + @State fontStyle: FontStyle = FontStyle.Normal; + @State fontValue: ResourceStr = '点击改变属性'; + + build() { + Column() { + RichEditor(this.options) + .placeholder('tips', { + }) + .onReady(()=>{ + this.controller.addTextSpan('add span',{ + + }) + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0079_932') + .width(100) + .height(300) + Button('changeFeature') + .id('changeFeature') + .width(100) + .height(30) + .onClick(() => { + this.controller.deleteSpans({ + }); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9e79bfeaaea1c9e9b76c228ab78eb206199efe0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0080.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 ComponentTextRicheditorPlaceholder0080 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State fontSize: number = 20; + @State fontWeight: number = 100; + @State fontFamily: string = ''; + @State fontColor: Color = Color.Red; + @State fontStyle: FontStyle = FontStyle.Normal; + @State fontValue: ResourceStr = '点击改变属性'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.fontValue, { + fontColor:this.fontColor, + font:{ + family:this.fontFamily, + size:this.fontSize, + style:this.fontStyle, + weight:this.fontWeight + } + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0080') + .width(100) + .height(300) + Button('changeFeature') + .id('changeFeature') + .width(100) + .height(30) + .onClick(() => { + this.fontSize = this.fontSize ++; + this.fontWeight =this.fontWeight ++; + this.fontColor = Color.Green; + this.fontValue = '我被点击了,我也改变了'; + this.fontStyle = FontStyle.Italic; + this.fontFamily = getContext().resourceManager.getStringSync($r('app.string.fontfamily_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/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0081.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0081.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d6384a5955aa6ef615a3454701fa92466157a4a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0081.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 ComponentTextRicheditorPlaceholder0081{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("这是提示", { + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0081') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0082.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0082.ets new file mode 100644 index 0000000000000000000000000000000000000000..009fa5f0f02457407de3f3af3dfe4825286ab1c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0082.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 ComponentTextRicheditorPlaceholder0082 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0082') + .width(100) + .height(300) + TextInput() + .id('change') + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0083.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0083.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9e3fd62f0f7359329b968592813053584de7555 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0083.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 ComponentTextRicheditorPlaceholder0083{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0083') + .width(100) + .height(300) + TextInput() + .id('change') + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0084.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0084.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3a35fa0cd6e526f30fa300f4d2367fd83bc8392 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0084.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 ComponentTextRicheditorPlaceholder0084{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder("这是水印", { + }) + .borderWidth(1) + .borderColor(Color.Red) + .key('ComponentTextRicheditorPlaceholder0084') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0085.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0085.ets new file mode 100644 index 0000000000000000000000000000000000000000..203138dfb87958a38493362e27d09540c14bca87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0085.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 ComponentTextRicheditorPlaceholder0085{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .onReady(()=>{ + this.controller.addTextSpan('',{ + + }) + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0085') + .width(100) + .height(300) + TextInput() + .id('change') + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0086.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0086.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5063c5088bbc4fbdbf6e934ae898b2492eb4f81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0086.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 ComponentTextRicheditorPlaceholder0086{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .draggable(true) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0086') + .width(100) + .height(50) + TextInput() + .id('change') + .draggable(true) + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0087.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0087.ets new file mode 100644 index 0000000000000000000000000000000000000000..7166c7325e3766f93110fa6d507b06c56c0003d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0087.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 ComponentTextRicheditorPlaceholder0087{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0087') + .width(100) + .height(300) + TextInput() + .id('change') + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0088.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0088.ets new file mode 100644 index 0000000000000000000000000000000000000000..c894d73b057e0747e266d7be5c9e2228f80f5f5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0088.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 ComponentTextRicheditorPlaceholder0088{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = 'input'; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0088') + .width(100) + .height(300) + TextInput() + .id('change') + .onChange((value: string) => { + this.tips = value; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0089.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0089.ets new file mode 100644 index 0000000000000000000000000000000000000000..a77e8265559338778283ed113136dc44a8a6dd6b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0089.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 ComponentTextRicheditorPlaceholder0089{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0089') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..c79b7a8931e9568e16e74e6226a1a2d7ca9a3423 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0090.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 ComponentTextRicheditorPlaceholder0090{ + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0090') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0091.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0091.ets new file mode 100644 index 0000000000000000000000000000000000000000..57e19fd09a1e4f0a1e8e0a3326d2eab1d5314a18 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0091.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 ComponentTextRicheditorPlaceholder0091 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + @Builder + builder() { + Text("hello").padding('20').borderWidth(1).width('100%'); + } + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .onReady(() => { + this.controller.addTextSpan('1234', + {}); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addBuilderSpan(() => { + this.builder(); + }); + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0091') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0092.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0092.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed637f59acbe2a09e99d72dd154fcfc71c7ed018 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0092.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 ComponentTextRicheditorPlaceholder0092 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + @Builder + builder() { + Text("hello").padding('20').borderWidth(1).width('100%'); + } + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .onReady(() => { + this.controller.addTextSpan('1', + {}); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addBuilderSpan(() => { + this.builder(); + }); + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0092') + .width(100) + .height(300) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0093.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0093.ets new file mode 100644 index 0000000000000000000000000000000000000000..9747a80ac24d0d7002f2ff5886c2f94c65c9d505 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0093.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 ComponentTextRicheditorPlaceholder0093 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + @Builder + builder() { + Text("hello").padding('20').borderWidth(1).width('100%'); + } + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .onReady(() => { + this.controller.addTextSpan('1', + {}); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addBuilderSpan(() => { + this.builder(); + }); + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0093') + .width(100) + .height(300) + Button('delete') + .id('delete') + .width(100) + .height(30) + .onClick(() => { + this.controller.deleteSpans(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0094.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0094.ets new file mode 100644 index 0000000000000000000000000000000000000000..313e14b454eb1475119dbab11c65e506ee7b0409 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0094.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 ComponentTextRicheditorPlaceholder0094 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + @Builder + builder() { + Text("hello").padding('20').borderWidth(1).width('100%'); + } + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0094') + .width(100) + .height(300) + Button('add') + .id('add') + .width(100) + .height(30) + .onClick(() => { + this.controller.addTextSpan('1', + {}); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addBuilderSpan(() => { + this.builder(); + }); + }) + }; + + Button('delete') + .id('delete') + .width(100) + .height(30) + .onClick(() => { + this.controller.deleteSpans(); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0095.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0095.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6310626999448d3aca3d9685000f61659028564 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0095.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. + */ +import { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0095 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State tips: string = '这是提示'; + + 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) { + } + ; + } + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder(this.tips, {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0095') + .width('50%') + .height('10%') + Button('setContent') + .id('setContent') + .width(100) + .height(30) + .onClick(() => { + this.tips = 'zhognguoahjdoha dnao oadjiafnofofnoasdfofaonafsnfudsfofdccvc v vccv mdfsj'; + this.setOrientation(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0097.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0097.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f7d0ad4a14610d176de689d5318bb4fc0f8b8c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0097.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0097 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .onReady(() => { + this.controller.addTextSpan('1', + { + + }); + this.controller.updateParagraphStyle({ + style: { + textAlign:TextAlign.End + } + }); + }) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0097') + .width('50%') + .height('10%') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0098.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0098.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b2ec15be4655a0de44135a4df453663cc25b521 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0098.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0098 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .align(Alignment.BottomStart) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0098') + .width('50%') + .height('10%') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0099.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0099.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba29f2fffdde76084fcd90d22d6ffb9b2cba01cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0099.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 { window } from '@kit.ArkUI'; + + +@Entry +@Component +struct ComponentTextRicheditorPlaceholder0099 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .placeholder('这是提示文本', {}) + .borderWidth(1) + .borderColor(Color.Red) + .id('ComponentTextRicheditorPlaceholder0099') + .width('50%') + .height('10%') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..48b1b6446fa54a1683dbb2540eb7536271036da9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0010.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 ComponentTextRicheditorShortKcutKeys0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontColor: Color.Red, + fontStyle: FontStyle.Italic, + fontWeight: FontWeight.Bolder + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0010') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0010_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..7de27a3c2ff862c24ae26d874d2caecce9a74661 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0020.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 ComponentTextRicheditorShortKcutKeys0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0020') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0020_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d9a246d9241dc31e291892ed9e92ff670513e0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0030.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 ComponentTextRicheditorShortKcutKeys0030 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0030') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0030_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..59cdd7abd398e3d411bfa4cb1fce48b62ead46cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0040.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 ComponentTextRicheditorShortKcutKeys0040 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0040') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0040_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..a10531b09d988dd3924a2996143e908562a683b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0050.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 ComponentTextRicheditorShortKcutKeys0050 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + style: { + fontColor: Color.Red, + fontStyle: FontStyle.Italic, + fontWeight: FontWeight.Bolder + } + }) + }) + .id('ComponentTextRicheditorShortKcutKeys0050') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0050_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..9e49fec0145d13ebb2639686269853fdf1d4d4b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0060.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 ComponentTextRicheditorShortKcutKeys0060 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0060') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0060_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..25e4d433fe3bb0c4f54f3a453b4e85022ce4fb3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0070.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 ComponentTextRicheditorShortKcutKeys0070 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0070') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + this.controller1.addTextSpan('我爱你中国', + {}); + }) + .id('ComponentTextRicheditorShortKcutKeys0070_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..72d7d58a82512ee3d77bc1deb5dfbbd60391bac5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0080.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 ComponentTextRicheditorShortKcutKeys0080 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0080') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0080_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9924c96317d693f13027df9487f538cd2e43077 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0090.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 ComponentTextRicheditorShortKcutKeys0090 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0090') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0090_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0100.ets new file mode 100644 index 0000000000000000000000000000000000000000..72013516480b7a286d11b5d9a8c474c095a89f73 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0100.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 ComponentTextRicheditorShortKcutKeys0100 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0100') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0100_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0110.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e79346a85d64b8afbd2d1ed59da12c018c35a99 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0110.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 ComponentTextRicheditorShortKcutKeys0110 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0110') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0110_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0120.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9bc522a6e291c26229a861d289fa136cf97872b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0120.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 ComponentTextRicheditorShortKcutKeys0120 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人' + '\n'+ + '我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0120') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0120_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..93aef463088081e7281954446112e2f30df96b7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0130.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 ComponentTextRicheditorShortKcutKeys0130 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0130') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0130_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d409c0c22b729f0c231c231c341e3f9b5cd21f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0140.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 ComponentTextRicheditorShortKcutKeys0140 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0140') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0140_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..581f90dc2c70d44a715cf7c77765ee18f8c004e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0150.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 ComponentTextRicheditorShortKcutKeys0150 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0150') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + this.controller1.addTextSpan('我爱你中国', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0150_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..20a8756fb9542ce39f53c060bec37c6b332c6517 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0160.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 ComponentTextRicheditorShortKcutKeys0160 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0160') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + this.controller1.addTextSpan('我爱你中国', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0160_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..446904529e3b63c61991a46d0b9f58263688a1cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0170.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 ComponentTextRicheditorShortKcutKeys0170 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0170') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + this.controller1.addTextSpan('我爱你中国', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0170_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..cde4e455c48df1244fa5a8b9f5acb7afc7074865 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0180.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 ComponentTextRicheditorShortKcutKeys0180 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0180') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0180_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..c0878e1398b7b54982d94771b24e183844362af6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0190.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 ComponentTextRicheditorShortKcutKeys0190 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0190') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0190_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ade75a10aaa632ec6142fd5e05fe16b8fa0611b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0200.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorShortKcutKeys0200 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(40) + .onClick(()=>{ + this.controller.setSelection(-1,5); + }) + Button('select1') + .id('select1') + .width(100) + .height(40) + .onClick(()=>{ + this.controller.setSelection(-1,-1); + }) + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0200') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0200_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0210.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd5ed9dba73c3f0672245d61412e0cbfc9cd7426 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0210.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorShortKcutKeys0210 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(40) + .onClick(()=>{ + this.controller.setSelection(-1,1); + }) + Button('select1') + .id('select1') + .width(100) + .height(40) + .onClick(()=>{ + this.controller.setSelection(-1,-1); + }) + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0210') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0210_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..fdf8e3a52af345413e5fe6a68d4ff24b337bfe5a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0220.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 ComponentTextRicheditorShortKcutKeys0220 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0220') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0220_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..ab0fdf97be1bdb9e98dcca73b5e79b1492e36493 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0230.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 ComponentTextRicheditorShortKcutKeys0230 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(40) + .onClick(()=>{ + this.controller.setSelection(-1,3); + }) + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0230') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0230_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..3c51a13487c028abdb1e54264c5453248bdfdcc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0240.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 ComponentTextRicheditorShortKcutKeys0240 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0240') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0240_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..e2ffcd8684e4c46a4e20f222b27ba1544eb8368c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0260.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 ComponentTextRicheditorShortKcutKeys0260 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0260') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0260_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..670e1680e943958548e1e91396785836f6682733 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0270.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 ComponentTextRicheditorShortKcutKeys0270 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addImageSpan(('cat.jpg'), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0270') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0270_01') + .onPaste(() => { + this.controller1.stopEditing(); + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..0bcbd258fdb375a0034c05c2bb6cd86ba60d06a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0280.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 ComponentTextRicheditorShortKcutKeys0280 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人我是中国人', + { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0280') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0280_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e8f615ff116e280b3dbac28b35826c1aa8b56f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0290.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 ComponentTextRicheditorShortKcutKeys0290 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0290') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0290_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..c013f96004c7c7866db53a82d85a5bea42d3431e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0300.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 ComponentTextRicheditorShortKcutKeys0300 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0300') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0300_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..81a04e7c47722fcf529b16dcdcba517a906f30d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0310.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 ComponentTextRicheditorShortKcutKeys0310 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0310') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0310_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5d31e8227009ee58bf0714e401c17e8190ad5f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0320.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 ComponentTextRicheditorShortKcutKeys0320 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人'+'\n'+'我是中国人'+'\n'+'我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0320') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0320_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..39992215b66957a8f802198b89e531e5253cd0aa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0330.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 ComponentTextRicheditorShortKcutKeys0330 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人'+'\n'+'我是中国人'+'\n'+'我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0330') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0330_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbb7d83db5d68c2352c96507ebf84bf724cda92d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0340.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 ComponentTextRicheditorShortKcutKeys0340 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人'+'\n'+'我是中国人'+'\n'+'我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0340') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0340_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..957546b1bb11aa4ed442a58ebf61ddc49e5d096c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0350.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 ComponentTextRicheditorShortKcutKeys0350 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是中国人'+'\n'+'我是中国人'+'\n'+'我是中国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0350') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0350_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..e30e9c83cd4bdb9afd7aa95e069d3809092862c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0360.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 ComponentTextRicheditorShortKcutKeys0360 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0360') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0360_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f7ca426a002a6dd755777d0c560388336761628 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0370.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 ComponentTextRicheditorShortKcutKeys0370 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0370') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0370_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..762d1a3402b95bee42c416a98c72638e16a45922 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0380.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 ComponentTextRicheditorShortKcutKeys0380 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + controller1: RichEditorController = new RichEditorController(); + options1: RichEditorOptions = { controller: this.controller1 }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .borderWidth(2) + .borderColor(Color.Blue) + .width('100%') + .height('30%') + .onReady(() => { + this.controller.addTextSpan('我是国人', { + }); + }) + .id('ComponentTextRicheditorShortKcutKeys0380') + + RichEditor(this.options1) + .width('100%') + .height('50%') + .borderWidth(2) + .borderColor(Color.Red) + .margin({top:20}) + .onReady(() => { + }) + .id('ComponentTextRicheditorShortKcutKeys0380_01') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..ade2e51833be9dae5312bc34adeea2dc08044006 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0006.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 ComponentTextRicheditorUxConformance0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + decoration:{color:Color.Red,type:TextDecorationType.Overline} + } + }) + }) + .key('ComponentTextRicheditorUxConformance0006') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ce9ba011cdd8c3a2459870a8066057c6283e863 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0007.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 ComponentTextRicheditorUxConformance0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + fontColor:Color.Pink, + decoration:{color:Color.Red,type:TextDecorationType.Underline,style: TextDecorationStyle.SOLID } + } + }) + }) + .key('ComponentTextRicheditorUxConformance0007') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..33883ce4f0cc0ba1381e2027c51fc1d2afd7e188 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0011.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 ComponentTextRicheditorUxConformance0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .align(Alignment.Center) + .id('ComponentTextRicheditorUxConformance0011') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ab7e842f9d05c09b6def0eb65a8ffc128c02699 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0012.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 ComponentTextRicheditorUxConformance0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .key('ComponentTextRicheditorUxConformance0012') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..660ed546c18c2dee18563592e7dcca809bd1cfae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0013.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 ComponentTextRicheditorUxConformance0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .key('ComponentTextRicheditorUxConformance0013') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..a028e3ce49388296f3fdd32b615a5b9017597ced --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0014.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 ComponentTextRicheditorUxConformance0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(50) + .onClick(() => { + this.controller.setSelection(-1, 3); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + decoration: { color: Color.Red, type: TextDecorationType.Overline } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .key('ComponentTextRicheditorUxConformance0014') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a2dc251ef9cb25a1ec524982dc5a910d460f6ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0015.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 ComponentTextRicheditorUxConformance0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(50) + .onClick(() => { + this.controller.setSelection(-1, 3); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + decoration: { color: Color.Red, type: TextDecorationType.Overline } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .key('ComponentTextRicheditorUxConformance0015') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e14f943b68f0c314d60d23b7c47fb97c21dac41 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0016.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 ComponentTextRicheditorUxConformance0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + Button('select') + .id('select') + .width(100) + .height(50) + .onClick(() => { + this.controller.setSelection(-1, 3); + }) + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('我是中国人', { + style: { + decoration: { color: Color.Red, type: TextDecorationType.Overline } + } + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"], + } + }); + }) + .key('ComponentTextRicheditorUxConformance0016') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0001.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0001.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7d6030828f27f90e1386453290833df07440ed2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0001.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 ComponentTextRicheditorWordbreak0001 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak 无属性设置-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak不设置属性属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .key('ComponentTextRicheditorWordbreak0001') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0002.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0002.ets new file mode 100644 index 0000000000000000000000000000000000000000..813d91cebc5926c023f3dbaf5be133e06e993a22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0002.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 ComponentTextRicheditorWordbreak0002 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak:WordBreak.NORMAL + } + }) + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak设置“WordBreak.NORMAL”属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .key('ComponentTextRicheditorWordbreak0002') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0003.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0003.ets new file mode 100644 index 0000000000000000000000000000000000000000..143854e424e3f2d165a80811a0739ea00df9e686 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0003.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 ComponentTextRicheditorWordbreak0003 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak:-1 + } + }) + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak设置"-1"属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + .key('ComponentTextRicheditorWordbreak0003') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0004.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0004.ets new file mode 100644 index 0000000000000000000000000000000000000000..e05e68d42f28aa2f94e2a718339d3a09b77aeea6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0004.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 ComponentTextRicheditorWordbreak0004 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak:WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0004') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateParagraphStyle({ start: -1, end: -1, + style: { + wordBreak:null + } + }) + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak更改为不设置属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0005.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0005.ets new file mode 100644 index 0000000000000000000000000000000000000000..d42f25ba0af2b5e705e569527aae2a9db11655a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0005.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 ComponentTextRicheditorWordbreak0005 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + }) + }) + .id('ComponentTextRicheditorWordbreak0005') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateParagraphStyle({ start: -1, end: -1, + style: { + wordBreak:WordBreak.BREAK_ALL + } + }) + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak设置WordBreak.BREAK_ALL属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0006.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f328e8e1737644c1ee24b90e758fa3d1949159a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0006.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 ComponentTextRicheditorWordbreak0006 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak-', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + }) + }) + .id('ComponentTextRicheditorWordbreak0006') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateParagraphStyle({ start: -1, end: -1, + style: { + wordBreak:-1 + } + }); + let wordBreak = JSON.stringify(this.controller.getParagraphs({ start: -1, end: -1 })[0].style.wordBreak); + this.controller.addTextSpan('wordBreak设置-1属性值:'+wordBreak, { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0007.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0007.ets new file mode 100644 index 0000000000000000000000000000000000000000..7584a12cab15e4ac7a28334b220beb14070bb143 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0007.ets @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorWordbreak0007 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addTextSpan('中国人あなたのことが好きです사랑해', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + + }); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorWordbreak0007') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0008.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0008.ets new file mode 100644 index 0000000000000000000000000000000000000000..e729a437230f764381c9d3fa40b6b2a2bf2cfc0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0008.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 ComponentTextRicheditorWordbreak0008 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_ALL + } + }) + this.controller.addTextSpan('中国人あなたのことが好きです사랑해', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_ALL + } + }) + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_ALL + } + }) + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_ALL + } + }) + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + }) + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }) + }) + .id('ComponentTextRicheditorWordbreak0008') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0009.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0009.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d2b137c933c9d1c5d0a34c50bd5ba7ec7f93ede --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0009.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 ComponentTextRicheditorWordbreak0009 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_WORD + } + }); + this.controller.addTextSpan('中国人あなたのことが好きです사랑해', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_WORD + } + }); + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_WORD + } + }); + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.BREAK_WORD + } + }); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + }) + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }); + }) + .id('ComponentTextRicheditorWordbreak0009') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..f526dba9196ff8c94656a2938ca0ad68fb341ac4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0010.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 ComponentTextRicheditorWordbreak0010 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('testwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0010') + .clip(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/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0011.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0011.ets new file mode 100644 index 0000000000000000000000000000000000000000..21e8da7a978b9b81f30e947307c2bf45ce059016 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0011.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 ComponentTextRicheditorWordbreak0011 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('testwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbrea 中国人あなたのことが好きです사랑해中国人あなたのことが好きです사랑해testwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbrea中国人あなたのことが好きです사랑해中国人あなたのことが好きです사랑해testwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbreakwordbrea'+'\n'+'中国人あなたのことが好きです사랑해中国人あなたのことが好きです사랑해', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL|WordBreak.BREAK_ALL|WordBreak.BREAK_WORD + } + }) + }) + .id('ComponentTextRicheditorWordbreak0011') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0012.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0012.ets new file mode 100644 index 0000000000000000000000000000000000000000..98a656328ad47cb326a2ddbc5f67fea4e398c3ca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0012.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 ComponentTextRicheditorWordbreak0012 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('rdbreakwordなたのことがなたのことがなたのことが', { + }) + }) + .id('ComponentTextRicheditorWordbreak0012') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.getUIContext().getFocusController().clearFocus(); + this.controller.updateParagraphStyle({ start:this.controller.getSpans().length,end:-1, + style: { + wordBreak:WordBreak.NORMAL + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0013.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0013.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e4eb98d9022a932aa64073a05c9bd7b73bf2fff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0013.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 ComponentTextRicheditorWordbreak0013 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('rdbreakwordなたのことがなたのことがなたのことが', { + paragraphStyle:{ + wordBreak:WordBreak.BREAK_ALL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0013') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.getUIContext().getFocusController().clearFocus(); + this.controller.updateParagraphStyle({ start:this.controller.getSpans().length,end:-1, + style: { + wordBreak:WordBreak.NORMAL + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0014.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0014.ets new file mode 100644 index 0000000000000000000000000000000000000000..86d5aeb7968aa19ef079f73a2ec097821a22fd22 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0014.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 ComponentTextRicheditorWordbreak0014 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + }) + .id('ComponentTextRicheditorWordbreak0014') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.getUIContext().getFocusController().clearFocus(); + this.controller.updateParagraphStyle({ start:-1,end:-1, + style: { + wordBreak:WordBreak.NORMAL + } + }); + this.controller.updateParagraphStyle({ start:4,end:-1, + style: { + wordBreak:WordBreak.BREAK_ALL + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0015.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0015.ets new file mode 100644 index 0000000000000000000000000000000000000000..010b2fedec556676abdef05502912c68fe6a8d3c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0015.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 ComponentTextRicheditorWordbreak0015 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('rdbreakwordなたのことがなたのことがなたのことがrdbreakwordなたのことがなたのことがな 中国 たのことがrdb re akwordなたのことがなたのことがなたのことがrdbreakwordなたのことがなたのことがなたのことが', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL, + } + }) + }) + .id('ComponentTextRicheditorWordbreak0015') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateParagraphStyle({ start:20,end:50, + style: { + wordBreak:WordBreak.BREAK_ALL + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0016.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0016.ets new file mode 100644 index 0000000000000000000000000000000000000000..0614cb8b264e09be5e64d5767801d5b77c193b81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0016.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorWordbreak0016 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + @State heightRich : number = 50; + @State widthRich : number = 300; + + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addTextSpan('中国人あなたのことが好きです사랑해jhsfdhhhhhjhjhh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle:{ + wordBreak:WordBreak.NORMAL + } + }); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + + }) + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }) + }) + .id('ComponentTextRicheditorWordbreak0016') + .width(this.widthRich) + .height(this.heightRich) + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.heightRich =100; + this.widthRich = 500; + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0017.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0017.ets new file mode 100644 index 0000000000000000000000000000000000000000..93a5bca6d2805ebdb40fd4e1f3faa5ce09a2cf78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0017.ets @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct ComponentTextRicheditorWordbreak0017 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('test wordbreak', { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }); + this.controller.addTextSpan('中国人あなたのことが好きです사랑해jhsfdhhhhhjhjhh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }); + + this.controller.addTextSpan('\uD83D\uDE00', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }); + this.controller.addTextSpan('#$%&@', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }); + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + {}); + this.controller.addImageSpan(("cat.jpg"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }) + }) + .id('ComponentTextRicheditorWordbreak0017') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.updateSpanStyle({ + textStyle: + { + fontSize: 40 + } + }) + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0018.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0018.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd78dd44ae9f242e3b8da745d0a3833083c21480 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0018.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 ComponentTextRicheditorWordbreak0018 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あな たのことが好きで す사랑해jhsfdhh hh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0018') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0019.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0019.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cfee944fd3de045beb145ec66d496184383d229 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0019.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 ComponentTextRicheditorWordbreak0019 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あ', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0019') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..04e9a70d4a61748d698133c69f993036fb0262a6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0020.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 ComponentTextRicheditorWordbreak0020 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あadffgsdgfdh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0020') + Button('updateParagraphStyle', { + buttonStyle: ButtonStyleMode.NORMAL + }) + .id('updateParagraphStyle') + .height(30) + .fontSize(13) + .onClick(() => { + this.controller.deleteSpans({ start:7,end:-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/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0021.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0021.ets new file mode 100644 index 0000000000000000000000000000000000000000..88032312cf8c5d7722a707a3d84cc4ca8cb2eb36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0021.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 ComponentTextRicheditorWordbreak0021 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あadffgsdgfdh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0021') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0022.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0022.ets new file mode 100644 index 0000000000000000000000000000000000000000..3bf22799602214fb7c342e1bd0c2f62eea77c76e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0022.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 ComponentTextRicheditorWordbreak0022 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + + build() { + Row() { + Column() { + TextArea({text:"我是TextArea"}).draggable(true).width(100).height(50).id('TextArea'); + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan('中国人あadffgsdgfdh', + { + style: { + fontStyle: FontStyle.Normal, + fontColor: Color.Black, + fontSize: 15, + }, + paragraphStyle: { + wordBreak: WordBreak.NORMAL + } + }) + }) + .id('ComponentTextRicheditorWordbreak0022') + .draggable(true) + .width(200) + .height(50) + } + .width('100%') + .height('100%') + } + } +} \ 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/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..e58bd507f3ecff51931c351ebcabf6603cd5c40c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/module.json5 @@ -0,0 +1,54 @@ +{ + "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.WRITE_MEDIA" + }, + { + "name": "ohos.permission.READ_MEDIA" + }, + { + "name":"ohos.permission.UPDATE_CONFIGURATION" + }, + { + "name":"ohos.permission.RUNNING_LOCK" + }, + { + "name":"ohos.permission.INTERNET" + } + ], + "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..989acc491a1f2c97ded461ca1dc60a58faa0b666 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "boardSize_10", + "value": "10" + } + ] +} \ 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..4e5dc1f07e9f34d3eef407ede05120f2161efba4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json @@ -0,0 +1,60 @@ +{ + "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_20", + "value": "20" + } + ] +} \ 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..6b8f2a77c748f64f8b38fb5f0bda6260ee1d8268 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -0,0 +1,457 @@ +{ + "src": [ + "testability/pages/Index", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0001", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0002", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0003", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0004", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0005", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0006", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0007", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0008", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0009", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0010", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0011", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0012", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0013", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0014", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0015", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0016", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0017", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0018", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0019", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0020", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0021", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0022", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0023", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0024", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0025", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0026", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0027", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0028", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0029", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0030", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0031", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0032", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0033", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0034", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0035", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0036", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0037", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0038", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0039", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0040", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0041", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0042", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0043", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0044", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0045", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0046", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0047", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0048", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0049", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0050", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0051", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0052", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0053", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0054", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0055", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0056", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0057", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0058", + "testability/pages/ComponentTextRicheditorFontfeatureTest/ComponentTextRicheditorFontfeature0059", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0001", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0002", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0003", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0004", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0005", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0006", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0007", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0008", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0009", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0010", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0011", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0012", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0013", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0014", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0015", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0016", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0017", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0018", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0019", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0020", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0021", + "testability/pages/ComponentTextRicheditorWordbreakTest/ComponentTextRicheditorWordbreak0022", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0001", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0002", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0003", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0004", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0005", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0006", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0007", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0008", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0009", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0010", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0011", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0012", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0013", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0014", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0015", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0016", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0017", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0018", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0019", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0020", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0021", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0022", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0023", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0025", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0026", + "testability/pages/ComponentTextRicheditorCustomColorsTest/ComponentTextRicheditorCustomColor0028", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0001", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0002", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0003", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0004", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0005", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0006", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0007", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0008", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0009", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0010", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0011", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0012", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0013", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0014", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0015", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0016", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_157_029", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0017_429_005", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0018", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0019", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0020", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0021", + "testability/pages/ComponentTextRicheditorLongPresstoselectallTest/ComponentTextRicheditorLongPresstoselectall0022", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0001", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0002", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0003", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0004", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0005", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0006", + "testability/pages/ComponentTextRicheditorOnWillChangeTest/ComponentTextRicheditorOnWillChange0007", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0001", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0002", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0003", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0004", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0005", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0006", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0007", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0008", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0009", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0010", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0011", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0012", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0013", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0016", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0017", + "testability/pages/ComponentTextRicheditorCustomkeyBoardAvoidAnceTest/ComponentTextRicheditorCustomkeyBoardAvoidAnce0019", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0014", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0019", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0020", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0021", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0022", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0023", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0024", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0025", + "testability/pages/ComponentTextRicheditorLineHeightLetterSpacing/ComponentTextRicheditorLineHeightLetterSpacing0026", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0001", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0002", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0003", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0004", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0012", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0013", + "testability/pages/ComponentTextRicheditorKeyboardReinForcingTest/ComponentTextRicheditorKeyboardReinForcing0015", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0006", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0007", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0011", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0012", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0013", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0014", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0015", + "testability/pages/ComponentTextRicheditorUxConformanceTest/ComponentTextRicheditorUxConformance0016", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0010", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0020", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0030", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0040", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0050", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0060", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0070", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0080", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0090", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0100", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0110", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0120", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0130", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0140", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0150", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0160", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0170", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0180", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0190", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0200", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0210", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0220", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0230", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0240", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0250", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0260", + "testability/pages/ComponentTextRicheditorAITest/ComponentTextRicheditorAI0270", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0340", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0350", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0360", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0410", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0420", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0430", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0440", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0450", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0460", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0470", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0480", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0490", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0500", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0510", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0520", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0530", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0540", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0550", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0560", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0570", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0580", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0590", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0600", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0610", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0620", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0630", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0640", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0650", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0660", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0670", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0680", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0690", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0700", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0710", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0720", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0730", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0740", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0750", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0760", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0770", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0780", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0790", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0800", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0810", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0820", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0830", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0840", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0850", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0860", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0870", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0880", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0890", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0900", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0910", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0920", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0930", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0940", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0950", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0960", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0970", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0980", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface0990", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1000", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1010", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1020", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1030", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1040", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1050", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1060", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1070", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1080", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1090", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1100", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1110", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1120", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1130", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1140", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1150", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1160", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1170", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1180", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1190", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1200", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1210", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1220", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1230", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1240", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1250", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1260", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1270", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1280", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1290", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1300", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1310", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1320", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1330", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1340", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1350", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1360", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1380", + "testability/pages/ComponentTextRicheditorInterface/ComponentTextRicheditorInterface1400", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0010", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0020", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0030", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0040", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0050", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0060", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0070", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0080", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0090", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0100", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0110", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0120", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0130", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0140", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0150", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0160", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0170", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0180", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0190", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0200", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0210", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0220", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0230", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0240", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0260", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0270", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0280", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0290", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0300", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0310", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0320", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0330", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0340", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0350", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0360", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0370", + "testability/pages/ComponentTextRicheditorShortKcutKeys/ComponentTextRicheditorShortKcutKeys0380", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0001", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0002", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0003", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0004", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0005", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0006", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0007", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0008", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0009", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0010", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0011", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0012", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0013", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0014", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0015", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0016", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0017", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0018", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0019", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0020", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0021", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0022", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0023", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0024", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0025", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0026", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0027", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0028", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0029", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0030", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0031", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0032", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0033", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0034", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0035", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0036", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0037", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0038", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0039", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0040", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0041", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0042", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0043", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0044", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0045", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0046", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0047", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0048", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0049", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0050", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0051", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0052", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0053", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0054", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0055", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0056", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0057", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0058", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0059", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0060", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0061", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0062", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0063", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0064", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0065", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0066", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0067", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0068", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0069", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0070", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0071", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0072", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0073", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0074", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0075", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0076", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0077", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0078", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0079_932", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0080", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0081", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0082", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0083", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0084", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0085", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0086", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0087", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0088", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0089", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0090", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0091", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0092", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0093", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0094", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0095", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0097", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0098", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder0099", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00100", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00101", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00102", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00103_040_934", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00104", + "testability/pages/ComponentTextRicheditorPlaceholderTest/ComponentTextRicheditorPlaceholder00105" + ] +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/dark/element/dark.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/dark/element/dark.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/dark/element/dark.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/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/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