diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/List.test.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/List.test.ets index 176ed795b8cb4f14cbb140631be1b4ee442df1f2..fe9572bab95fd4f2f09b6cb303630174783d802b 100644 --- a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/List.test.ets +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/List.test.ets @@ -60,10 +60,15 @@ import UIComponentSpecialComponentsEmbeddedComponent from './UIComponentSpecialComponentsEmbeddedComponentTest/UIComponentSpecialComponentsEmbeddedComponent.test'; import UIComponentSpecialComponentsEmbeddedComponentWidthAndHeight from './UIComponentSpecialComponentsEmbeddedComponentWidthAndHeightTest/UIComponentSpecialComponentsEmbeddedComponentWidthAndHeight.test'; +import UIComponentSpecialComponentsUIContextAddMenuFocus + from './UIComponentSpecialComponentsUIContextAddMenuFocusTest/UIComponentSpecialComponentsUIContextAddMenuFocus.test'; +import UIComponentSpecialComponentsUIContextComponentSnapshot + from './UIComponentSpecialComponentsUIContextComponentSnapshotTest/UIComponentSpecialComponentsUIContextComponentSnapshot.test'; import UIComponentSpecialComponentsXComponentOnload from './UIComponentSpecialComponentsXComponentOnloadTest/UIComponentSpecialComponentsXComponentOnload.test'; import UIComponentSymbolGlyphFontSizeScale from './UIComponentSymbolGlyphFontSizeScaleTest/UIComponentSymbolGlyphFontSizeScale.test'; +import UIComponentTextChipInterface from './UIComponentTextChipInterfaceTest/UIComponentTextChipInterface.test'; import UIComponentTextRichEditorAction from './UIComponentTextRichEditorActionTest/UIComponentTextRichEditorAction.test'; import UIComponentTextRichEditorInterface @@ -115,4 +120,7 @@ export default function testsuite() { UIComponentScrollPullDown(); UIComponentWaterFlowMirror(); UIComponentWaterFlowSections(); + UIComponentSpecialComponentsUIContextComponentSnapshot(); + UIComponentSpecialComponentsUIContextAddMenuFocus(); + UIComponentTextChipInterface(); } \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentDrawingSafeAreaETest/UIComponentDrawingSafeAreaE.test.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentDrawingSafeAreaETest/UIComponentDrawingSafeAreaE.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ac8541cef8acc095f4485be9555e07ae78ecdde --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/test/UIComponentDrawingSafeAreaETest/UIComponentDrawingSafeAreaE.test.ets @@ -0,0 +1,1008 @@ +/** + * Copyright (c) 2025 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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, Level } from '@ohos/hypium'; +import { BusinessError, commonEventManager } from '@kit.BasicServicesKit'; +import { Driver, ON ,Component, UiWindow } from '@kit.TestKit'; +import { screen, uiAppearance } from '@kit.ArkUI'; +import Settings from '../model/Settings'; +import windowSnap from '../model/snapShot'; +import Logger from '../model/Logger'; +import Utils from '../model/Utils'; + + +let TAG = 'RunTimeTest'; + +function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export default function UIComponentDrawingSafeAreaE() { + describe('UIComponentDrawingSafeAreaE', () => { + beforeAll(() => { + + }) + beforeEach(() => { + + }) + + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error(`[${TAG}_afterEach]`, `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info(`[${TAG}_afterEach]`, `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + afterAll(() => { + + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0010 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0010 + * @tc.desc Add component set SafeAreaPadding property and dynamically modify upward parameters + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0010', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0010'; + let pageName = "UIComponentDrawingSafeAreaE0010"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0020 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0020 + * @tc.desc Add component set SafeAreaPadding property and dynamically modify downward parameters + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0020', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0020'; + let pageName = "UIComponentDrawingSafeAreaE0020"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0030 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0030 + * @tc.desc Add component set SafeAreaPadding property and dynamically modify left parameters + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0030', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0030'; + let pageName = "UIComponentDrawingSafeAreaE0030"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0040 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0040 + * @tc.desc Add component set SafeAreaPadding property and dynamically modify right parameters + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0040', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0040'; + let pageName = "UIComponentDrawingSafeAreaE0040"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0050 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0050 + * @tc.desc Add component configure SafeAreaPadding and dynamically modify all four directional parameters + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0050', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0050'; + let pageName = "UIComponentDrawingSafeAreaE0050"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0060 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0060 + * @tc.desc Add Image component set SafeAreaPadding Margin Padding properties and dynamically change SafeAreaPadding + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0060', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0060'; + let pageName = "UIComponentDrawingSafeAreaE0060"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0070 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0070 + * @tc.desc Add Image component set SafeAreaPadding Margin properties and dynamically change SafeAreaPadding + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0070', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0070'; + let pageName = "UIComponentDrawingSafeAreaE0070"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0080 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0080 + * @tc.desc Add Image component set SafeAreaPadding Padding properties and dynamically change SafeAreaPadding + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0080', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0080'; + let pageName = "UIComponentDrawingSafeAreaE0080"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0090 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0090 + * @tc.desc Support SafeAreaPadding in landscape-portrait switching + * @tc.level 0 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0090', Level.LEVEL0, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0090'; + let pageName = "UIComponentDrawingSafeAreaE0090"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + + let screenClass: screen.Screen | null = null; + screen.getAllScreens(async (err: BusinessError, data: Array) => { + const errCode: number = err.code; + if (errCode) { + Logger.error(`[${TAG}]: Failed to get all screens. Code:${err.code},message is ${err.message}`); + return; + } + Logger.info(`[${TAG}]: Succeeded in getting all screens. Data:` + JSON.stringify(data)); + screenClass = data[0]; + screenClass.setOrientation(screen.Orientation.HORIZONTAL, (err: BusinessError) => { + const errCode: number = err.code; + if (errCode) { + Logger.error(`[${TAG}]: Failed to set the horizontal orientation. Code:${err.code},message is ${err.message}`); + return; + } + Logger.info(`[${TAG}]: Succeeded in setting the horizontal orientation.`); + }); + + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(2000, 3000); + await button.click(); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(); + + screenClass.setOrientation(screen.Orientation.VERTICAL, (err: BusinessError) => { + const errCode: number = err.code; + if (errCode) { + Logger.error(`[${TAG}]: Failed to set the vertical orientation. Code:${err.code},message is ${err.message}`); + return; + } + Logger.info(`[${TAG}]: Succeeded in setting the vertical orientation.`); + }); + }); + + await Utils.sleep(5000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0130 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0130 + * @tc.desc Add Column component nested with Image set SafeAreaPadding Padding Margin properties and dynamically toggle child SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0130', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0130'; + let pageName = "UIComponentDrawingSafeAreaE0130"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0140 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0140 + * @tc.desc Add Column component nested with Image set SafeAreaPadding Padding Margin properties and dynamically toggle father SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0140', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0140'; + let pageName = "UIComponentDrawingSafeAreaE0140"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0150 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0150 + * @tc.desc Add Column with nested Image set SafeAreaPadding and Padding then dynamically switch child SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0150', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0150'; + let pageName = "UIComponentDrawingSafeAreaE0150"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0160 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0160 + * @tc.desc Add Column with nested Image set SafeAreaPadding and Padding then dynamically switch father SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0160', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0160'; + let pageName = "UIComponentDrawingSafeAreaE0160"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0170 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0170 + * @tc.desc Add Column with nested Image set SafeAreaPadding and Margin then dynamically switch child SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0170', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0170'; + let pageName = "UIComponentDrawingSafeAreaE0170"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0180 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0180 + * @tc.desc Add Column with nested Image set SafeAreaPadding and Margin then dynamically switch father SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0180', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0180'; + let pageName = "UIComponentDrawingSafeAreaE0180"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0190 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0190 + * @tc.desc Create Column nested with Row containing TextInput set SafeAreaPadding Padding Margin and dynamically toggle child SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0190', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0190'; + let pageName = "UIComponentDrawingSafeAreaE0190"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + let button2: Component = await driver.waitForComponent(ON.id(pageName + '_02'), 1000); + await driver.waitForIdle(500, 1000); + + await button1.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(TAG + '_01'); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + + await button2.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(TAG + '_02'); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0200 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0200 + * @tc.desc Create Column nested with Row containing TextInput set SafeAreaPadding Padding Margin and dynamically toggle father SafeAreaPadding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0200', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0200'; + let pageName = "UIComponentDrawingSafeAreaE0200"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button1: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + let button2: Component = await driver.waitForComponent(ON.id(pageName + '_02'), 1000); + await driver.waitForIdle(500, 1000); + + await button1.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(TAG + '_01'); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + + await button2.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(TAG + '_02'); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0220 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0220 + * @tc.desc Column nests Row with distinct backgrounds while dynamically toggling Row's SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0220', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0220'; + let pageName = "UIComponentDrawingSafeAreaE0220"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0230 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0230 + * @tc.desc Column nests Row with varied backgrounds sets padding and dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0230', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0230'; + let pageName = "UIComponentDrawingSafeAreaE0230"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0240 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0240 + * @tc.desc Column with nested Row and distinct backgrounds sets margin then dynamically switches SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0240', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0240'; + let pageName = "UIComponentDrawingSafeAreaE0240"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0250 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0250 + * @tc.desc Column nests Row with distinct backgrounds while dynamically toggling SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0250', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0250'; + let pageName = "UIComponentDrawingSafeAreaE0250"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0260 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0260 + * @tc.desc Column nests Row with distinct backgrounds sets padding and dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0260', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0260'; + let pageName = "UIComponentDrawingSafeAreaE0260"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0270 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0270 + * @tc.desc Column nested with Row both set padding and distinct backgrounds while dynamically switching SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0270', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0270'; + let pageName = "UIComponentDrawingSafeAreaE0270"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0280 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0280 + * @tc.desc Three-layer nesting: Column-Row-Image with distinct backgrounds while Row dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0280', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0280'; + let pageName = "UIComponentDrawingSafeAreaE0280"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0290 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0290 + * @tc.desc Three-layer nested Column-Row-Image with distinct backgrounds sets Row padding and dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0290', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0290'; + let pageName = "UIComponentDrawingSafeAreaE0290"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0300 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0300 + * @tc.desc Three-layer nested Column-Row-Image with distinct backgrounds while Column dynamically switches SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0300', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0300'; + let pageName = "UIComponentDrawingSafeAreaE0300"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0310 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0310 + * @tc.desc Three-layer nested Column-Row-Image with distinct backgrounds sets Column padding and dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0310', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0310'; + let pageName = "UIComponentDrawingSafeAreaE0310"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0320 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0320 + * @tc.desc Three-layer nested Column-Row-Image with distinct backgrounds sets both Row and Column padding while dynamically switching SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0320', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0320'; + let pageName = "UIComponentDrawingSafeAreaE0320"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0330 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0330 + * @tc.desc Test SafeAreaPadding property priority for top and left edges + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0330', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0330'; + let pageName = "UIComponentDrawingSafeAreaE0330"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0340 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0340 + * @tc.desc Nested Stack-Row components with TextInputs test focus acquisition during dynamic Stack SafeAreaPadding toggling without padding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0340', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0340'; + let pageName = "UIComponentDrawingSafeAreaE0340"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(); + await driver.triggerKey(2054); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0350 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0350 + * @tc.desc Nested Stack-Row components with TextInputs test focus acquisition during dynamic Row SafeAreaPadding toggling without padding + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0350', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0350'; + let pageName = "UIComponentDrawingSafeAreaE0350"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2054); + await driver.waitForIdle(2000, 3000); + await driver.triggerKey(2049); + await driver.waitForIdle(2000, 3000); + await windowSnap.snapShot(); + await driver.triggerKey(2054); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0360 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0360 + * @tc.desc Navigation nested with Column components featuring distinct backgrounds dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0360', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0360'; + let pageName = "UIComponentDrawingSafeAreaE0360"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0370 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0370 + * @tc.desc Navigation nested with Column components having distinct backgrounds sets padding and dynamically switches SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0370', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0370'; + let pageName = "UIComponentDrawingSafeAreaE0370"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0380 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0380 + * @tc.desc Scroll nested with Column components displaying distinct backgrounds dynamically toggles SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0380', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0380'; + let pageName = "UIComponentDrawingSafeAreaE0380"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0390 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0390 + * @tc.desc Scroll nested with Column components featuring distinct backgrounds sets padding and dynamically switches SafeAreaPadding property + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0390', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0390'; + let pageName = "UIComponentDrawingSafeAreaE0390"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0400 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0400 + * @tc.desc Column nests Row with distinct backgrounds dynamically toggles SafeAreaPadding while testing padding parameter + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0400', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0400'; + let pageName = "UIComponentDrawingSafeAreaE0400"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0410 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0410 + * @tc.desc Column nests Row with distinct backgrounds dynamically toggles SafeAreaPadding while testing LengthMetrics parameter + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0410', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0410'; + let pageName = "UIComponentDrawingSafeAreaE0410"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0420 + * @tc.name SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0420 + * @tc.desc Column nests Row with distinct backgrounds dynamically toggles SafeAreaPadding while testing LocalizedPadding parameter + * @tc.level 3 + */ + it('SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0420', Level.LEVEL3, async (done: Function) => { + TAG = 'SUB_ACE_UI_COMPONENT_DRAWING_SAFEAREAE_0420'; + let pageName = "UIComponentDrawingSafeAreaE0420"; + Logger.info(`[${TAG}]`, `Case start.`); + Settings.createWindow('testability/pages/UIComponentDrawingSafeAreaE/' + pageName); + let driver: Driver = Driver.create(); + let button: Component = await driver.waitForComponent(ON.id(pageName + '_01'), 1000); + await driver.waitForIdle(500, 1000); + await button.click(); + await driver.waitForIdle(500, 1000); + await windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info(`[${TAG}]`, `Case finish.`); + done(); + }) + + }) +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0010.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0010.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff84f5e1fe704bfd864e2a7fdf7bc8381617fba9 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0010.ets @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0010 { + @State name: string = 'UIComponentDrawingSafeAreaE0010'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 10, + right: 10, + top: 50, + bottom: 20 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0020.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0020.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4cff1a675fb6cfd02df4d506d6c7c2f050b3f9c --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0020.ets @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0020 { + @State name: string = 'UIComponentDrawingSafeAreaE0020'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 50 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0030.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0030.ets new file mode 100644 index 0000000000000000000000000000000000000000..99e4380a3e0853315848848df6babaadfa0b7691 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0030.ets @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0030 { + @State name: string = 'UIComponentDrawingSafeAreaE0030'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 10, + top: 20, + bottom: 20 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0040.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0040.ets new file mode 100644 index 0000000000000000000000000000000000000000..62640feed7481674b3ee8b55cf3cff6ead918495 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0040.ets @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0040 { + @State name: string = 'UIComponentDrawingSafeAreaE0040'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 10, + right: 50, + top: 20, + bottom: 20 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0050.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0050.ets new file mode 100644 index 0000000000000000000000000000000000000000..3486641837d50f05947049ce4968d940608fa9db --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0050.ets @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0050 { + @State name: string = 'UIComponentDrawingSafeAreaE0050'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 70, + bottom: 70 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0060.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0060.ets new file mode 100644 index 0000000000000000000000000000000000000000..39750df5297fbda320afb8307a0c9bd396bcd527 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0060.ets @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0060 { + @State name: string = 'UIComponentDrawingSafeAreaE0060'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0070.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0070.ets new file mode 100644 index 0000000000000000000000000000000000000000..177c6a2b769889bd0f3afa0c2c29cc7ed0b71fc6 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0070.ets @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0070 { + @State name: string = 'UIComponentDrawingSafeAreaE0070'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0080.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0080.ets new file mode 100644 index 0000000000000000000000000000000000000000..fb1a8cb72b307fd9f737db6ac6cf22ad7d62d1c0 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0080.ets @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0080 { + @State name: string = 'UIComponentDrawingSafeAreaE0080'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0090.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0090.ets new file mode 100644 index 0000000000000000000000000000000000000000..f169bfd5caa3b96e64ac17fd9066db15e790e085 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0090.ets @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0090 { + @State name: string = 'UIComponentDrawingSafeAreaE0090'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0130.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0130.ets new file mode 100644 index 0000000000000000000000000000000000000000..9563c1ee9133b759bf72d4e8b85db510b42dd35c --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0130.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0130 { + @State name: string = 'UIComponentDrawingSafeAreaE0130'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + .backgroundColor(Color.Yellow) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0140.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0140.ets new file mode 100644 index 0000000000000000000000000000000000000000..3aacc113a255596d598b1f127546e17620213618 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0140.ets @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0140 { + @State name: string = 'UIComponentDrawingSafeAreaE0140'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0150.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0150.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c4fdbc1075816ed44d74f12f730ced683731570 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0150.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0150 { + @State name: string = 'UIComponentDrawingSafeAreaE0150'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + .backgroundColor(Color.Yellow) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0160.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0160.ets new file mode 100644 index 0000000000000000000000000000000000000000..28cd2bb71dd05c9b202832bf21f01ccdbdd7b830 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0160.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0160 { + @State name: string = 'UIComponentDrawingSafeAreaE0160'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0170.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0170.ets new file mode 100644 index 0000000000000000000000000000000000000000..af3a92013624e856200b7c2e150f1a65f6ba3312 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0170.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0170 { + @State name: string = 'UIComponentDrawingSafeAreaE0170'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue) + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + .backgroundColor(Color.Yellow) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0180.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0180.ets new file mode 100644 index 0000000000000000000000000000000000000000..35f2cac7bb2bf0d0d6ca11f9678abb96bf06d234 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0180.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0180 { + @State name: string = 'UIComponentDrawingSafeAreaE0180'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Column() { + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0190.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0190.ets new file mode 100644 index 0000000000000000000000000000000000000000..73a21c6f527bda08f2ef3d118b208155f4a7c0e2 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0190.ets @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0190 { + @State name: string = 'UIComponentDrawingSafeAreaE0190'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue1: Padding = this.originalPadding; + @State changeInfo1: string = ''; + private changedFlag1: boolean = false; + @State paddingValue2: Padding = this.originalPadding; + @State changeInfo2: string = ''; + private changedFlag2: boolean = false; + + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Column() { + Text('Column1') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag1) { + this.changedFlag1 = !this.changedFlag1; + this.paddingValue1 = this.originalPadding; + this.changeInfo1 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue1)}`; + } else { + this.changedFlag1 = !this.changedFlag1; + this.paddingValue1 = this.changedPadding; + this.changeInfo1 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue1)}`; + } + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue1) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + TextInput({ + placeholder: "TextInput in column" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Text(this.changeInfo1) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + .backgroundColor(Color.Yellow) + .width('50%') + .height('100%') + + Column() { + Text('Column2') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_02') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag2) { + this.changedFlag2 = !this.changedFlag2; + this.paddingValue2 = this.originalPadding; + this.changeInfo2 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue2)}`; + } else { + this.changedFlag2 = !this.changedFlag2; + this.paddingValue2 = this.changedPadding; + this.changeInfo2 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue2)}`; + } + }) + + TextInput({ + placeholder: "TextInput in column" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Green) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue2) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + Text(this.changeInfo2) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.originalPadding) + .backgroundColor(Color.Pink) + .width('50%') + .height('100%') + } + .width('100%') + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0200.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0200.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcb673317d45408a49fc5011eee7a200c9c0c05c --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0200.ets @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0200 { + @State name: string = 'UIComponentDrawingSafeAreaE0200'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue1: Padding = this.originalPadding; + @State changeInfo1: string = ''; + private changedFlag1: boolean = false; + @State paddingValue2: Padding = this.originalPadding; + @State changeInfo2: string = ''; + private changedFlag2: boolean = false; + + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Column() { + Text('Column1') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag1) { + this.changedFlag1 = !this.changedFlag1; + this.paddingValue1 = this.originalPadding; + this.changeInfo1 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue1)}`; + } else { + this.changedFlag1 = !this.changedFlag1; + this.paddingValue1 = this.changedPadding; + this.changeInfo1 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue1)}`; + } + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + TextInput({ + placeholder: "TextInput in column" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Text(this.changeInfo1) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue1) + .backgroundColor(Color.Yellow) + .width('50%') + .height('100%') + + Column() { + Text('Column2') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_02') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag2) { + this.changedFlag2 = !this.changedFlag2; + this.paddingValue2 = this.originalPadding; + this.changeInfo2 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue2)}`; + } else { + this.changedFlag2 = !this.changedFlag2; + this.paddingValue2 = this.changedPadding; + this.changeInfo2 = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue2)}`; + } + }) + + TextInput({ + placeholder: "TextInput in column" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Green) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + Text(this.changeInfo2) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .safeAreaPadding(this.paddingValue2) + .backgroundColor(Color.Pink) + .width('50%') + .height('100%') + } + .width('100%') + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0220.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0220.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ba1924d6198caa00360cafc94ae11fb9b3424b5 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0220.ets @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0220 { + @State name: string = 'UIComponentDrawingSafeAreaE0220'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0230.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0230.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d405b9c7205a76c65233d0d241160a40de7425a --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0230.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0230 { + @State name: string = 'UIComponentDrawingSafeAreaE0230'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0240.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0240.ets new file mode 100644 index 0000000000000000000000000000000000000000..0de56f5d5afa2069cc20124508e50ff00f8321e9 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0240.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0240 { + @State name: string = 'UIComponentDrawingSafeAreaE0240'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0250.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0250.ets new file mode 100644 index 0000000000000000000000000000000000000000..a56775c56a9e4367811d33bf086668a40b42318a --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0250.ets @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0250 { + @State name: string = 'UIComponentDrawingSafeAreaE0250'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0260.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0260.ets new file mode 100644 index 0000000000000000000000000000000000000000..8cd20863ff0a9e0ba9e917603a0499f31d112754 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0260.ets @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0260 { + @State name: string = 'UIComponentDrawingSafeAreaE0260'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0270.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0270.ets new file mode 100644 index 0000000000000000000000000000000000000000..66a9d925ef47e613defc178a106754b6510a3bea --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0270.ets @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0270 { + @State name: string = 'UIComponentDrawingSafeAreaE0270'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0280.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0280.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4928f433e8bac1ba1b4742efa9563e401f20e86 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0280.ets @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0280 { + @State name: string = 'UIComponentDrawingSafeAreaE0280'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0290.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0290.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa066458b8c9f601420eb9832d8f8fb5ee83935a --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0290.ets @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0290 { + @State name: string = 'UIComponentDrawingSafeAreaE0290'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0300.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0300.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b3fcee73db13a9c9cc285cbba6c9eb0e4c4c84e --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0300.ets @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0300 { + @State name: string = 'UIComponentDrawingSafeAreaE0300'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0310.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0310.ets new file mode 100644 index 0000000000000000000000000000000000000000..7812a5b26aabc3b368969a3b978033e1ecf573bb --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0310.ets @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0310 { + @State name: string = 'UIComponentDrawingSafeAreaE0310'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0320.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0320.ets new file mode 100644 index 0000000000000000000000000000000000000000..0416266343b4afe61c893af955ee8689f43cb142 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0320.ets @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0320 { + @State name: string = 'UIComponentDrawingSafeAreaE0320'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Image('/images/app_icon.png') + .onComplete((event) => { + this.message += '\n image onComplete, width: ' + event?.width + ', height: ' + event?.height; + }) + .onError((error: ImageError) => { + this.message += '\n image onError, err: ' + JSON.stringify(error); + }) + .backgroundColor(Color.Green) + .width(200) + .height(200) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0330.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0330.ets new file mode 100644 index 0000000000000000000000000000000000000000..424809d1719a0a4465e6655f6d56df886737a4fa --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0330.ets @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0330 { + @State name: string = 'UIComponentDrawingSafeAreaE0330'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .width(300) + .height(300) + + } + .width(350) + .height(350) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0340.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0340.ets new file mode 100644 index 0000000000000000000000000000000000000000..84fa489f33b9a81c90c03bf2cd887e4a0a5909ac --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0340.ets @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0340 { + @State name: string = 'UIComponentDrawingSafeAreaE0340'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.message) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Stack({alignContent: Alignment.Top}) { + + TextInput({ + placeholder: "TextInput 1" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + TextInput({ + placeholder: "TextInput 2" + }) + .width('70%') + .height(85) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0350.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0350.ets new file mode 100644 index 0000000000000000000000000000000000000000..f461fb65df94d9a73541e60cbe81cdf4a787c765 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0350.ets @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0350 { + @State name: string = 'UIComponentDrawingSafeAreaE0350'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.message) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Stack({alignContent: Alignment.Top}) { + + TextInput({ + placeholder: "TextInput 1" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + TextInput({ + placeholder: "TextInput 2" + }) + .width('70%') + .height(85) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + + Row() { + TextInput({ + placeholder: "TextInput in row" + }) + .width('50%') + .height(35) + .type(InputType.Number) + .enterKeyType(EnterKeyType.Done) + .caretColor(Color.Red) + .placeholderColor(Color.Blue) + .placeholderFont({ + size: 20, + style: FontStyle.Italic, + weight: FontWeight.Bold + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + .margin({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0360.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0360.ets new file mode 100644 index 0000000000000000000000000000000000000000..d20507883e07fb3bc1332046fcebdd31e5026bb8 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0360.ets @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0360 { + @State name: string = 'UIComponentDrawingSafeAreaE0360'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Navigation() { + Text('Navigation') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0370.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0370.ets new file mode 100644 index 0000000000000000000000000000000000000000..7df13b02f6b8414390145ec014ee3874971719e3 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0370.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0370 { + @State name: string = 'UIComponentDrawingSafeAreaE0370'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Navigation() { + Text('Navigation') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0380.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0380.ets new file mode 100644 index 0000000000000000000000000000000000000000..f747a43d36cb96543fc75b8274725ee637a5d9ed --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0380.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0380 { + @State name: string = 'UIComponentDrawingSafeAreaE0380'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Scroll() { + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0390.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0390.ets new file mode 100644 index 0000000000000000000000000000000000000000..754101f033aec97d08368878e4e4bc174379a917 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0390.ets @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0390 { + @State name: string = 'UIComponentDrawingSafeAreaE0390'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Scroll() { + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0400.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0400.ets new file mode 100644 index 0000000000000000000000000000000000000000..f66b859dc263fc029624948433abc37618adc21d --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0400.ets @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0400 { + @State name: string = 'UIComponentDrawingSafeAreaE0400'; + @State message: string = this.name; + @State originalPadding: Padding = { + left: 10, + right: 10, + top: 20, + bottom: 20 + }; + @State changedPadding: Padding = { + left: 50, + right: 50, + top: 60, + bottom: 60 + }; + @State paddingValue: Padding = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.originalPadding) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.paddingValue) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0410.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0410.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5b7026db608eeea52c6704caa2ac4531e8412bc --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0410.ets @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2025 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 { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0410 { + @State name: string = 'UIComponentDrawingSafeAreaE0410'; + @State message: string = this.name; + @State originalPadding: Padding | LocalizedPadding | LengthMetrics = new LengthMetrics(10); + @State changedPadding: Padding | LocalizedPadding | LengthMetrics = new LengthMetrics(50); + @State paddingValue: Padding | LocalizedPadding | LengthMetrics = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0420.ets b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0420.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9248014a95e54908130c0d122e3ad7960333b94 --- /dev/null +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/ets/testability/pages/UIComponentDrawingSafeAreaE/UIComponentDrawingSafeAreaE0420.ets @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2025 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 { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentDrawingSafeAreaE0420 { + @State name: string = 'UIComponentDrawingSafeAreaE0420'; + @State message: string = this.name; + private paddingStart: LengthMetrics = new LengthMetrics(10); + private paddingEnd: LengthMetrics = new LengthMetrics(10); + private paddingTop: LengthMetrics = new LengthMetrics(20); + private paddingBottom: LengthMetrics = new LengthMetrics(20); + @State originalPadding: Padding | LocalizedPadding | LengthMetrics = { + start: this.paddingStart, + end: this.paddingEnd, + top: this.paddingTop, + bottom: this.paddingBottom + }; + private changedPaddingStart: LengthMetrics = new LengthMetrics(60); + private changedPaddingEnd: LengthMetrics = new LengthMetrics(60); + private changedPaddingTop: LengthMetrics = new LengthMetrics(50); + private changedPaddingBottom: LengthMetrics = new LengthMetrics(50); + @State changedPadding: Padding | LocalizedPadding | LengthMetrics = { + start: this.changedPaddingStart, + end: this.changedPaddingEnd, + top: this.changedPaddingTop, + bottom: this.changedPaddingBottom + }; + @State paddingValue: Padding | LocalizedPadding | LengthMetrics = this.originalPadding; + @State changeInfo: string = ''; + private changedFlag: boolean = false; + + build() { + Column() { + Text(this.name) + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Button('Switch SafeAreaPadding') + .id(this.name + '_01') + .borderRadius(20) + .backgroundColor(0x317aff) + .fontSize(16) + .fontWeight(FontWeight.Bold) + .margin(10) + .onClick(() => { + if (this.changedFlag) { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.originalPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } else { + this.changedFlag = !this.changedFlag; + this.paddingValue = this.changedPadding; + this.changeInfo = `SafeAreaPadding swithed to: ${JSON.stringify(this.paddingValue)}`; + } + }) + + Text(this.message) + .fontSize(15) + .fontColor(Color.Pink) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Text(this.changeInfo) + .fontSize(20) + .fontColor(Color.Red) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Column() { + Text('Column') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + + Row() { + Text('Row') + .fontSize(20) + .fontColor(Color.Black) + .fontWeight(FontWeight.Bold) + .textAlign(TextAlign.Center) + .margin({ + left: 6, + right: 6, + top: 10, + bottom: 10 + }) + } + .backgroundColor(Color.Orange) + .safeAreaPadding(this.paddingValue) + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + + } + .padding({ + left: 10, + right: 10, + top: 20, + bottom: 20 + }) + .backgroundColor(Color.Yellow) + .safeAreaPadding(this.originalPadding) + + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('100%') + } +} diff --git a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/resources/base/profile/test_pages.json b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/resources/base/profile/test_pages.json index 803a5a0c18048f5155adff19edd27f582891ed87..ccc2ff05a22176dc247fca07f4789b61b839b4d6 100644 --- a/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/resources/base/profile/test_pages.json +++ b/sample/ui_compare/uiCompareTest_03/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -176,6 +176,55 @@ "testability/pages/UIComponentScrollPullDown/UIComponentScrollPullDown0240", "testability/pages/UIComponentScrollPullDown/UIComponentScrollPullDown0250", "testability/pages/UIComponentWaterFlowMirror/UIComponentWaterFlowMirror0010_014", - "testability/pages/UIComponentWaterFlowSections/UIComponentWaterFlowSections0020" + "testability/pages/UIComponentWaterFlowSections/UIComponentWaterFlowSections0020", + "testability/pages/UIComponentSpecialComponentsUIContextComponentSnapshot/UIComponentSpecialComponentsUIContextComponentSnapshot0180", + "testability/pages/UIComponentSpecialComponentsUIContextComponentSnapshot/UIComponentSpecialComponentsUIContextComponentSnapshot0340", + "testability/pages/UIComponentSpecialComponentsUIContextComponentSnapshot/UIComponentSpecialComponentsUIContextComponentSnapshot0360", + "testability/pages/UIComponentSpecialComponentsUIContextComponentSnapshot/UIComponentSpecialComponentsUIContextComponentSnapshot0460", + "testability/pages/UIComponentSpecialComponentsUIContextAddMenuFocus/UIComponentSpecialComponentsUIContextAddMenuFocus0210", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0010", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0020", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0030", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0040", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0050", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0060", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0070", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0080", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0090", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0100", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0110", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0120", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0130", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0140", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0150", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0160", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0170", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0180", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0190", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0200", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0210", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0220", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0230", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0240", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0250", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0260", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0270", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0280", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0290", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0300", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0310", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0320", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0330", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0340", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0350", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0360", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0370", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0380", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0390", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0400", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0410", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0420", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0430", + "testability/pages/UIComponentTextChipInterface/UIComponentTextChipInterface0440" ] }