diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/List.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/List.test.ets index cb25adbe9a08e45f00c60d59280dca38f2c38adb..ee88d68d2a9f85cd8a8d5c04860931aa5966eed1 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/List.test.ets +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/List.test.ets @@ -81,6 +81,8 @@ import UIComponentTextTextinputAction from './UIComponentTextTextinputActionTest import UIComponentTextCommonAffingTranTest from './UIComponentTextCommonAffingTranTest/UIComponentTextCommonAffingTran.test' import UIComponentSymbolDisplay from './UIComponentSymbolDisplayTest/UIComponentSymbolDisplay.test' import UIAttributeFontSupportstage from './UIAttributeFontSupportstageTest/UIAttributeFontSupportstage.test' +import UIAttributeFontInterface002 from './UIAttributeFontInterfaceTest/UIAttributeFontInterface002.test' +import UIAttributeFontInterface003 from './UIAttributeFontInterfaceTest/UIAttributeFontInterface003.test' export default function testsuite() { demoTest(); UIAttributeFontInterface001(); @@ -151,4 +153,6 @@ export default function testsuite() { UIComponentTextCommonAffingTranTest(); UIComponentSymbolDisplay(); UIAttributeFontSupportstage(); + UIAttributeFontInterface002() + UIAttributeFontInterface003() } \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface002.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface002.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..90856cab2999e831fd2b6dc6c7df90d2d5fbbc2b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface002.test.ets @@ -0,0 +1,3341 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import {UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, + ResizeDirection, WindowMode, PointerMatrix} from '@ohos.UiTest'; + +export default function UIAttributeFontInterface002() { + + describe('UIAttributeFontInterface002', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(500); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0210 + * @tc.desc : citation PixelMap + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage01") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0210 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0270 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0270 + * @tc.desc : Add the Search component and reference a large-sized image. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0270 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage03") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_INTERFACE_0270 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0010 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0010 + * @tc.desc : Add the Search component without setting the size. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0010 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage04") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0020 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0020 + * @tc.desc : Add the Search component and implement line wrapping. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage05") + await Utils.sleep(500) + let driver = Driver.create(); + await Utils.sleep(500) + await driver.triggerKey(2049); + await Utils.sleep(500) + await driver.triggerKey(2054); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SEARCH_LAYOUT_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0010 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0010 + * @tc.desc : Create a text component in the placeholder XComponent that contains a Span and set it + * to an empty text. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0010 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage06") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0020 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0020 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and set it to the + * content of the resource file. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage07") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0030 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0030 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and set the content + * to "HelloWorld". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0030 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage08") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0030 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0040 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0040 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement + * the attribute settings to set the text decoration line to None. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0040 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage09") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0040 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0050 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0050 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement + * the attribute settings to set the text decoration line to UnderLine. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0050 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage10") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0050 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0060 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0060 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement + * the attribute settings to set the text decoration line to LineThrough. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0060 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage11") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0060 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0070 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0070 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement + * the attribute settings to set the text decoration line to OverLine. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0070 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage12") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0070 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0080 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0080 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font color to red. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0080 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage13") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0080 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0090 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0090 + * @tc.desc : citation PixelMap + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0090 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage14") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0090 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0100 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0100 + * @tc.desc : citation PixelMap + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0100 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage15") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0100 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0110 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0110 + * @tc.desc : citation PixelMap + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0110 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage16") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0110 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0120 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0120 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement + * the attribute settings to set the font style to italic. + + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0120 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage17") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0120 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0130 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0130 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Lighter". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0130 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage18") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0130 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0140 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Normal". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage19") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0140 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0150 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0150 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Regular". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0150 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage20") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0150 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0160 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0160 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Medium". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0160 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage21") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0160 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0170 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Bold". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage22") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0170 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0180 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the font weight to "Bolder". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage23") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0180 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0190 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement the + * attribute settings to set the text line height to 30. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage24") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0190 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0200 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0200 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and supplement the + * attribute settings to set the text line height to -10. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0200 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage25") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0200 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0210 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the text case to "LowerCase". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage26") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0210 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0220 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the text case to "UpperCase". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage27") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0220 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0230 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the text case to "Normal". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage28") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0230 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0240 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0240 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the character spacing value to 10. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0240 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage29") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0240 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0250 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0250 + * @tc.desc : Create a text component within the placeholder XComponent that includes a Span, and add attribute + * settings to set the character spacing value to -5. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0250 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage30") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_CAPI_0250 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0014 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0014 + * @tc.desc : Add a Span component, set the parameters of the Span: set the parameter to "This is the Span + * component". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0014', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0014 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage33") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0014 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0067 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0067 + * @tc.desc : Add a Span component, set the attributes of the Span: apply the letterSpacing('180%') style + * attribute. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0067', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0067 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage34") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0067 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0081 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0081 + * @tc.desc : Add a Span component, set the parameters of the Span: set the Span's property with the lineHeight + * attribute using a raw file reference, such as lineHeight('60fp'). + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0081', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0081 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage35") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SPAN_INTERFACE_0081 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0350 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0350 + * @tc.desc : Add a `SymbolSpan` subcomponent. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0350 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage36") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0350 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0420 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0420 + * @tc.desc : Add multiple SymbolSpan child components, setting the initial selection value to (-1, -1), and + * dynamically changing the selection + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0420 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage183") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage183_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage183_02')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click(); + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0420 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0430 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0430 + * @tc.desc : Adding multiple SymbolSpan child components and dynamically modifying the letterSpacing parameter. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0430 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage184") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage184_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage184_02')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click(); + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0430 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0690 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0690 + * @tc.desc : Adding multiple SymbolSpan child components and dynamically modifying the letterSpacing parameter. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0690 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage185") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage185_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage185_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributePage185_03')); + let button4: Component = await driver.findComponent(ON.id('fontAttributePage185_04')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click(); + windowSnap.snapShot() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 5; i_01++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + for(let i_02 = 0; i_02 < 5; i_02++){ + await button4.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0690 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0700 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0700 + * @tc.desc : Dynamically changing SymbolSpan styles: fontsize, fontcolor, fontweight, effectStrategy, + * renderingStrategy + */ + it('SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0700 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage186") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage186_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage186_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributePage186_03')); + let button4: Component = await driver.findComponent(ON.id('fontAttributePage186_04')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 5; i_01++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + for(let i_02 = 0; i_02 < 2; i_02++){ + await button3.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + for(let i_03 = 0; i_03 < 2; i_03++){ + await button4.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_SYMBOL_MIXEDDISPLAY_0700 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0010 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0010 + * @tc.desc : Add a `Text` component, set the `wordBreak` to NORMAL, and configure it to support Chinese, + * Japanese, Korean, and English languages. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0010 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage41") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0020 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0020 + * @tc.desc :Add a `Text` component, set the `wordBreak` to BREAK_ALL, and configure it to support Chinese, + * Japanese, Korean, and English languages. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage42") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0030 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0030 + * @tc.desc : Add a `Text` component, set the `wordBreak` to BREAK_WORD, and configure it to support Chinese, + * Japanese, Korean, and English languages. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0030 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage43") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0030 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0040 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0040 + * @tc.desc : Add a Text component without setting the wordBreak. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0040 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage44") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0040 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0050 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0050 + * @tc.desc : Add a Text component and set the `oncopy` event handler. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0050 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage45") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy: Component = await driver.findComponent(ON.text('复制')); + await copy.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0050 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0060 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0060 + * @tc.desc : Add a Text component and set the selection with selectionStart at 5 and selectionEnd at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0060 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage46") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0060 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0070 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0070 + * @tc.desc : Add a Text component and set the selection with selectionStart at 20 and selectionEnd at 5. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0070 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage47") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0070 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0080 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0080 + * @tc.desc : Add a Text component and set the selection with selectionStart and selectionEnd both at 5. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0080 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage48") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0080 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0090 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0090 + * @tc.desc : Add a Text component and set the `selection` with `selectionStart` at -5 and `selectionEnd` at 5. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0090 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage49") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0090 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0100 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0100 + * @tc.desc : Add a Text component and set the `selection` with `selectionStart` at 5 and `selectionEnd` at 1000. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0100 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage50") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0100 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0110 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0110 + * @tc.desc : Add a Text component and set multiple selections with `selectionStart` at 5 and `selectionEnd` at + * 20 for each. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0110 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage51") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0110 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0120 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0120 + * @tc.desc : Add a Text component, set the `selection` with `selectionStart` at 5 and `selectionEnd` at 20, + * and handle clicking outside the component area. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0120 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage52") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await driver.click(100,200) + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0120 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0140 + * @tc.desc : Add a Text component, set the `selection` with `selectionStart` at 5 and `selectionEnd` at 20, + * and implement a menu button for selecting all text. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage53") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let selectAll: Component = await driver.findComponent(ON.text('全选')); + await selectAll.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0140 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0170 + * @tc.desc : Add a Text component, set multilingual text, and set `WordBreak` to `NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage54") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0170 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0180 + * @tc.desc : Add a Text component, set multilingual text, and set `WordBreak` to `BREAK_ALL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage55") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0180 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0190 + * @tc.desc : Add a Text component, set multilingual text, and set `WordBreak` to `BREAK_WORD`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage56") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0190 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0200 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0200 + * @tc.desc : Add a Text component, set it to display pure English text, and set `WordBreak` to `NORMAL`. Also, + * set the `clip` property to `true`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0200 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage57") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0200 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0210 + * @tc.desc : Add a Text component, set it to display pure English text, and set `WordBreak` to `NORMAL`. Also, + * set the `clip` property to `false`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage58") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0210 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0220 + * @tc.desc : Add a Text component, set it to display pure English text, and set `WordBreak` to `BREAK_ALL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage59") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0220 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0230 + * @tc.desc : Add a Text component, set it to display pure English text, and set `WordBreak` to `BREAK_WORD`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage60") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0230 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0240 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0240 + * @tc.desc : Add a Text component, set `CopyOptions` to `NONE`, and set the `selection` with `selectionStart` + * at 5 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0240 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage61") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0240 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0250 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0250 + * @tc.desc : Add a Text component, initially set the `selection` with `selectionStart` at 5 and `selectionEnd` + * at 20, and then dynamically change the `selection` to have `selectionStart` at 10 and `selectionEnd` at 15. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0250 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage62") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let changeSelect: Component = await driver.findComponent(ON.id('changeSelection63')); + await changeSelect.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0250 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0260 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0260 + * @tc.desc : Add a Text component, set `TextOverflow` to `None`, input pure English text, set `maxLines` to 5, + * and set `wordBreak` to `WordBreak.NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0260 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage63") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0260 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0270 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0270 + * @tc.desc : Add a Text component, set TextOverflow to None, set maxLines to 1, and set wordBreak to + * WordBreak.NORMAL. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0270 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage64") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0270 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0280 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0280 + * @tc.desc : Add a Text component, set `TextOverflow` to `None`, and set the `selection` with `selectionStart` + * at 10 and `selectionEnd` at 1000. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0280 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage65") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0280 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0290 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0290 + * @tc.desc : Add a Text component, set `TextOverflow` to `None`, and set the `selection` with `selectionStart` + * at 10 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0290 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage66") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0290 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0300 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0300 + * @tc.desc : Add a Text component, set `TextOverflow` to `None`, and set the `selection` with `selectionStart` + * at 1000 and `selectionEnd` at 1001. + + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0300 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage67") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0300 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0310 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0310 + * @tc.desc : Add a Text component, set `TextOverflow` to `Clip`, set pure English text, set `maxLines` to 5, + * and set `wordBreak` to `WordBreak.NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0310 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage68") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0310 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0320 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0320 + * @tc.desc : Add a Text component, set `TextOverflow` to `Clip`, set pure English text, set `maxLines` to 1, + * and set `wordBreak` to `WordBreak.NORMAL`. + + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0320 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage69") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0320 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0330 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0330 + * @tc.desc : Add a Text component, set `TextOverflow` to `Clip`, and set the `selection` with `selectionStart` + * at 10 and `selectionEnd` at 1000. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0330 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage70") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy: Component = await driver.findComponent(ON.text('复制')); + await copy.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0330 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0340 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0340 + * @tc.desc : Add a Text component, set `TextOverflow` to `Clip`, and set the `selection` with `selectionStart` + * at 10 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0340 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage71") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0340 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0350 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0350 + * @tc.desc : Add a Text component, set `TextOverflow` to `Clip`, and set the `selection` with `selectionStart` + * at 1000 and `selectionEnd` at 1001. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0350 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage72") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0350 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0360 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0360 + * @tc.desc : Add a Text component, set `TextOverflow` to `Ellipsis`, input pure English text, set `maxLines` + * to 5, and set `wordBreak` to `WordBreak.NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0360 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage73") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0360 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0370 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0370 + * @tc.desc : Add a Text component, set `TextOverflow` to `Ellipsis`, input pure English text, set `maxLines` + * to 1, and set `wordBreak` to `WordBreak.NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0370 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage74") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0370 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0380 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0380 + * @tc.desc : Add a Text component, set Chinese text, set `TextOverflow` to `Ellipsis`, set `maxLines` to 1, + * and set the `selection` with `selectionStart` at 20 and `selectionEnd` at 1000. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0380 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage75") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy: Component = await driver.findComponent(ON.text('复制')); + await copy.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0380 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0390 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0390 + * @tc.desc : Add a Text component, set Chinese text, set `TextOverflow` to `Ellipsis`, set `maxLines` to 1, + * and set the `selection` with `selectionStart` at 21 and `selectionEnd` at 40. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0390 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage76") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy: Component = await driver.findComponent(ON.text('复制')); + await copy.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0390 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0400 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0400 + * @tc.desc : Add a Text component, set `TextOverflow` to `Ellipsis`, set `maxLines` to 2, and set the + * `selection` with `selectionStart` at 10 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0400 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage77") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy: Component = await driver.findComponent(ON.text('复制')); + await copy.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0400 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0410 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0410 + * @tc.desc : Add a Text component, set `TextOverflow` to `Marquee`, and set the `selection` with + * `selectionStart` at 10 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0410 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage78") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0410 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0420 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0420 + * @tc.desc : Add a Text component, set pure English text, and dynamically switch between Chinese, Japanese, + * and Korean text. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0420 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage79") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let copy1: Component = await driver.findComponent(ON.id('changeText79_1')); + await copy1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let copy2: Component = await driver.findComponent(ON.id('changeText79_2')); + await copy2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let copy3: Component = await driver.findComponent(ON.id('changeText79_3')); + await copy3.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0420 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0430 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0430 + * @tc.desc : Add a Text component, set the `fontSize` to 16, and dynamically change the `fontSize` to 30. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0430 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage80") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let changeFontSize: Component = await driver.findComponent(ON.id('changeText80')); + await changeFontSize.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0430 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0440 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0440 + * @tc.desc : Add a Text component, set the text in four languages: Chinese, English, Korean, and Japanese. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0440 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage81") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0440 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0450 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0450 + * @tc.desc : Add a Text component with a child `Span` component, set the initial `selection` with + * `selectionStart` at 5 and `selectionEnd` at 20, and then dynamically change the `selection` by setting + * `selectionStart` and `selectionEnd` to variable numbers. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0450 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage82") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let select: Component = await driver.findComponent(ON.id('changeSelection82')); + await select.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0450 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0460 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0460 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the initial `selection` + * with `selectionStart` at 5 and `selectionEnd` at 20. Then, dynamically change the `selection` by setting + * `selectionStart` and `selectionEnd` to different numeric values. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0460 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage83") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let select: Component = await driver.findComponent(ON.id('changeSelection83')); + await select.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0460 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0470 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0470 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `verticalAlign` to `top`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0470 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage84") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0470 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0480 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0480 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `verticalAlign` to `center`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0480 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage85") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0480 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0490 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0490 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `verticalAlign` to `bottom`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0490 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage86") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0490 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0500 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0500 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `verticalAlign` to + * `baseline`,and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0500 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage87") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0500 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0510 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0510 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `Contain`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0510 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage88") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0510 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0520 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0520 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `Cover`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0520 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage89") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0520 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0530 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0530 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `Auto`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0530 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage90") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0530 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0540 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0540 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `Fill`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0540 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage91") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0540 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0550 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0550 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `ScallDown`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0550 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage92") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0550 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0560 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0560 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `objectFit` to `None`, + * and set the `selection` with `selectionStart` at 0 and `selectionEnd` at 20. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0560 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage93") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0560 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0590 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0590 + * @tc.desc : Add a `Text` component and implement long press gesture recognition to select text. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0590 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage94") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage94')); + await button.longClick(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0590 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0600 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0600 + * @tc.desc : Add a `Text` component, set the `selection` from index 5 to 10, set `clip` to true, and dynamically + * change the container's width and height to 0. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0600 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage95") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('changeHeight95')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0600 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610 + * @tc.desc : Add a Text component, set `clip` to false, and set `WordBreak` to `NORMAL`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage96") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0630 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0630 + * @tc.desc : Add a Text component with its child components Set the selection parameters with start = end + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0610 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage179") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0630 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0640 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0640 + * @tc.desc : Add a Text component with its child components, Dynamically modify wordBreak. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0640 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage180") + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage180_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage180_02')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click(); + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0640 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0650 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0650 + * @tc.desc : Add a Text component with its child components, Dynamically modify selection. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0650 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage181") + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage181_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage181_02')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click(); + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0650 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0660 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0660 + * @tc.desc : To set selectionStart to 5, selectionEnd to 30, and dynamically change the text size, number of + * visible lines, and container size + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0660 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage182") + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributePage182_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributePage182_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributePage182_03')); + await button1.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click(); + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click(); + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_ABILITY_0660 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0040 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0040 + * @tc.desc : Add a ContainerSpan component, without adding any content inside the component. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0040 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage97") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0040 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0050 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0050 + * @tc.desc : Add a ContainerSpan component, and within the `ContainerSpan` component, set the content with + * `Span` and `ImageSpan`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0050 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage98") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0050 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0060 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0060 + * @tc.desc : Add a Text component, and as a child, add a `Span` component with a single line of content. + * Set the attribute `textBackgroundStyle` with the properties: `{color: Color.Green, radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0060 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage99") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0060 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0070 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0070 + * @tc.desc : Add a Text component and include a child `ImageSpan` component. Set the `textBackgroundStyle` + * attribute with the properties: `{color: Color.Green, radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0070 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage100") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0070 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0080 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0080 + * @tc.desc : Add a Text component, with a child `Span` component containing a single line of text. Set the + * `textBackgroundStyle` attribute with the properties: `{color: 0xff0000, radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0080 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage101") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0080 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0090 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0090 + * @tc.desc : Add a child Span component with a single line of content, and set the `textBackgroundStyle` + * attribute with the properties: `{color: Color.Green, radius: 0}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0090 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage102") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0090 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0100 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0100 + * @tc.desc : Add a Text component, with a child Span component containing a single line of text, and set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: -5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0100 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage103") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0100 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0110 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0110 + * @tc.desc : Add a Text component, with a child `Span` component containing a single line of text, and set + * the `textBackgroundStyle` attribute with the properties: `{color: '#ffc0cb', radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0110 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage104") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0110 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0120 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0120 + * @tc.desc : Add a Text component, set the color using a resource reference, and include a child Span component + * with a single line of content. Set the textBackgroundStyle attribute with the properties: + * {color: $r('color_Yellow'), radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0120 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage105") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0120 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0130 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0130 + * @tc.desc : Add a Text component, and within it, add a child Span component containing a single line of text. + * Set the textBackgroundStyle attribute with the properties: {color: Color.Green, radius: '10%'}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0130 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage106") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0130 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0140 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: '10vp'}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage107") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0140 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0150 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0150 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: {topLeft: 10}}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0150 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage108") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0150 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0160 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0160 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: {topRight: 10}} + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0160 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage109") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0160 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0170 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: {bottomLeft: 10}} + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage110") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0170 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0180 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: {bottomRight: 10}} + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage111") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0180 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0190 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Set the + * textBackgroundStyle attribute with the properties: {color: Color.Green, radius: {topLeft: 10, topRight: 20, + * bottomLeft: 40, bottomRight: 80}} + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage112") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0190 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0200 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0200 + * @tc.desc : Add a Text component, and include a child Span component with a single line of content. Upon + * clicking the button labeled "Background Color: Red," set the textBackgroundStyle attribute with the + * properties: {color: this.color, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0200 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage113") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage113')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0200 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0210 + * @tc.desc : Add a Text component, and include a child `Span` component with a single line of content. + * Upon clicking the button labeled "Corner Radius: 10," set the `textBackgroundStyle` attribute with the + * properties: `{color: Color.Green, radius: this.number}` where `this.number` is dynamically set to a value + * (10, 20, or 30) based on the button click. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage114") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button_20: Component = await driver.findComponent(ON.id('fontAttributePage114_20')); + await button_20.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button_30: Component = await driver.findComponent(ON.id('fontAttributePage114_30')); + await button_30.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0210 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0220 + * @tc.desc : Add a Text component, and include a child `Span` component with a single line of content. + * Set the `textBackgroundStyle` attribute with a radius of 5. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage115") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0220 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0230 + * @tc.desc : Add a Text component, and include a child `Span` component with a single line of content. + * Set the `textBackgroundStyle` attribute with the color property to `Color.Green` + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage116") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0230 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0240 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0240 + * @tc.desc : Add a Text component, and within it, add a `ContainerSpan`. Inside the `ContainerSpan`, + * include both a `Span` and an `ImageSpan` to be displayed in a single line. Set the `textBackgroundStyle` + * property of the `ContainerSpan` with the style: `{color: Color.Green, radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0240 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage117") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0240 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0250 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0250 + * @tc.desc : Add a Text component, and within it, add a `ContainerSpan`. Inside the `ContainerSpan`, + * set both a `Span` and an `ImageSpan` to display in a single line. Ensure the dimensions of the `ImageSpan` are + * larger than those of the `Span`. Set the `textBackgroundStyle` property of the `ContainerSpan` with the style: + * `{color: Color.Green, radius: 5}`. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0250 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage118") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0250 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0260 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0260 + * @tc.desc : Add Text Component Add ContainerSpan, configure Span and ImageSpan within the component to display + * in a single line Set textBackgroundStyle({color: Color.Green, radius: 5}) on ContainerSpan to dynamically change + * font size and image size + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0260 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage119") + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + let fontSize: Component = await driver.findComponent(ON.id('fontAttributePage119_01')); + let imageSize: Component = await driver.findComponent(ON.id('fontAttributePage119_02')); + await fontSize.click() + await imageSize.click() + await Utils.sleep(500) + windowSnap.snapShot() + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0260 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0270 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0270 + * @tc.desc : Add a Text component, and within it, add a ContainerSpan. Inside the ContainerSpan, set both a Span + * and an ImageSpan to be displayed in a single line. For the ImageSpan within the ContainerSpan, set the + * textBackgroundStyle to {color: Color.Red, radius: 5}. For the Span within the ContainerSpan, set the + * textBackgroundStyle to {color: Color.Blue, radius: 5}. Additionally, set the textBackgroundStyle for the + * ContainerSpan itself to {color: Color.Green, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0270 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage120") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0270 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0280 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0280 + * @tc.desc : Add a Text component, and within it, add a ContainerSpan. Inside the ContainerSpan, include both a + * Span and an ImageSpan to be displayed in a single line. For the Span within the ContainerSpan, set the + * textBackgroundStyle to {color: Color.Blue, radius: 5}. For the ContainerSpan itself, set the textBackgroundStyle + * to {color: Color.Green, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0280 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage121") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0280 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0290 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0290 + * @tc.desc : Add a Text component with a blue background color by setting backgroundColor to Blue. Within the + * Text component, add a ContainerSpan. Inside the ContainerSpan, include both a Span and an ImageSpan to be + * displayed in a single line. Set the textBackgroundStyle for the ContainerSpan to {color: Color.Red, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0290 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage122") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0290 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0300 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0300 + * @tc.desc : Add a Text component with rounded corners for the border by setting borderRadius to 10. Within the + * Text component, add a ContainerSpan. Inside the ContainerSpan, include both a Span and an ImageSpan to be + * displayed in a single line. Set the textBackgroundStyle for the ContainerSpan to {color: Color.Red, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0300 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage123") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0300 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0310 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0310 + * @tc.desc : Add a Text component and within it, add a ContainerSpan. Inside the ContainerSpan, include multiple + * Span and ImageSpan components to be displayed in a single line. Set the textBackgroundStyle for the + * ContainerSpan with the properties: {color: Color.Red, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0310 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage124") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0310 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0320 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0320 + * @tc.desc : Add a Text component and within it, add a ContainerSpan. Inside the ContainerSpan, include multiple + * Span and ImageSpan components, with content that exceeds three lines. Set the textBackgroundStyle for the + * ContainerSpan with the properties: {color: Color.Red, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0320 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage125") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0320 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0330 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0330 + * @tc.desc : Add a Text component and within it, add a ContainerSpan. Inside the ContainerSpan, include multiple + * Span and ImageSpan components, with content that exceeds three lines. Set the textBackgroundStyle for the + * ContainerSpan with the properties: {color: Color.Red, radius: 5}. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0330 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage126") + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let widthDec: Component = await driver.findComponent(ON.id('fontAttributePage126_01')); + let widthInc: Component = await driver.findComponent(ON.id('fontAttributePage126_02')); + await widthDec.click() + await widthInc.click() + await Utils.sleep(500) + windowSnap.snapShot() + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_CONTAINERSPAN_0330 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0010 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0010 + * @tc.desc : Add a Text component with the following settings: .maxLines(2), .width('220vp') + * (without setting the height), .minFontSize(14), .maxFontSize(24). Call the measureTextSize method twice to + * compare the text height when the Text component's maxLines is set versus when it's set to maxLines + 1. + * Add a TextInput component and assign the input content to the Text component. + * Set the textIndent property to 10, and input the text "文本截断是按字截断". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0010 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage127") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage127')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0010 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 + * @tc.desc : Set the textIndent property to 10, and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i ams". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage128") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage128')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0030 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0030 + * @tc.desc : Set the textIndent property to 0, and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage129") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage129')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0040 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0040 + * @tc.desc : Set the textIndent property to 0, and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0040 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage130") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage130')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0040 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0050 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0050 + * @tc.desc : Set the textIndent property to -10, and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0050 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage131") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage131')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0050 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0060 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0060 + * @tc.desc : Set the textIndent property to -10, and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0060 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage132") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage132')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0060 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0070 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0070 + * @tc.desc : Set the textIndent property to '0', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0070 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage133") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage133')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0070 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0080 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0080 + * @tc.desc : Set the textIndent property to '0', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0080 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage134") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage134')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0080 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0090 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0090 + * @tc.desc : Set the textIndent property to '30px', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0090 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage135") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage135')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0090 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0100 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0100 + * @tc.desc : Set the textIndent property to '30px', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i ams". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0100 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage136") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage136')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0100 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0110 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0110 + * @tc.desc : Set the textIndent property to '-10px', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0110 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage137") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage137')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0110 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0120 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0120 + * @tc.desc : Set the textIndent property to '-10px', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0120 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage138") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage138')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0120 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0130 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0130 + * @tc.desc : Set the textIndent property to '10%', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0130 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage139") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage139')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0130 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0140 + * @tc.desc : Set the textIndent property to '10%', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage140") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage140')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0140 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0150 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0150 + * @tc.desc : Set the textIndent property to 'abc', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0150 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage141") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage141')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0150 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0160 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0160 + * @tc.desc : Set the textIndent property to 'abc', and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0160 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage142") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage142')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0160 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0170 + * @tc.desc : Do not set the textIndent property and input the text "本截断是按字截断文本截断是按字截断文本截断是按字截 + * 断文本i am". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage143") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage143')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0170 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0180 + * @tc.desc : Do not set the textIndent property and input the text "本截断是按字截断文本截断是按字截断文本截断是按字 + * 截断文本i am asdf". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage144") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage144')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0180 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0190 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text "文本截断是按字截断". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage145") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage145')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0190 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0200 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0200 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0200 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage146") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage146')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0200 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0210 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "てられますテキスト切り捨ては単語によって切り捨て". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage147") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage147')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0210 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0220 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨て + * られますテキストは単語によって切り". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage148") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage148')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0220 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0230 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage149") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage149')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0230 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0240 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0240 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. + * 텍스트 잘림은 단어로 자릅니다". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0240 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage150") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage150')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0240 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0250 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0250 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "This truncation is truncated text by". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0250 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage151") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage151')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0250 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0260 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0260 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "This truncation is truncating text by word Truncating text by word Truncating text by word Truncating + * text by word Truncating text by word Yes". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0260 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage152") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage152')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0260 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0270 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0270 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "按字截断によって切이 잘림This truncation is". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0270 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage153") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage153')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0270 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0280 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0280 + * @tc.desc : Set the wordBreak property to NORMAL, and input the text + * "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This + * truncation is按字截断によって切이 잘림This truncation is". + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0280 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage154") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage154')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0280 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0290 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0290 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "文本截断是按字截断" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0290 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage155") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage155')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0290 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0300 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0300 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0300 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage156") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage156')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0300 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0310 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0310 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "てられますテキスト切り捨ては単語によって切り捨て" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0310 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage157") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage157')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0310 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0320 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0320 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられ + * ますテキストは単語によって切り" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0320 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage158") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage158')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0320 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0330 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0330 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0330 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage159") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage159')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0330 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0340 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0340 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. + * 텍스트 잘림은 단어로 자릅니다" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0340 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage160") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage160')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0340 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0350 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0350 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "This truncation is truncated text by" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0350 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage161") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage161')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0350 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0360 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0360 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "This truncation is truncating text by word Truncating text by word Truncating text by word Truncating text + * by word Truncating text by word Yes by word Truncating text by word" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0360 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage162") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage162')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0360 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0370 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0370 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "按字截断によって切이 잘림This truncation is" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0370 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage163") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage163')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0370 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0380 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0380 + * @tc.desc : Set the wordBreak property to BREAK_ALL, and input the text + * "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This + * truncation is按字截断によって切이 잘림This truncation is" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0380 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage164") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage164')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0380 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0390 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0390 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "文本截断是按字截断" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0390 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage165") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage165')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0390 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0400 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0400 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0400 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage166") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage166')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0400 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0410 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0410 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "てられますテキスト切り捨ては単語によって切り捨て" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0410 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage167") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage167')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0410 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0420 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0420 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられます + * テキストは単語によって切り" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0420 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage168") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage168')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0420 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0430 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0430 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0430 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage169") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage169')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0430 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0440 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0440 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 + * 잘림은 단어로 자릅니다" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0440 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage170") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage170')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0440 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0450 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0450 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "This truncation is truncated text by" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0450 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage171") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage171')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0450 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0460 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0460 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "This truncation is truncating text by word Truncating text by word Truncating text by word Truncating text by + * word Truncating text by word Yes by word" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0460 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage172") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage172')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0460 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0470 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0470 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "按字截断によって切이 잘림This truncation is" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0470 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage173") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage173')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0470 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0480 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0480 + * @tc.desc : Set the wordBreak property to BREAK_WORD, and input the text + * "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This + * truncation is按字截断によって切이 잘림This truncation" + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0480 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage174") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('fontAttributePage174')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0480 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0490 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0490 + * @tc.desc : Set the maxLines property to 3 and input the text "本截断是按字截断文本截断是按字截断文本截断是按字截断文本 + * i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本". When you change maxLines from 3 to 5, input an + * additional character. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0490 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage175") + await Utils.sleep(2000) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributePage175')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0490 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0500 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0500 + * @tc.desc : Set maxLines to 3 and input the text "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截 + * 断文本截断是按字截断文本截断是按字截断文本". After changing maxLines from 5 back to 3, input an additional character. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0500 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage176") + await Utils.sleep(2000) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributePage176')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0500 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0510 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0510 + * @tc.desc : Set the Text component's width to 100%, leave the height unset, and set maxLines to 2. Input the + * text "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是". After switching + * from portrait to landscape orientation, input an additional character. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0510 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage177") + await Utils.sleep(2000) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributePage177')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0510 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0520 + * @tc.name : SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0520 + * @tc.desc : Set the `Text` component's width to 100%, do not set its height, and set `maxLines` to 2. Input the + * text "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是". After switching + * from landscape to portrait orientation, input an additional character. + */ + it('SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0520 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface02/fontAttributePage178") + await Utils.sleep(2000) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributePage178')); + await button.click(); + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_TEXT_TRUNCATION_0520 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface003.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface003.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..07134017e602c6351a92fa4545ef9cd69dfdc2e1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIAttributeFontInterfaceTest/UIAttributeFontInterface003.test.ets @@ -0,0 +1,2492 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import {UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, + ResizeDirection, WindowMode, PointerMatrix} from '@ohos.UiTest'; + +export default function UIAttributeFontInterface003() { + + describe('UIAttributeFontInterface003', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(500); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0130 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0130 + * @tc.desc : TextInput component + * 1. Tap the input box and input characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the `letterSpacing` button to adjust the character spacing (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0130 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle01") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle01_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle01_2')); + for(let i_01 = 0; i_01<9; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0130 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0140 + * @tc.desc : TextInput component + * 1. Tap the input box and input text, special characters, and spaces. + * 2. Do not set the letterSpacing property. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle02") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle02')); + for(let i = 0; i<9; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0140 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0150 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0150 + * @tc.desc : TextInput component + * 1. Tap the input box to input text, special characters, and spaces. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Clear the text and then input again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0150 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle03") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle03_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle03_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle03_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle03_4')); + for(let i_01 = 0; i_01<3; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0150 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0160 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0160 + * @tc.desc : TextInput component + * Set the character spacing of input box A to 3, and set the character spacing of input box B to -2. + * Drag and drop, or copy, the text from input box A to input box B. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0160 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle04") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle04_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle04_2')); + await button1.longClick() + let selectAll: Component = await driver.findComponent(ON.text('全选')); + if(selectAll){ + await selectAll.click() + await Utils.sleep(500) + let copy: Component = await driver.findComponent(ON.text('复制')); + let paste: Component = await driver.findComponent(ON.text('粘贴')); + await copy.click() + await Utils.sleep(500) + await button2.longClick() + await Utils.sleep(500) + await paste.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } else { + let copy: Component = await driver.findComponent(ON.text('复制')); + let paste: Component = await driver.findComponent(ON.text('粘贴')); + await copy.click() + await Utils.sleep(500) + await button2.longClick() + await Utils.sleep(500) + await paste.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + } + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0160 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0170 + * @tc.desc : TextInput component + * 1. In the empty text state, display the hint text. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle05") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle05')); + for(let i = 0; i<5; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0170 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0180 + * @tc.desc : TextInput component + * 1. Tap the `type` button to change the input field type to (Normal, Password, Email, Number, PhoneNumber, + * USER_NAME, NEW_PASSWORD, NUMBER_PASSWORD, NUMBER_DECIMAL). + * 2. Tap the input box to input characters. + * 3. Tap the `letterSpacing` button to dynamically change the line height to (-2,0,3,"5px","10%"). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle06") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle06_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle06_02')); + for(let i_01 = 0; i_01 < 10; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01==9){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0180 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0190 + * @tc.desc : TextInput component + * 1. Tap the `style` button to change the input box style to (Default, Inline). + * 2. Tap the `letterSpacing` button to dynamically change the line height to (-2,0,3,"5px","10%"). + * 3. Tap the input box to input characters. + * 4. In inline mode, input multiple lines of text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle07") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle07_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle07_2')); + for(let i_01 = 0; i_01 < 10; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01==9){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0190 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0200 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0200 + * @tc.desc : TextInput component + * 1. Tap the input box to input characters. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Tap the `textAlign` button to toggle the text alignment between (start, center, end). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0200 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle08") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle08_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle08_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle08_3')); + await button3.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<3; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==2 && i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0200 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0210 + * @tc.desc : TextInput component + * Click on the input box and enter characters. + * Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * Click the "fontSize" button to dynamically change the font size (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle09") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle09_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle09_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle09_3')); + await button1.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<4; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 3 && i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0210 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0220 + * @tc.desc : TextInput component + * Click on the input box and enter characters. + * Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * Long press to select a phrase + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle10") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle10_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle10_2')); + let input: Component = await driver.findComponent(ON.id('fontAttributeAndStyle10')); + await button1.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button2.click() + await Utils.sleep(500) + await input.longClick() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0220 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0230 + * @tc.desc : TextInput component + * 1. Tap the input box to input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle11") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle11')); + for(let i = 0; i<6; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0230 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0240 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0240 + * @tc.desc : TextInput component + * Click on the input box and enter characters. + * Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * Click the "fontSize" button to dynamically change the font size (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0240 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle12") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle12_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle12_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle12_3')); + await button1.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<4; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 3 && i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0240 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0250 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0250 + * @tc.desc : TextInput component + * 1. In the empty text state, display the hint text. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0250 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle13") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle13')); + for(let i = 0; i<6; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0250 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0260 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0260 + * @tc.desc : TextInput component + * 1.Tap the input box to input text, special characters, and spaces. + * 2.Tap the lineHeight button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3.After clearing the text, input characters again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0260 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle14") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle14_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle14_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle14_03')); + for(let i_01 = 0; i_01 < 6; i_01++){ + await button2.click() + for(let i_02 = 0; i_02 < 3; i_02++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + if(i_02==2 && i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0260 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0270 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0270 + * @tc.desc : TextInput component + * 1. Tap the `type` button to change the input field type to (Normal, Password, Email, Number, PhoneNumber, + * USER_NAME, NEW_PASSWORD, NUMBER_PASSWORD, NUMBER_DECIMAL). + * 2. Tap the input box to input characters. + * 3. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0270 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle15") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle15_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle15_02')); + for(let i_01 = 0; i_01 < 10; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 6; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5 && i_01==9){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0270 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0280 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0280 + * @tc.desc : TextInput component + * 1. Tap the `style` button to change the input box style to (Default, Inline). + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Tap the input box to input characters. + * 4. In inline mode, input multiple lines of text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0280 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle16") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle16_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle16_2')); + for(let i_01 = 0; i_01 < 10; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 6; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5 && i_01==9){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0280 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0290 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0290 + * @tc.desc : TextInput component + * 1. Tap the input box and input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Long press to select text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0290 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle17") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle17_1')); + let input: Component = await driver.findComponent(ON.type('TextInput')); + for(let i_01 = 0; i_01 < 10; i_01++){ + await button.click() + await Utils.sleep(500) + await input.longClick() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01==9){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0290 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0300 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0300 + * @tc.desc : TextInput component + * 1. Tap the input box to input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Tap the `decoration` button to display the decoration line. + * 4. Tap the `style` button to change the decoration line style to (Default, Inline). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0300 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle18") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle18_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle18_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle18_03')); + await button3.click() + for(let i_01 = 0; i_01 < 2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 6; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5 && i_01==1){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0300 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0310 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0310 + * @tc.desc : TextArea component + * 1. Tap the input box to input multiple lines of characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0310 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle19") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle19_01')); + let input: Component = await driver.findComponent(ON.id('fontAttributeAndStyle19_2')); + await input.click() + for(let i_01 = 0; i_01 < 9; i_01++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0310 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0320 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0320 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Do not set the `decoration` property. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0320 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle20") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let input: Component = await driver.findComponent(ON.id('fontAttributeAndStyle20')); + await input.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0320 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0330 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0330 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Do not set the `decoration.color`. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0330 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle21") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle21_01')); + let input: Component = await driver.findComponent(ON.id('fontAttributeAndStyle21_2')); + await input.click() + for(let i_01 = 0; i_01 < 4; i_01++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01==3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0330 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0360 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0360 + * @tc.desc : TextArea component + * 1. Do not input any characters, leave the text field empty. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0360 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle23") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle23')); + for(let i_01 = 0; i_01 < 9; i_01++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0360 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0370 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0370 + * @tc.desc : TextArea component + * 1. Tap the `type` button to change the input field type to (Normal, Email, Number, PhoneNumber). + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the input box to input characters. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0370 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle24") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle24_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle24_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle24_3')); + await button3.click() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 4; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 9; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==8 && i_01==3 ){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0370 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0380 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0380 + * @tc.desc : TextArea component + * 1. Tap the `style` button to change the input box style to (Default, Inline). + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the input box to input multiple lines of text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0380 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle25") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle25_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle25_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle25_3')); + await button3.click() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 9; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==8 && i_01==1){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0380 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0390 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0390 + * @tc.desc : TextArea component + * 1. Tap the input box to input multiple lines of characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the `textAlign` button to toggle the text alignment (start, center, end). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0390 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle26") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle26_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle26_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle26_3')); + await button3.click() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 9; i_01++){ + await button2.click() + for(let i_02 = 0; i_02 < 3; i_02++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==2 && i_01==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0390 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0400 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0400 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the `fontSize` button to dynamically change the font size (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0400 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle27") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle27_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle27_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle27_3')); + await button3.click() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 9; i_01++){ + await button2.click() + for(let i_02 = 0; i_02 < 4; i_02++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==3 && i_01==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0400 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0410 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0410 + * @tc.desc : TextArea component + * 1. Tap the `maxLength` button to set the maximum number of characters (20, 50). + * 2. Tap the `showCounter` and set it to true to display the character count (true, false). + * 3. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 4. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 5. Tap the input box to input characters. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0410 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle28") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle28_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle28_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle28_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle28_4')); + let button5: Component = await driver.findComponent(ON.id('fontAttributeAndStyle28_5')); + await button3.click() + await Utils.sleep(500) + for(let i_01 = 0; i_01 < 2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02 < 2; i_02++){ + await button2.click() + for(let i_03 = 0; i_03 < 9; i_03++){ + await button3.click() + await button4.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button5.click() + if(i_01==1 && i_02==1 && i_03==8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0410 finish.`); + done() + } + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0420 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0420 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the text decoration type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the text decoration color (color.Pink, 0x008000, 'rgb(255, 0, 0)' + * , #0000ff, $r('app.color.Yellow')). + * 4. Tap the `letterSpacing` button to adjust the spacing between letters (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0420 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle29") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle29_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle29_2')); + for(let i_01 = 0; i_01<9; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0420 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0430 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0430 + * @tc.desc : TextArea component + * 1. Tap the input box to input text, special characters, and spaces. + * 2. Do not set the `letterSpacing` property. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0430 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle30") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle30')); + for(let i = 0; i<3; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0430 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0440 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0440 + * @tc.desc : TextArea component + * 1. Tap the input box to input text, special characters, and spaces. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Clear the text and then input again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0440 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle31") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle31_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle31_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle31_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle31_4')); + for(let i_01 = 0; i_01<3; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0440 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0460 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0460 + * @tc.desc : TextArea component + * 1. In the empty text state, display the hint text. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0460 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle32") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle32')); + for(let i = 0; i<5; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0460 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0470 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0470 + * @tc.desc : TextArea component + * 1. Tap the `type` button to change the input field type to (Normal, Email, Number, PhoneNumber). + * 2. Tap the input box to input characters. + * 3. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0470 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle33") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle33_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle33_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle33_3')); + for(let i_01 = 0; i_01<4; i_01++){ + await button1.click() + await button2.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button3.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0470 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0480 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0480 + * @tc.desc : TextArea component + * 1. Tap the `style` button to change the input box style to (Default, Inline). + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Tap the input box to input multiple lines of text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0480 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle34") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle34_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle34_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle34_3')); + for(let i_01 = 0; i_01<2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await button3.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 1){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0480 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0490 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0490 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Tap the `textAlign` button to toggle the text alignment between (start, center, end). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0490 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle35") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle35_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle35_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle35_3')); + await button3.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<3; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==2 && i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0490 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0500 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0500 + * @tc.desc : TextArea component + * Click on the input box and enter characters. + * Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * Click the "fontSize" button to dynamically change the font size (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0500 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle36") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle36_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle36_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle36_3')); + await button3.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<4; i_02++){ + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 3 && i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0500 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0510 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0510 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Long press to select a phrase. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0510 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle37") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle37_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle37_2')); + let textArea: Component = await driver.findComponent(ON.type('TextArea')); + await button2.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button1.click() + await textArea.longClick() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0510 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0520 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0520 + * @tc.desc : TextArea component + * 1. Tap the `maxLength` button to set the maximum number of characters to (20, 50). + * 2. Tap the `showCounter` and set it to true to display the character count; set it to false to hide the count. + * 3. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 4. Tap the input box to input characters. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0520 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle38") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle38_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle38_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle38_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle38_4')); + for(let i_01 = 0; i_01<2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<2; i_02++){ + await button2.click() + for(let i_03 = 0; i_03<5; i_03++){ + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 1 && i_02==1 && i_03==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0520 finish.`); + done() + } + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0530 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0530 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0530 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle39") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle39_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle39_2')); + await button1.click() + for(let i = 0; i<5; i++){ + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0530 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0540 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0540 + * @tc.desc : TextArea component + * 1. Tap the input box to input multiple lines of characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Tap the `fontSize` button to dynamically change the font size to (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0540 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle40") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle40_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle40_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle40_3')); + await button1.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<4; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 3 && i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0540 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0550 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0550 + * @tc.desc : TextArea component + * 1. In the empty text state, display the hint text. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0550 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle41") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle41')); + for(let i = 0; i<5; i++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0550 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0560 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0560 + * @tc.desc : TextArea component + * 1. Tap the input box to input text, special characters, and spaces. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Clear the text and then input characters again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0560 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle42") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle42_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle42_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle42_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle42_4')); + for(let i_01 = 0; i_01<3; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0560 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0570 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0570 + * @tc.desc : TextArea component + * 1. Tap the `type` button to change the input field type to (Normal, Email, Number, PhoneNumber). + * 2. Tap the input box to input characters. + * 3. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0570 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle43") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle43_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle43_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle43_3')); + for(let i_01 = 0; i_01<4; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<6; i_02++){ + await button2.click() + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5 && i_01 == 3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0570 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0580 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0580 + * @tc.desc : TextArea component + * 1. Tap the `style` button to change the input box style to (Default, Inline). + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Tap the input box to input characters. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0580 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle44") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle44_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle44_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle44_3')); + for(let i_01 = 0; i_01<2; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<6; i_02++){ + await button3.click() + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5 && i_01 == 1){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0580 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0590 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0590 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Long press to select the text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0590 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle45") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle45_1')); + let textArea: Component = await driver.findComponent(ON.type('TextArea')); + for(let i_01 = 0; i_01 < 5; i_01++){ + await button.click() + await Utils.sleep(500) + await textArea.longClick() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0590 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0600 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0600 + * @tc.desc : TextArea component + * 1. Tap the input box to input characters. + * 2. Tap the `lineHeight` button to dynamically change the line height to (-5, 0, 10, 20, '30%', '40vp'). + * 3. Tap the `decoration` button to display the decoration line. + * 4. Tap the `style` button to change the decoration line style to (Default, Inline). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0600 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle46") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle46_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle46_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle46_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle46_4')); + await button4.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<2; i_02++){ + await button2.click() + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==1 && i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0600 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0610 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0610 + * @tc.desc : Search component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the text decoration type to (Underline, LineThrough, Overline, + * None). + * 3. Tap the `decoration.color` button to change the text decoration color to (color.Pink, 0x008000, + * 'rgb(255, 0, 0)', #0000ff, $r('app.color.Yellow')). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0610 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle47") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle47_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle47_2')); + await button1.click() + for(let i_01 = 0; i_01<9; i_01++){ + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0610 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0620 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0620 + * @tc.desc : Search component + * 1. Tap the input box to input characters. + * 2. Do not set the `decoration` property. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0620 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle48") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle48')); + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0620 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0630 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0630 + * @tc.desc : Search component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Do not set the `decoration.color`. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0630 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle49") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle49_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle49_2')); + await button1.click() + for(let i_01 = 0; i_01<4; i_01++){ + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0630 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0700 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0700 + * @tc.desc : Search component + * 1. Tap the input box to input characters. + * 2. Tap the `decoration.type` button to change the decoration line type (Underline, LineThrough, Overline, None). + * 3. Tap the `decoration.color` button to change the decoration line color (color.Pink, 0x008000, 'rgb(255, 0, 0)', + * #0000ff, $r('app.color.Yellow')). + * 4. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0700 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle50") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle50_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle50_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle50_3')); + await button1.click() + for(let i_01 = 0; i_01<9; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 4 && i_01 == 8){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0700 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0720 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0720 + * @tc.desc : Search component + * 1. Tap the input box to input text, special characters, and spaces. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + * 3. Clear the text and then input again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0720 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle51") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle51_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle51_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle51_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle51_3')); + await button1.click() + for(let i_01 = 0; i_01<3; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 4 && i_01 == 2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0720 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0740 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0740 + * @tc.desc : Search component + * 1. In the empty text state, display the hint text. + * 2. Tap the `letterSpacing` button to adjust the letter spacing to (-2, 0, 3, '5px', '10%'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0740', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0740 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle52") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle52')); + for(let i_02 = 0; i_02<5; i_02++){ + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0740 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0750 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0750 + * @tc.desc : Search component + * Click the "type" button to change the type of the input box (Normal, Email, Number, PhoneNumber) + * Click on the input box and enter characters + * Click the "letterSpacing" button to adjust the letter spacing (-2, 0, 3, '5px', '10%') + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0750 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle53") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle53_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle53_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle53_3')); + for(let i_01 = 0; i_01<4; i_01++){ + await button1.click() + await button2.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 4 && i_01 == 3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0750 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0760 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0760 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "letterSpacing" button to adjust the letter spacing between characters (-2, 0, 3, '5px', '10%'). + * Click the "textAlign" button to switch the text alignment (start, center, end). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0760 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle54") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle54_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle54_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle54_3')); + await button1.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<3; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 2 && i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0760 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0780 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0780 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "letterSpacing" button to adjust the spacing between the characters (-2, 0, 3, '5px', '10%'). + * Long-press on the input box to select a word or phrase. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0780 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle55") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle55_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle55_2')); + let search: Component = await driver.findComponent(ON.type('Search')); + await button1.click() + for(let i_01 = 0; i_01<5; i_01++){ + await button2.click() + await search.longClick() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0780 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0790 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0790 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "lineHeight" button to change the line height (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0790 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle56_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle56_2')); + await button1.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0790 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0800 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0800 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "lineHeight" button to dynamically change the line height (-5, 0, 10, 20, '30%', '40vp'). + * Click the "fontSize" button to dynamically change the font size (0, 10, 20, 30). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0800 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle57") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle57_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle57_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle57_3')); + await button1.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button2.click() + for(let i_02 = 0; i_02<4; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 3 && i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0800 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0810 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0810 + * @tc.desc : Search component + * Display hint text when the input box is empty. + * Click the "lineHeight" button to dynamically change the line height (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0810 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle58')); + for(let i_01 = 0; i_01<6; i_01++){ + await button.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0810 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0820 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0820 + * @tc.desc : Search component + * Click on the input box and enter text, special characters, and spaces. + * Click the "lineHeight" button to dynamically change the line height (-5, 0, 10, 20, '30%', '40vp'). + * Clear the text and enter characters again. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0820 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle59") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle59_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle59_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle59_3')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle59_4')); + for(let i_01 = 0; i_01<3; i_01++){ + await button1.click() + for(let i_02 = 0; i_02<5; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==4 && i_01 == 2){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0820 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0830 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0830 + * @tc.desc : Search component + * Click the "type" button to change input type (Normal, Email, Number, PhoneNumber). + * Click on the input box and enter characters. + * Click the "lineHeight" button to change line height (-5, 0, 10, 20, '30%', '40vp'). + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0830 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle60") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle60_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle60_2')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle60_3')); + for(let i_01 = 0; i_01<4; i_01++){ + await button1.click() + await button2.click() + for(let i_02 = 0; i_02<6; i_02++){ + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02 == 5 && i_01 == 3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0830 finish.`); + done() + } + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0840 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0840 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "lineHeight" button to dynamically change the line height (-5, 0, 10, 20, '30%', '40vp'). + * Long-press to select text. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0840 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle61") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle61_1')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle61_2')); + await button1.click() + for(let i_01 = 0; i_01<6; i_01++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_01 == 5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0840 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0850 + * @tc.name : SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0850 + * @tc.desc : Search component + * Click on the input box and enter characters. + * Click the "lineHeight" button to dynamically change the line height (-5, 0, 10, 20, '30%', '40vp'). + * Click the "decoration" button to display text decoration lines. + */ + it('SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0850', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0850 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle62") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle62_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle62_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle62_03')); + await button1.click() + await button3.click() + for(let i_02 = 0; i_02 < 6; i_02++){ + await button2.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i_02==5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LINEHEIGHT_DECORATION_LETTERSPACING_0850 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0020 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0020 + * @tc.desc : Use the addsymbolspan interface, set value: $r to introduce sys.media.ohos_trash_circle (click to + * add a system resource symbolSpan) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0020 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle63") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0020 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0030 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0030 + * @tc.desc : Use the addSymbolSpan interface to set value: $r to introduce app.media.img2 (click to add a custom + * symbolSpan) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0030 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle64") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0030 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0040 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0040 + * @tc.desc : Click on "Add symbolSpan" (to add a symbolSpan using the addSymbolSpan interface without setting + * the offset) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0040 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle65") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button: Component = await driver.findComponent(ON.id('fontAttributeAndStyle65_01')); + await button.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0040 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0060 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0060 + * @tc.desc : Click on "fontsize++" / "fontsize--" (to adjust the fontsize in the "Add Symbolspan1" button) + * Click on "Add Symbolspan1" (to add a symbolspan using the addsymbolspan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0060 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle66") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle66_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle66_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle66_03')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0060 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0070 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0070 + * @tc.desc : Set fontSize to 10, -10, '10abc', '50%' use addSymbolSpan to add + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0070 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle67") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle67_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle67_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle67_03')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle67_04')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0070 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0080 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0080 + * @tc.desc : Click on "fontcolor" and select from "color.red, color.black, color.pink, {color.red,color.black}, + * {color.red,color.black,color.pink}" (to set the fontcolor in the "Add symbolSpan1" button) + * Click on "Add symbolSpan1" (to add a symbolSpan using the addSymbolSpan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0080 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle68") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle68_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle68_02')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0080 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0090 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0090 + * @tc.desc : Click on "Set fontcolor to 0xff0000" (to set the fontcolor for adding symbolspan2) + * Click on "Add Symbolspan2" (to add a symbolspan using the addsymbolspan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0090 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle69") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle69_01')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0090 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0100 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0100 + * @tc.desc : Set fontColor, '#008800','rgba(0,255,0,1)','rgb(0,0,255)',then use the addSymbolSpan interface + * to add the symbolSpan + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0100 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle70") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle70_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle70_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle70_03')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0100 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0110 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0110 + * @tc.desc : Click on "fontcolor $r("app.color.ColorRed")" (to set the fontcolor in the "Add symbolSpan3" button) + * Click on "Add symbolSpan3" (to add a symbolSpan using the addSymbolSpan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0110 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle71") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle71_01')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0110 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0120 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0120 + * @tc.desc : Click on "fontWeight+50" / "fontWeight-50" (to set the fontWeight in the "Add Symbolspan1" button) + * Click on "Add Symbolspan1" (to add a symbolspan using the addsymbolspan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0120 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle72") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle72_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle72_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle72_03')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0120 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0130 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0130 + * @tc.desc : Set fontWeight=("600","-100","400abc","500abc") and use the addSymbolSpan interface to add a + * symbolSpan. + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0130 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle73") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle73_01')); + let button2: Component = await driver.findComponent(ON.id('fontAttributeAndStyle73_02')); + let button3: Component = await driver.findComponent(ON.id('fontAttributeAndStyle73_03')); + let button4: Component = await driver.findComponent(ON.id('fontAttributeAndStyle73_04')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button2.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button3.click() + windowSnap.snapShot() + await Utils.sleep(500) + await button4.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0130 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0140 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0140 + * @tc.desc : Click on "fontWeight" (to toggle the fontWeight (Lighter, Normal, Regular, Medium, Bold, Bolder) + * in the "Add SymbolSpan1" button) + * Click on "Add symbolSpan1" (to add a symbolSpan using the addSymbolSpan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0140 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle74") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle74_01')); + await Utils.sleep(500) + for(let i = 0; i<5; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==5){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0140 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0150 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0150 + * @tc.desc : Click on "fontsize++" / "fontsize--" (to set the fontsize in the "Update Symbolspan1" button) + * Long press to select an existing symbolspan + * Click on "Update Symbolspan1" (to add a symbolspan using the updatesymbolspan interface) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0150 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle75") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle75_01')); + await Utils.sleep(500) + for(let i = 0; i<4; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0150 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0160 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0160 + * @tc.desc : Set fontSize to 10, -10, '10abc', '50%' and call updatesymbolspan to update + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0160 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle76") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle76_01')); + await Utils.sleep(500) + for(let i = 0; i<4; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==4){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0160 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0170 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0170 + * @tc.desc : Click "fontcolor" and select from "color.red, color.black, color.pink, {color.red,color.black}, + * {color.red,color.black,color.pink}" (to set the fontcolor in the "Update symbolspan1" button) + * Long press to select + * Click "Update symbolspan1" (use the updatesymbolspan interface to update the symbolspan) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0170 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle77") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle77_01')); + for(let i = 0; i<3; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0170 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0180 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0180 + * @tc.desc : Click "Set fontcolor to 0xff0000" (to set the fontcolor in the "Update symbolSpan2" function) + * Long press to select + * Click "Update symbolSpan2" (use the updateSymbolSpan interface to update the symbolSpan) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0180 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle78") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle78_01')); + await button1.click() + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0180 finish.`); + done() + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0190 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0190 + * @tc.desc : Set fontColor, '#008800','rgba(0,255,0,1)','rgb(0,0,255)',then use the updateSymbolSpan interface + * to update the symbolSpan + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0190 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle79") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle79_01')); + for(let i = 0; i<3; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==3){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0190 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0210 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0210 + * @tc.desc : Click "fontWeight+50" / "fontWeight-50" (to set the fontWeight in the "Update symbolSpan1" button) + * Long press to select, then use the updateSymbolSpan interface to update the symbolSpan + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0210 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle80") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle80_01')); + for(let i = 0; i<6; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==6){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0210 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0220 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0220 + * @tc.desc : Set fontWeight to '600', '-100', '400abc', '500%', and call updateSpanStyle to update the style + * of the selected content. + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0220 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle81") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle81_01')); + for(let i = 0; i<6; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==6){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0220 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0230 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0230 + * @tc.desc : Click "fontWeight" (toggle the fontWeight (Lighter, Normal, Regular, Medium, Bold, Bolder) in + * the "Update symbolspan1" button) + * Long press to select, then click "Update symbolspan1" (use the updatesymbolspan interface to update the + * symbolspan) + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0230 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle82") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle82_01')); + for(let i = 0; i<6; i++){ + await button1.click() + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + if(i==6){ + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0230 finish.`); + done() + } + } + }) + + /* + * @tc.number : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0360 + * @tc.name : SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0360 + * @tc.desc : Click "setTypingStyle" (use setTypingStyle to set fontsize to 30, fontcolor to red, + * and fontweight to 600), Click to add a "symbolspan" + */ + it('SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0360 start.`); + Settings.createWindow("testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle86") + await Utils.sleep(500) + let driver: Driver = Driver.create(); + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('fontAttributeAndStyle86_01')); + let richEditor:Component = await driver.findComponent(ON.id('RichEditor_086')); + await button1.click() + await Utils.sleep(500) + await richEditor.inputText("999999999") + await Utils.sleep(500) + windowSnap.snapShot() + await Utils.sleep(500) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_RICHEDITOR_SYMBOL_SHUFFLEEDITING_0360 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage01.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage01.ets new file mode 100644 index 0000000000000000000000000000000000000000..c572d9043a62e6af943738afcb3a1028998d96d3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage01.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage01 { + @State changeValue: string = '' + @State submitValue: string = '' + + build() { + Column() { + Text('onSubmit:' + this.submitValue).fontSize(18).margin({top:50}) + Search({ value: this.changeValue, placeholder: 'Type to search...' }) + .searchButton('SEARCH') + .searchIcon({ + src: $r('app.media.icon') + }) + .width('90%') + .height(60) + .maxLength(20) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 18, weight: 400 }) + .textFont({ size: 18, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage03.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage03.ets new file mode 100644 index 0000000000000000000000000000000000000000..5cbc02cfb5232ed32b7212a09d7f472c430a3710 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage03.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage03 { + @State changeValue: string = '' + @State submitValue: string = '' + + build() { + Column() { + Text('onSubmit:' + this.submitValue).fontSize(18).margin({top:50}) + Search({ value: this.changeValue, placeholder: 'Type to search...' }) + .searchButton('SEARCH') + .searchIcon({ + src: $r('app.media.big_icon') + }) + .width('90%') + .height(60) + .maxLength(20) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 18, weight: 400 }) + .textFont({ size: 18, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage04.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage04.ets new file mode 100644 index 0000000000000000000000000000000000000000..a68b13348a856dbf05cb14500b435b7c5612d575 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage04.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage04 { + @State changeValue: string = '' + @State submitValue: string = '' + + build() { + Column() { + Text('onSubmit:' + this.submitValue).fontSize(18).margin({top:50}) + Search({ value: this.changeValue, placeholder: 'Type to search...' }) + .searchButton('SEARCH') + .searchIcon({ + src: $r('app.media.icon') + }) + .width('90%') + .height(60) + .maxLength(20) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 18, weight: 400 }) + .textFont({ size: 18, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage05.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage05.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e57f1ae9d7ea20ebab2e567ad7bef67de7a2edf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage05.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage05 { + @State changeValue: string = '' + @State submitValue: string = '' + + build() { + Column() { + Text('onSubmit:' + this.submitValue).fontSize(18).margin({top:50}) + Search({ value: this.changeValue, placeholder: 'Type to search...' }) + .searchButton('SEARCH') + .searchIcon({ + src: $r('app.media.icon') + }) + .width('90%') + .height(90) + .maxLength(20) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 18, weight: 400 }) + .textFont({ size: 18, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage06.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage06.ets new file mode 100644 index 0000000000000000000000000000000000000000..ada1e4ee42dc016cfab43cb5c5882066207120d7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage06.ets @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage06 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span('') + } + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage07.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage07.ets new file mode 100644 index 0000000000000000000000000000000000000000..82bb3574ad5809d6c3a41f655acd9430d90ee0bd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage07.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage07 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span($r("app.string.span")) + .fontSize(24) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage08.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage08.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1fbc32881fe3347af8463cb83e7fa465a6c8e8f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage08.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage08 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage09.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage09.ets new file mode 100644 index 0000000000000000000000000000000000000000..b96737cc138fd6ea47352b61ad411b7641ff3ba9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage09.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage09 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + .decoration({ type: TextDecorationType.None, color: Color.Red }) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage10.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage10.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce05fc43575723541042b534450d027db89e8779 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage10.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage10 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage100.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage100.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f4e882b4495d0b6da7e0a0f6911f77ece1cdfd6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage100.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage100 { + + build() { + Column() { + Text() { + ImageSpan($r('app.media.icon')) + .width('60vp') + .height('60vp') + .verticalAlign(ImageSpanAlignment.CENTER) + .textBackgroundStyle({color: Color.Green, radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage101.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage101.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d646cb6c41b9de63e7e8fa3f577605223114cac --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage101.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage101 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:"0xff0000",radius: 5}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage102.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage102.ets new file mode 100644 index 0000000000000000000000000000000000000000..052d83406d55c076248e76ad1df18cebaed67667 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage102.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage102 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:Color.Green,radius: 0}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage103.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage103.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b099a7458f735b2edade957d8fcd015d5d2e373 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage103.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage103 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:Color.Green,radius: -5}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage104.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage104.ets new file mode 100644 index 0000000000000000000000000000000000000000..13854af6a888e56bb981d99e8918acc840bd23ac --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage104.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage104 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:'#ffc0cb',radius: 5}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage105.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage105.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5652ee7fb9a96f0c28be80f4e2a224840bfc4e0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage105.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage105 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:$r('app.color.yellow'),radius: 5}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage106.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage106.ets new file mode 100644 index 0000000000000000000000000000000000000000..05c444b90787dad8e575624d8333ae56162c18e9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage106.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage106 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:Color.Green,radius: '10%'}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage107.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage107.ets new file mode 100644 index 0000000000000000000000000000000000000000..e3969f962433fa598f5f5a959646186f3a1364db --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage107.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage107 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:Color.Green,radius: '10vp'}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage108.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage108.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd8ac4f042c6a04dadfd50cbe05d77dbc81c71ed --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage108.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage108 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:{topLeft:10} }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage109.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage109.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b2bd3ea7adcdfb5da82358d72e8d0208f38b025 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage109.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage109 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:{topRight:10} }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage11.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage11.ets new file mode 100644 index 0000000000000000000000000000000000000000..a024b8e039ce39fe3be9ee29f2d2cbe5cc1559fd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage11.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage11 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + .decoration({ type: TextDecorationType.LineThrough, color: Color.Yellow }) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage110.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage110.ets new file mode 100644 index 0000000000000000000000000000000000000000..05088f8b5d905ef16a99260075b2369058eaa210 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage110.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage110 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:{bottomLeft:10} }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage111.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage111.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6ece1877b63551f82a4d2d86c65dd87ce825af8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage111.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage111 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:{bottomRight:10} }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage112.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage112.ets new file mode 100644 index 0000000000000000000000000000000000000000..22c7bd5e74a98bff8afa90f4a9fa0a708e7dc47f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage112.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage112 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:{topLeft: 10, topRight: 20, + bottomLeft: 40, bottomRight: 80} }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage113.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage113.ets new file mode 100644 index 0000000000000000000000000000000000000000..34c6e09b5a3e05e4ed2688a268d5f4fff960d648 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage113.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage113 { + @State colorStyle:Color = Color.Green + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:this.colorStyle, radius:5 }) + .fontColor(Color.Black) + }.margin({top:50}) + + Button("背景色:红色") + .id("fontAttributePage113") + .fontSize(18) + .onClick(()=>{ + this.colorStyle = Color.Red + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage114.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage114.ets new file mode 100644 index 0000000000000000000000000000000000000000..a78d57e735c5afe3fa96dc7a85434fc2391d4082 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage114.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage114 { + @State radiusStyle:number = 10 + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:Color.Green, radius:this.radiusStyle }) + .fontColor(Color.Black) + }.margin({top:50}) + + Button("圆角:20") + .id("fontAttributePage114_20") + .fontSize(18) + .onClick(()=>{ + this.radiusStyle = 20 + }) + .margin({top:50}) + + Button("圆角:30") + .id("fontAttributePage114_30") + .fontSize(18) + .onClick(()=>{ + this.radiusStyle = 30 + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage115.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage115.ets new file mode 100644 index 0000000000000000000000000000000000000000..10a64b0d9d3f0ea852a7106aa57d08b9b88fb2b6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage115.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage115 { + @State radiusStyle:number = 5 + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ radius:this.radiusStyle }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage116.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage116.ets new file mode 100644 index 0000000000000000000000000000000000000000..d7c3e0a6771b1f9ff617fd993e7c5f6c45cb50b9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage116.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage116 { + @State colorStyle:Color = Color.Green + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({ color:this.colorStyle }) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage117.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage117.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd047a54d3596d9a85d02ef7795258d8d02868e0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage117.ets @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage117 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span(' Hello World ! ') + .fontSize('16fp') + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Green,radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage118.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage118.ets new file mode 100644 index 0000000000000000000000000000000000000000..7420bf62b0d28cd951b491cb1b320aef176c0203 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage118.ets @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage118 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('140vp') + .height('140vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('Hello World !') + .fontSize('16fp') + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Green,radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage119.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage119.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfbcfc47c6509c2d4f40a4edef11cfe587a8ad03 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage119.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage119 { + @State fontSize:Length = 18 + @State imageSize:Length = '80vp' + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width(this.imageSize) + .height(this.imageSize) + .verticalAlign(ImageSpanAlignment.CENTER) + Span('Hello World !') + .fontSize(this.fontSize) + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Green,radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + + Button("字体大小++") + .id("fontAttributePage119_01") + .fontSize(18) + .onClick(()=>{ + this.fontSize = 30 + }) + .margin({top:50}) + + Button("图片大小++") + .id("fontAttributePage119_02") + .fontSize(18) + .onClick(()=>{ + this.imageSize = '140vp' + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage12.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage12.ets new file mode 100644 index 0000000000000000000000000000000000000000..d240e47606fb5257553d2e3ce7d88c194402436a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage12.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage12 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + .decoration({ type: TextDecorationType.Overline, color: Color.Blue }) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage120.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage120.ets new file mode 100644 index 0000000000000000000000000000000000000000..eb89d8b26cc751cac377256a77c822412519d250 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage120.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage120 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + .textBackgroundStyle({color:Color.Red,radius: 5}) + Span('Hello World !') + .fontSize('16fp') + .fontColor(Color.Black) + .textBackgroundStyle({color:Color.Blue,radius: 5}) + }.textBackgroundStyle({color:Color.Green,radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage121.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage121.ets new file mode 100644 index 0000000000000000000000000000000000000000..acaf60592a811ac06f0c439cc3068710f40b8336 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage121.ets @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage121 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('Hello World !') + .fontSize('16fp') + .fontColor(Color.Black) + .textBackgroundStyle({color:Color.Blue,radius: 5}) + }.textBackgroundStyle({color:Color.Green,radius: 5}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage122.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage122.ets new file mode 100644 index 0000000000000000000000000000000000000000..868a62d3a6c05f60dbc37b407e166b430ba836b4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage122.ets @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage122 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('Hello World !') + .fontSize('16fp') + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Red,radius: 5}) + }.backgroundColor(Color.Blue) + .margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage123.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage123.ets new file mode 100644 index 0000000000000000000000000000000000000000..86d85901d7e77131808a67bd7e4f72b93043300d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage123.ets @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage123 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('Hello World !') + .fontSize('16fp') + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Red,radius: 5}) + }.borderRadius(10) + .margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage124.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage124.ets new file mode 100644 index 0000000000000000000000000000000000000000..52b96b116b2123b873af3e6c33630fefc78a5351 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage124.ets @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage124 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('20vp') + .height('20vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('1') + .fontSize('16fp') + .fontColor(Color.Black) + ImageSpan($r('app.media.icon')) + .width('20vp') + .height('20vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('2') + .fontSize('16fp') + .fontColor(Color.Black) + ImageSpan($r('app.media.icon')) + .width('20vp') + .height('20vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span('3') + .fontSize('16fp') + .fontColor(Color.Black) + }.textBackgroundStyle({color:Color.Red,radius: 5}) + }.borderRadius(10) + .margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage125.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage125.ets new file mode 100644 index 0000000000000000000000000000000000000000..59a9fbb643458a8da09dd436ed78c20ed964dd56 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage125.ets @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage125 { + @State arr:number[] = [1,2,3,4,5,6,7,8,9,10,11,12] + + build() { + Column() { + Text() { + ContainerSpan() { + ForEach(this.arr, (item: number) => { + ImageSpan($r('app.media.icon')) + .width('60vp') + .height('60vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span(''+ String(item)) + .fontSize('16fp') + .fontColor(Color.Black) + }, (item: string) => item) + }.textBackgroundStyle({color:Color.Red,radius: 5}) + }.borderRadius(10) + .margin({top:50}) + .width(240) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage126.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage126.ets new file mode 100644 index 0000000000000000000000000000000000000000..f3a686e44b2bc691fd6fa473dd765129b359cf02 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage126.ets @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage126 { + @State textWidth:Length = 185 + @State arr:number[] = [1,2,3] + + build() { + Column() { + Text() { + ContainerSpan() { + ForEach(this.arr, (item: number) => { + ImageSpan($r('app.media.icon')) + .width(40) + .height(40) + .verticalAlign(ImageSpanAlignment.CENTER) + Span(''+ String(item)) + .fontSize('16fp') + .fontColor(Color.Black) + .borderWidth(1) + }, (item: string) => item) + }.textBackgroundStyle({color:Color.Red,radius: 5}) + }.borderRadius(10) + .width(this.textWidth) + .borderWidth(1) + + Button("Text组件宽度--") + .id("fontAttributePage126_01") + .fontSize(18) + .onClick(()=>{ + this.textWidth = 140 + }) + .margin({top:50}) + + Button("Text组件宽度++") + .id("fontAttributePage126_02") + .fontSize(18) + .onClick(()=>{ + this.textWidth = 250 + }) + .margin({top:50}) + .margin({top:50}) + .width(240) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage127.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage127.ets new file mode 100644 index 0000000000000000000000000000000000000000..5591d6db852c3e015803bf0adbc8d4735761eedc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage127.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage127 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(10) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:文本截断是按字截断") + .id("fontAttributePage127") + .fontSize(18) + .onClick(()=>{ + this.text = "文本截断是按字截断" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage128.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage128.ets new file mode 100644 index 0000000000000000000000000000000000000000..a35f45d144ef94f024dc6bf7e8093ab9e0c04dfe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage128.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage128 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text + this.textSize.height) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(10) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i ams") + .id("fontAttributePage128") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i ams" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage129.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage129.ets new file mode 100644 index 0000000000000000000000000000000000000000..89a98adb006fa6aec0b5c75e74f84420fabf3b05 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage129.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage129 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(0) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage129") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage13.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage13.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c9c9116bd34300ce1c06aa80e2c30e4e9c387f8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage13.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage13 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(24) + .fontColor(Color.Red) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage130.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage130.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ab66448afebbe5982883bf680b213f706b6d219 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage130.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage130 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(0) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage130") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage131.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage131.ets new file mode 100644 index 0000000000000000000000000000000000000000..47b8ca1ae3804a0d29551883d2107ffca82a0b41 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage131.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage131 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(-10) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage131") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage132.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage132.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b386108ad92d616dbbf36d54f1596771cf184b9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage132.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage132 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent(-10) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage132") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage133.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage133.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd04840664af695c2c1a683ec653f68797ec5a46 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage133.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage133 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("0") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage133") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage134.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage134.ets new file mode 100644 index 0000000000000000000000000000000000000000..4734121121f62a198c3bbb826520e7c6344edf50 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage134.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage134 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("0") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage134") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage135.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage135.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff24f935f1194e026c8a7a3206317b783b02788e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage135.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage135 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("30px") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage135") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage136.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage136.ets new file mode 100644 index 0000000000000000000000000000000000000000..1145e460a5aa04e2b82c4e9e2f546b3914a1bf91 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage136.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage136 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("30px") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i ams") + .id("fontAttributePage136") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i ams" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage137.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage137.ets new file mode 100644 index 0000000000000000000000000000000000000000..41eb5ced200df746a09015adb18bbd70a76fdd23 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage137.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage137 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("-10px") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage137") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage138.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage138.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e535a3d30028f98b1a085c8017c2a6fcba70a3d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage138.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage138 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("-10px") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage138") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage139.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage139.ets new file mode 100644 index 0000000000000000000000000000000000000000..58b7fed327da3f45f5014ead5d14aa4b8cd8e49e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage139.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage139 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("10%") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage139") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage14.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage14.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0f2f596cf5eeb6bfd95cb19fe2a978ce5a75f7a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage14.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Utils from '../../../test/model/Utils' + +@Entry +@Component +struct fontAttributePage14 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + @State spanFontSize014:string = "" + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize("10fp") + .id("fontAttribute_span_014") + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + + Text(this.spanFontSize014) + .fontSize(24) + .margin({top:30}) + + Button() + .onClick(async ()=>{ + let strJson1 = getInspectorByKey('ratingFocusText01'); + let obj1: ESObject = JSON.parse(strJson1); + await Utils.sleep(1000); + console.info("[SUB_ACE_UI_COMPONENT_BUTTON_RATING_CUSTOMIZINGS_0080] obj1.$attrs.fontSize is: " + obj1.$attrs.fontSize); + this.spanFontSize014 = JSON.stringify(obj1.$attrs.fontSize) + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage140.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage140.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd035718a388aba0f08b1d6e7a015ba33d898e00 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage140.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage140 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("10%") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage140") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage141.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage141.ets new file mode 100644 index 0000000000000000000000000000000000000000..7dc327addfa92d5b6eb180841354898f59e1d6b7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage141.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage141 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("abc") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage141") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage142.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage142.ets new file mode 100644 index 0000000000000000000000000000000000000000..f038c6fde88fa7df9f9f5f3086a99300a54a6966 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage142.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage142 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .textIndent("abc") + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage142") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage143.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage143.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f838f33b1b66434bdace02e0cca6d07f898e4ff --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage143.ets @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage143 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am") + .id("fontAttributePage143") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage144.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage144.ets new file mode 100644 index 0000000000000000000000000000000000000000..d1193b1f87ad5a78af6d40f7fab84fdbcb6c9316 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage144.ets @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage144 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf") + .id("fontAttributePage144") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am asdf" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage145.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage145.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b63d74a80c77d1b0e721aede12e1088c9877a02 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage145.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage145 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:文本截断是按字截断") + .id("fontAttributePage145") + .fontSize(18) + .onClick(()=>{ + this.text = "文本截断是按字截断" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage146.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage146.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9cf27bddd46252a654b95c3f8918b3b012a47f5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage146.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage146 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字") + .id("fontAttributePage146") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage147.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage147.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a937800b9a55a7aa14c266d6603ab951a50fc4c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage147.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage147 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:てられますテキスト切り捨ては単語によって切り捨て") + .id("fontAttributePage147") + .fontSize(18) + .onClick(()=>{ + this.text = "てられますテキスト切り捨ては単語によって切り捨て" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage148.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage148.ets new file mode 100644 index 0000000000000000000000000000000000000000..cbc31ee39509ed1eac015967d1e7270d9456b1d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage148.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage148 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によっ" + + "て切り捨てられますテキストは単語によって切り") + .id("fontAttributePage148") + .fontSize(18) + .onClick(()=>{ + this.text = "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によ" + + "って切り捨てられますテキストは単語によって切り" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage149.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage149.ets new file mode 100644 index 0000000000000000000000000000000000000000..5dce2c0d91ceaf3ce33bc2525730b564c213684b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage149.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage149 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage149") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage15.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage15.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce6ecb9986c1eb95fa03ded8b67160cd0dd255a4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage15.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Utils from '../../../test/model/Utils' + +@Entry +@Component +struct fontAttributePage15 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize("-10fp") + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage150.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage150.ets new file mode 100644 index 0000000000000000000000000000000000000000..97af00fc42b5186890802c728497db5acf9443c3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage150.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage150 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage150") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage151.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage151.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d7e02a7ebbc3acf2de46291cc72029ae99d6132 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage151.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage151 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncated text by") + .id("fontAttributePage151") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncated text by" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage152.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage152.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe898d8363d9b45c8664c7cffae9d17e02c0e208 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage152.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage152 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes") + .id("fontAttributePage152") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage153.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage153.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0460cdfadff7c2b9b195728f045566f909debb5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage153.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage153 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is") + .id("fontAttributePage153") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage154.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage154.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f35e25ca61f3df39d2ea8b78ed44a50f3c173ed --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage154.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage154 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.NORMAL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is") + .id("fontAttributePage154") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage155.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage155.ets new file mode 100644 index 0000000000000000000000000000000000000000..508690fb76bdfeae667b695589c6e50666e5ae2b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage155.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage155 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:文本截断是按字截断") + .id("fontAttributePage155") + .fontSize(18) + .onClick(()=>{ + this.text = "文本截断是按字截断" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage156.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage156.ets new file mode 100644 index 0000000000000000000000000000000000000000..f5e4577724a10082af4e4bb8dc46e98483fc75e0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage156.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage156 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字") + .id("fontAttributePage156") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage157.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage157.ets new file mode 100644 index 0000000000000000000000000000000000000000..d61eafb573f9625161e5e8f6ad169ea4aed7fdbd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage157.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage157 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:てられますテキスト切り捨ては単語によって切り捨て") + .id("fontAttributePage157") + .fontSize(18) + .onClick(()=>{ + this.text = "てられますテキスト切り捨ては単語によって切り捨て" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage158.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage158.ets new file mode 100644 index 0000000000000000000000000000000000000000..bdd5206b10dab88ffc3be9aa92b65a2bef7ba4e4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage158.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage158 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によ" + + "って切り捨てられますテキストは単語によって切り") + .id("fontAttributePage158") + .fontSize(18) + .onClick(()=>{ + this.text = "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語" + + "によって切り捨てられますテキストは単語によって切り" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage159.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage159.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6a8109f7b52c970ab97a5e868fa9a2a2378c355 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage159.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage159 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage159") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage16.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage16.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d84d1dd3aed69e9d0513ba31998140bfb01fd7b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage16.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Utils from '../../../test/model/Utils' + +@Entry +@Component +struct fontAttributePage16 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize("[20,40]") + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage160.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage160.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e26e44e6ef1faf9a65c028c750a4f932ab40aa1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage160.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage160 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage160") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage161.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage161.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4d90fe1ee0dc96bd6428dd9572704440b6abee8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage161.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage161 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncated text by") + .id("fontAttributePage161") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncated text by" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage162.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage162.ets new file mode 100644 index 0000000000000000000000000000000000000000..a83189197649ef213507da2797190196a7e4359c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage162.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage162 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes by word Truncating text by word") + .id("fontAttributePage162") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes by word Truncating text by word" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage163.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage163.ets new file mode 100644 index 0000000000000000000000000000000000000000..e024faf9b6a162f168f6f428113914f5957e68fe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage163.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage163 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is") + .id("fontAttributePage163") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage164.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage164.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef3d7e9a7a1b6e043241289d113ef14ec8e2ab8e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage164.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage164 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_ALL) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is") + .id("fontAttributePage164") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage165.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage165.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffa9472bfb5ba573d4475e0b356c2c6e827cfe18 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage165.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage165 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:文本截断是按字截断") + .id("fontAttributePage165") + .fontSize(18) + .onClick(()=>{ + this.text = "文本截断是按字截断" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage166.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage166.ets new file mode 100644 index 0000000000000000000000000000000000000000..275d3a88a837a74a32967da557177ab9c4e8c19e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage166.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage166 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字") + .id("fontAttributePage166") + .fontSize(18) + .onClick(()=>{ + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本是按字" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage167.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage167.ets new file mode 100644 index 0000000000000000000000000000000000000000..a84ca35264d20a5e821b896220ed6e4ed32a87eb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage167.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage167 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:てられますテキスト切り捨ては単語によって切り捨て") + .id("fontAttributePage167") + .fontSize(18) + .onClick(()=>{ + this.text = "てられますテキスト切り捨ては単語によって切り捨て" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage168.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage168.ets new file mode 100644 index 0000000000000000000000000000000000000000..3916a38729b5bc4d606e883aebc35bb4dbefd9ef --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage168.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage168 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によ" + + "って切り捨てられますテキストは単語によって切り") + .id("fontAttributePage168") + .fontSize(18) + .onClick(()=>{ + this.text = "この切り捨ては単語によって切り捨てられますテキスト切り捨ては単語によって切り捨てられますテキスト切り捨ては単語" + + "によって切り捨てられますテキストは単語によって切り" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage169.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage169.ets new file mode 100644 index 0000000000000000000000000000000000000000..49c82198a56a13fc24d73272f451628fba5a6a1e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage169.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage169 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage169") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage17.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage17.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbf362bc0e4082f8d1cc1ab1cf3c8305d02b8724 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage17.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage17 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontStyle(FontStyle.Italic) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage170.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage170.ets new file mode 100644 index 0000000000000000000000000000000000000000..49457f97e32e893b8741494b305103f346a0f2dd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage170.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage170 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다") + .id("fontAttributePage170") + .fontSize(18) + .onClick(()=>{ + this.text = "이 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다. 텍스트 잘림은 단어로 자릅니다" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage171.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage171.ets new file mode 100644 index 0000000000000000000000000000000000000000..34c1a77e51dcfdd193204bc069e0355731300ed6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage171.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage171 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncated text by") + .id("fontAttributePage171") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncated text by" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage172.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage172.ets new file mode 100644 index 0000000000000000000000000000000000000000..521999391e0b51b9e9e65642d7acb441c7c5983e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage172.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage172 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes by word Truncating text by word") + .id("fontAttributePage172") + .fontSize(18) + .onClick(()=>{ + this.text = "This truncation is truncating text by word Truncating text by word Truncating text by word " + + "Truncating text by word Truncating text by word Yes by word Truncating text by word" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage173.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage173.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c1607a674ad2b67e8c96fd7c35e05456bc5a323 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage173.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage173 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is") + .id("fontAttributePage173") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage174.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage174.ets new file mode 100644 index 0000000000000000000000000000000000000000..851f929b600cb2caea636469880c8d8e5c4edfdc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage174.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage174 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(2) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + .wordBreak(WordBreak.BREAK_WORD) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is") + .id("fontAttributePage174") + .fontSize(18) + .onClick(()=>{ + this.text = "按字截断によって切이 잘림This truncation is按字截断によって切이 잘림This truncation is按字截断によって切이 " + + "잘림This truncation is按字截断によって切이 잘림This truncation is" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage175.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage175.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a9f9cc50923936ce4433e0490f4dfe39755bc12 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage175.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage175 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + @State maxLine:number = 3 + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(this.maxLine) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage175") + .fontSize(18) + .onClick(()=>{ + this.maxLine = 5 + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage176.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage176.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e4aee81448a9f7cb01e5b1637a46bd54b22355d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage176.ets @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' + +@Entry +@Component +struct fontAttributePage176 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + @State maxLine:number = 5 + controller: TextInputController = new TextInputController() + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(this.maxLine) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage176") + .fontSize(18) + .onClick(()=>{ + this.maxLine = 3 + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage177.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage177.ets new file mode 100644 index 0000000000000000000000000000000000000000..591edae210afe9f93a2a980f4b8609eff8889c77 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage177.ets @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' +import window from "@ohos.window"; +import common from '@ohos.app.ability.common'; + +@Entry +@Component +struct fontAttributePage177 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + @State maxLine:number = 2 + controller: TextInputController = new TextInputController() + + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context:common.UIAbilityContext = getContext(this) as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(this.maxLine) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage177") + .fontSize(18) + .onClick(()=>{ + this.changeOrientation(false) + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage178.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage178.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c2b946b651e3d4f5fd5eeae855802b0efc33339 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage178.ets @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import measure from '@ohos.measure' +import window from "@ohos.window"; +import common from '@ohos.app.ability.common'; + +@Entry +@Component +struct fontAttributePage178 { + @State text: string = '1 height:' + @State positionInfo: CaretOffset = { index: 0, x: 0, y: 0 } + @State passwordState: boolean = false + @State maxLine:number = 2 + controller: TextInputController = new TextInputController() + + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context:common.UIAbilityContext = getContext(this) as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + textSize : SizeOptions = measure.measureTextSize({ + textContent: "Hello word", + fontSize: '50px' + }) + + build() { + Column() { + Text(this.text) + .margin({top:50}) + .maxLines(this.maxLine) + .width('220vp') + .minFontSize(14) + .maxFontSize(24) + + TextInput({ text: this.text, placeholder: 'input your word...', controller: this.controller }) + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .caretColor(Color.Blue) + .width('95%') + .height(40) + .margin(20) + .fontSize(14) + .fontColor(Color.Black) + .onChange((value: string) => { + this.text = value + }) + + Button("输入:本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本") + .id("fontAttributePage178") + .fontSize(18) + .onClick(()=>{ + this.changeOrientation(true) + this.text = "本截断是按字截断文本截断是按字截断文本截断是按字截断文本i am本截断是按字截断文本截断是按字截断文本截断是按字截断文本" + }) + .margin({top:50}) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage179.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage179.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4a53f368e8992ebedb98edf69617bae766bd699 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage179.ets @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage179 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 20 + @State end: number = 20 + + build() { + Column() { + Text(this.text){ + ImageSpan($r('app.media.icon')) + .width('100px') + .height('100px') + + ContainerSpan() { + Span('Hello World !').fontSize('16fp').fontColor(Color.Black) + }.textBackgroundStyle({radius: "12vp"}) + + Span('Hello World !').fontSize('16fp').fontColor(Color.Black) + + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(48) + .effectStrategy(2) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage18.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage18.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6a07eb4a6f1490f4d36d14c14232266ce88ddc9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage18.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage18 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Lighter) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage180.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage180.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba895f1fd902292f883f5e060c2e1a6c8d56f949 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage180.ets @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage180 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State wordBreak:WordBreak = WordBreak.NORMAL + + build() { + Column() { + Text(this.text){ + ImageSpan($r('app.media.icon')) + .width('100px') + .height('100px') + Span('Hello World !').fontSize('16fp').fontColor(Color.Black) + } + .fontSize(this.fontSize) + .margin({top:50}) + .wordBreak(this.wordBreak) + + Button('BREAK_ALL') + .id("fontAttributePage180_01") + .fontSize(18) + .onClick(()=>{ + this.wordBreak = WordBreak.BREAK_ALL + }) + .margin({top:50}) + + Button('BREAK_WORD') + .id("fontAttributePage180_02") + .fontSize(18) + .onClick(()=>{ + this.wordBreak = WordBreak.BREAK_WORD + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage181.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage181.ets new file mode 100644 index 0000000000000000000000000000000000000000..03b04e3210c5f261a478e1a94035a66afe8b9bfc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage181.ets @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage181 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.text){ + } + .maxLines(1) + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('change selection') + .id("fontAttributePage181_01") + .margin({top:20}) + .onClick(() => { + this.start = 20 + this.end = 10 + }) + + Button('change selection') + .id("fontAttributePage181_02") + .margin({top:20}) + .onClick(() => { + this.start = 20 + this.end = 20 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage182.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage182.ets new file mode 100644 index 0000000000000000000000000000000000000000..e053f406d9afc98c0f4e0af6c9beac0a98ca56f3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage182.ets @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage182 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + @State maxLines:number = 1 + @State start: number = 5 + @State end: number = 30 + @State containerWidth:Length = '100%' + + build() { + Column() { + Text(this.text){ + } + .maxLines(this.maxLines) + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('change fontSize') + .id("fontAttributePage182_01") + .margin({top:20}) + .onClick(() => { + this.fontSize = 20 + }) + + Button('change maxLines') + .id("fontAttributePage182_02") + .margin({top:20}) + .onClick(() => { + this.maxLines = 3 + this.fontSize = 16 + }) + + Button('change container size') + .id("fontAttributePage182_03") + .margin({top:20}) + .onClick(() => { + this.maxLines = 1 + this.fontSize = 16 + this.containerWidth = '60%' + }) + }.width(this.containerWidth) + .height(500) + .borderWidth(2) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage183.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage183.ets new file mode 100644 index 0000000000000000000000000000000000000000..58166b9f43888feb6071339b758a47636051339b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage183.ets @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage183 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + @State start: number = -1 + @State end: number = -1 + + build() { + Column() { + Text(this.text){ + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + } + .maxLines(3) + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('change selection') + .id("fontAttributePage183_01") + .margin({top:20}) + .onClick(() => { + this.start = 1 + this.end = 2 + }) + + Button('change selection') + .id("fontAttributePage183_02") + .margin({top:20}) + .onClick(() => { + this.start = 3 + this.end = 3 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage184.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage184.ets new file mode 100644 index 0000000000000000000000000000000000000000..7eb7bf19ed231df4d73a2d614d757e49680c9e0d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage184.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage184 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + @State letterSpacing:number = 5 + + + build() { + Column() { + Text(this.text){ + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(20) + } + .maxLines(3) + .fontSize(this.fontSize) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button('change selection') + .id("fontAttributePage184_01") + .margin({top:20}) + .onClick(() => { + this.letterSpacing = -10 + }) + + Button('change selection') + .id("fontAttributePage184_02") + .margin({top:20}) + .onClick(() => { + this.letterSpacing = 20 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage185.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage185.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd341a74f564b464b6edaa4ba7a9986bee966d96 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage185.ets @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage185 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + private clickNum1:number = 0 + private clickNum2:number = 0 + @State textFontSize:number = 16 + @State symbolFontSize:number = 16 + @State textFontColor:Color = Color.Red + @State symbolFontColor:Array = [Color.Blue, Color.Blue, Color.Blue] + @State textFontWeight:FontWeight = FontWeight.Bolder + @State symbolFontWeight:FontWeight = FontWeight.Normal + + private fontWeights1:Array = [ + FontWeight.Lighter, + FontWeight.Regular, + FontWeight.Medium, + FontWeight.Bold, + FontWeight.Bolder, + ] + + private fontWeights2:Array = [ + FontWeight.Lighter, + FontWeight.Normal, + FontWeight.Regular, + FontWeight.Medium, + FontWeight.Bold, + ] + + build() { + Column() { + Text(this.text){ + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(this.symbolFontSize) + .fontColor(this.symbolFontColor) + .fontWeight(this.symbolFontWeight) + } + .maxLines(3) + .fontSize(this.textFontSize) + .fontColor(this.textFontColor) + .fontWeight(this.textFontWeight) + .margin({top:50}) + + Button('change SymbolSpan style') + .id("fontAttributePage185_01") + .margin({top:20}) + .onClick(() => { + this.symbolFontSize = 24 + this.symbolFontColor = [Color.Red, Color.Red, Color.Red] + }) + + Button('change symbolFontWeight') + .id("fontAttributePage185_02") + .margin({top:20}) + .onClick(() => { + if(this.clickNum1<5){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + + Button('change Text style') + .id("fontAttributePage185_03") + .margin({top:20}) + .onClick(() => { + this.textFontSize = 24 + this.textFontColor = Color.Green + }) + + Button('change textFontWeight') + .id("fontAttributePage185_04") + .margin({top:20}) + .onClick(() => { + if(this.clickNum2<5){ + this.textFontWeight = this.fontWeights2[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage186.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage186.ets new file mode 100644 index 0000000000000000000000000000000000000000..18863354f6e80377eb17cf734268c976a62f41fe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage186.ets @@ -0,0 +1,110 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage186 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatangi" + + "hangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + private clickNum1:number = 0 + private clickNum2:number = 0 + private clickNum3:number = 0 + @State symbolFontSize:number = 16 + @State symbolFontColor:Array = [Color.Blue, Color.Blue, Color.Blue] + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State effectStrategy:SymbolEffectStrategy = SymbolEffectStrategy.NONE + @State renderingStrategy:SymbolRenderingStrategy = SymbolRenderingStrategy.SINGLE + + private fontWeights1:Array = [ + FontWeight.Lighter, + FontWeight.Regular, + FontWeight.Medium, + FontWeight.Bold, + FontWeight.Bolder, + ] + + private effectStrategies:Array = [ + SymbolEffectStrategy.SCALE, + SymbolEffectStrategy.HIERARCHICAL + ] + + private renderingStrategies:Array = [ + SymbolRenderingStrategy.MULTIPLE_COLOR, + SymbolRenderingStrategy.MULTIPLE_OPACITY + ] + + build() { + Column() { + Text(this.text){ + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(this.symbolFontSize) + .fontColor(this.symbolFontColor) + .fontWeight(this.symbolFontWeight) + } + .maxLines(3) + .margin({top:50}) + + Button('change SymbolSpan style') + .id("fontAttributePage186_01") + .margin({top:20}) + .onClick(() => { + this.symbolFontSize = 24 + this.symbolFontColor = [Color.Red, Color.Red, Color.Red] + }) + + Button('change symbolFontWeight') + .id("fontAttributePage186_02") + .margin({top:20}) + .onClick(() => { + if(this.clickNum1<5){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + + Button('change Text style') + .id("fontAttributePage186_03") + .margin({top:20}) + .onClick(() => { + this.symbolFontWeight = FontWeight.Normal + if(this.clickNum2<2){ + this.effectStrategy = this.effectStrategies[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==2){ + this.clickNum2=0 + } + } + }) + + Button('change textFontWeight') + .id("fontAttributePage186_04") + .margin({top:20}) + .onClick(() => { + this.effectStrategy = SymbolEffectStrategy.NONE + if(this.clickNum3<2){ + this.symbolFontWeight = FontWeight.Normal + this.renderingStrategy = this.renderingStrategies[this.clickNum3] + this.clickNum3++ + if(this.clickNum3==2){ + this.clickNum3=0 + } + } + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage19.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage19.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ce057ce5d937fa88be2a51c13916829edbbfed0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage19.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage19 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Normal) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage20.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage20.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8ed396842138f9e5b347dc05d1f8cd5f9d30d6f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage20.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage20 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Regular) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage21.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage21.ets new file mode 100644 index 0000000000000000000000000000000000000000..12282d82c19ce9ea470f7ee3b1b162b3efde75d5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage21.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage21 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Medium) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage22.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage22.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ef0510f4d2ddf6ae1561cae34b948963b1b6e58 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage22.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage22 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Bold) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage23.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage23.ets new file mode 100644 index 0000000000000000000000000000000000000000..e76d867f17a6291dcce4c776338d07cca9010545 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage23.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage23 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .fontWeight(FontWeight.Bolder) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage24.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage24.ets new file mode 100644 index 0000000000000000000000000000000000000000..afdd190bfdbc95fc04ab5e234ab95b5100ee72ed --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage24.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage24 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .lineHeight(30) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage25.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage25.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d2f08ecc738bc444d29c248cec7cc58286d1d2b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage25.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage25 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .lineHeight(-10) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage26.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage26.ets new file mode 100644 index 0000000000000000000000000000000000000000..333e7ca49b25b81a3c2e37603ad29e810abccb68 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage26.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage26 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .textCase(TextCase.LowerCase) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage27.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage27.ets new file mode 100644 index 0000000000000000000000000000000000000000..18b474683a34cc57a2b4026a3296a3d48f09b27f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage27.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage27 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .textCase(TextCase.UpperCase) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage28.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage28.ets new file mode 100644 index 0000000000000000000000000000000000000000..44a1cb741f674df5f5d67cef1adcb2beb3c16552 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage28.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage28 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .textCase(TextCase.Normal) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage29.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage29.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b389a2d71e8fe2d77b2933f97a791f1b7f14279 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage29.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage29 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .letterSpacing(10) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage30.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage30.ets new file mode 100644 index 0000000000000000000000000000000000000000..380dbf67576d3c50bb3eac8e8aed04208abf7e28 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage30.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage30 { + private surfaceId: string = '' + private xComponentContext: Record void> = {} + xComponentController: XComponentController = new XComponentController() + + build() { + Column() { + XComponent({ + id: 'xcomponent', + type: XComponentType.NODE, + controller: this.xComponentController + }){ + Text() { + Span("Hello world") + .fontSize(20) + .letterSpacing(-5) + } + .margin({top:50}) + } + .onLoad(() => { + this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 }) + this.surfaceId = this.xComponentController.getXComponentSurfaceId() + this.xComponentContext = this.xComponentController.getXComponentContext() as Record void> + }) + .width('200px') + .height('300px') + .backgroundColor(Color.White) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage33.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage33.ets new file mode 100644 index 0000000000000000000000000000000000000000..86804a58b5506217e8c2f5048574b5af3619a3d1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage33.ets @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage33 { + + build() { + Column() { + Text() { + Span("This is the Span component") + .fontSize(20) + } + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage34.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage34.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd6e431dc63e78d8d1af1c7d48dc3cd24e461cc8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage34.ets @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage34 { + + build() { + Column() { + Text() { + Span("This is the Span component") + .fontSize(20) + .letterSpacing("180%") + } + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage35.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage35.ets new file mode 100644 index 0000000000000000000000000000000000000000..eedbe8aebfe3f56d66f3328d7d02aba895231f4d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage35.ets @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage35 { + + build() { + Column() { + Text() { + Span("This is the Span component") + .fontSize(20) + .lineHeight($rawfile('string.json')) + } + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage36.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage36.ets new file mode 100644 index 0000000000000000000000000000000000000000..0acc0d2bb1b6d9fe3737dc349154e2363195737a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage36.ets @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage36 { + + build() { + Column() { + Text() { + SymbolSpan($r('sys.symbol.ohos_wifi')) + .fontSize(96) + } + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage41.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage41.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9ff05d21a287d40a9a438d57e8a9efa1a8c36aa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage41.ets @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage41 { + + build() { + Column() { + Text("我无法挽留,我无法回头,我无法接受,你说你即将离开我") + .fontSize(20) + .wordBreak(WordBreak.NORMAL) + .margin({top:50}) + Text("내가 붙잡을 수 없고, 뒤돌아 볼 수 없고, 받아들일 수 없고, 당신은 곧 나를 떠날 거라고 말씀하셨다") + .fontSize(20) + .wordBreak(WordBreak.NORMAL) + .margin({top:50}) + Text("私は止められない、振り向くこともできない、受け入れることもできない。あなたはもうすぐ私を離れると言いました") + .fontSize(20) + .wordBreak(WordBreak.NORMAL) + .margin({top:50}) + Text("I can't hold on, I can't turn back, I can't accept it. You say you're leaving me soon") + .fontSize(20) + .wordBreak(WordBreak.NORMAL) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage42.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage42.ets new file mode 100644 index 0000000000000000000000000000000000000000..78aa93b2ea4255e47bc7435c89932aa0901fca73 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage42.ets @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage42 { + + build() { + Column() { + Text("我无法挽留,我无法回头,我无法接受,你说你即将离开我") + .fontSize(20) + .wordBreak(WordBreak.BREAK_ALL) + .margin({top:50}) + Text("내가 붙잡을 수 없고, 뒤돌아 볼 수 없고, 받아들일 수 없고, 당신은 곧 나를 떠날 거라고 말씀하셨다") + .fontSize(20) + .wordBreak(WordBreak.BREAK_ALL) + .margin({top:50}) + Text("私は止められない、振り向くこともできない、受け入れることもできない。あなたはもうすぐ私を離れると言いました") + .fontSize(20) + .wordBreak(WordBreak.BREAK_ALL) + .margin({top:50}) + Text("I can't hold on, I can't turn back, I can't accept it. You say you're leaving me soon") + .fontSize(20) + .wordBreak(WordBreak.BREAK_ALL) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage43.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage43.ets new file mode 100644 index 0000000000000000000000000000000000000000..11688148039d6f1d0110d6574565d706a5fb2085 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage43.ets @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage43 { + + build() { + Column() { + Text("我无法挽留,我无法回头,我无法接受,你说你即将离开我") + .fontSize(20) + .wordBreak(WordBreak.BREAK_WORD) + .margin({top:50}) + Text("내가 붙잡을 수 없고, 뒤돌아 볼 수 없고, 받아들일 수 없고, 당신은 곧 나를 떠날 거라고 말씀하셨다") + .fontSize(20) + .wordBreak(WordBreak.BREAK_WORD) + .margin({top:50}) + Text("私は止められない、振り向くこともできない、受け入れることもできない。あなたはもうすぐ私を離れると言いました") + .fontSize(20) + .wordBreak(WordBreak.BREAK_WORD) + .margin({top:50}) + Text("I can't hold on, I can't turn back, I can't accept it. You say you're leaving me soon") + .fontSize(20) + .wordBreak(WordBreak.BREAK_WORD) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage44.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage44.ets new file mode 100644 index 0000000000000000000000000000000000000000..289665be9f614728f7fb86bde277ede0e7000a39 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage44.ets @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage44 { + + build() { + Column() { + Text("我无法挽留,我无法回头,我无法接受,你说你即将离开我") + .fontSize(20) + .margin({top:50}) + Text("내가 붙잡을 수 없고, 뒤돌아 볼 수 없고, 받아들일 수 없고, 당신은 곧 나를 떠날 거라고 말씀하셨다") + .fontSize(20) + .margin({top:50}) + Text("私は止められない、振り向くこともできない、受け入れることもできない。あなたはもうすぐ私を離れると言いました") + .fontSize(20) + .margin({top:50}) + Text("I can't hold on, I can't turn back, I can't accept it. You say you're leaving me soon") + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage45.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage45.ets new file mode 100644 index 0000000000000000000000000000000000000000..b11921713f71be24f8aa784d392b5727de113780 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage45.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage45 { + @State onCopy: string = '' + @State start: number = 0 + @State end: number = 12 + + build() { + Column() { + Text("Openharmony") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage46.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage46.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef43a434c7c929451181cf3fe7da3ae8c89919ef --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage46.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage46 { + @State start: number = 5 + @State end: number = 20 + + build() { + Column() { + Text("OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连接、全智能时代、" + + "基于开源的方式,搭建一个智能终端设备操作系统的框架和平台") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage47.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage47.ets new file mode 100644 index 0000000000000000000000000000000000000000..03a6a42ffd2aa5cb812a809be539f538280174b9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage47.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage47 { + @State start: number = 20 + @State end: number = 5 + + build() { + Column() { + Text("OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连接、全智能时代、" + + "基于开源的方式,搭建一个智能终端设备操作系统的框架和平台") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage48.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage48.ets new file mode 100644 index 0000000000000000000000000000000000000000..3da34627d1a8cbd4647e3280a6d09dc22ffc6659 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage48.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage48 { + @State start: number = 5 + @State end: number = 5 + + build() { + Column() { + Text("OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连接、全智能时代、" + + "基于开源的方式,搭建一个智能终端设备操作系统的框架和平台") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage49.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage49.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e228e6cc2a21f5187585a39fb807ac3fbb3be94 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage49.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage49 { + @State start: number = -5 + @State end: number = 5 + + build() { + Column() { + Text("OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连接、全智能时代、" + + "基于开源的方式,搭建一个智能终端设备操作系统的框架和平台") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage50.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage50.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3cf53f3125cf5d60d9c6c4c3a9c53b8cd608884 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage50.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage50 { + @State start: number = 5 + @State end: number = 1000 + + build() { + Column() { + Text("OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连接、全智能时代、" + + "基于开源的方式,搭建一个智能终端设备操作系统的框架和平台") + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage51.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage51.ets new file mode 100644 index 0000000000000000000000000000000000000000..909431e97a1a94934cf079febaddbd06ac4da8f1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage51.ets @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage51 { + @State start: number = 5 + @State end: number = 20 + @State selectText:string = "OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连" + + "接、全智能时代、基于开源的方式,搭建一个智能终端设备操作系统的框架和平台" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage52.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage52.ets new file mode 100644 index 0000000000000000000000000000000000000000..016dc899d62eab30a41f556c86497872f1e496ee --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage52.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage52 { + @State start: number = 5 + @State end: number = 20 + @State selectText:string = "OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连" + + "接、全智能时代、基于开源的方式,搭建一个智能终端设备操作系统的框架和平台" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage53.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage53.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e6a1940b4cdf13f43cefccbb6a22a0c8f6f865d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage53.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage53 { + @State start: number = 5 + @State end: number = 20 + @State selectText:string = "OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及运营的开源项目, 目标是面向全场景、全连" + + "接、全智能时代、基于开源的方式,搭建一个智能终端设备操作系统的框架和平台" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage54.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage54.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6e4490cbad0d2212afa45999428beb035299239 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage54.ets @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage54 { + @State selectText:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途" + + "遥远只要最后是你就好グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉성공은 신념의 산물이며, 신념을 가진 " + + "사람은 기적에 가까운 일을 가능하게 한다" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.NORMAL) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage55.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage55.ets new file mode 100644 index 0000000000000000000000000000000000000000..5495746fd7d5ef51446345b34a57efb45181d57e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage55.ets @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage55 { + @State selectText:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途" + + "遥远只要最后是你就好グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉성공은 신념의 산물이며, 신념을 가진 " + + "사람은 기적에 가까운 일을 가능하게 한다" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.BREAK_ALL) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage56.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage56.ets new file mode 100644 index 0000000000000000000000000000000000000000..24c1440401a2e43c6b2201c7e4a0383825776c92 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage56.ets @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage56 { + @State selectText:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途" + + "遥远只要最后是你就好グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉성공은 신념의 산물이며, 신념을 가진 " + + "사람은 기적에 가까운 일을 가능하게 한다" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.BREAK_WORD) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage57.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage57.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec535caf26a8226760fd83a35c9a8469d75c740b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage57.ets @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage57 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.NORMAL) + .clip(true) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage58.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage58.ets new file mode 100644 index 0000000000000000000000000000000000000000..ebce3f7cc579d8411f6ab122b0b35b504dfb04a0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage58.ets @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage58 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.NORMAL) + .clip(false) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage59.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage59.ets new file mode 100644 index 0000000000000000000000000000000000000000..487e8774d8ce335e28b057f72015d439de987234 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage59.ets @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage59 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.BREAK_ALL) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage60.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage60.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7a2d6ea14a16df005bd9c041824ea2cf16d84de --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage60.ets @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage60 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.BREAK_WORD) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage61.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage61.ets new file mode 100644 index 0000000000000000000000000000000000000000..09cc1feb601a179e5e86c9a8621fc6d1c92d341d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage61.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage61 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 5 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.None) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage62.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage62.ets new file mode 100644 index 0000000000000000000000000000000000000000..931fcbbf9f796a4239efb0f5d153103b5052bbb7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage62.ets @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage62 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 5 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('Set text selection') + .id("changeSelection63") + .margin({left:20}) + .onClick(() => { + this.start = 10 + this.end = 15 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage63.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage63.ets new file mode 100644 index 0000000000000000000000000000000000000000..4af46d8b02fe3d7b816aadaff4e112058aa5dd3b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage63.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage63 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumat" + + "awhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .textOverflow({ overflow: TextOverflow.None }) + .maxLines(5) + .wordBreak(WordBreak.NORMAL) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage64.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage64.ets new file mode 100644 index 0000000000000000000000000000000000000000..568b060224453d59098dae01bb1b26dc29ba0bdd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage64.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage64 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumat" + + "awhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .textOverflow({ overflow: TextOverflow.None }) + .maxLines(1) + .wordBreak(WordBreak.NORMAL) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage65.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage65.ets new file mode 100644 index 0000000000000000000000000000000000000000..35bc96a7e328178d15ccb16da0babe1232222cfd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage65.ets @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage65 { + @State onCopy:string = '' + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 10 + @State end: number = 1000 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage66.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage66.ets new file mode 100644 index 0000000000000000000000000000000000000000..75023f17b20cfa7198135ef8e11fa9ea7829b2ce --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage66.ets @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage66 { + @State onCopy:string = '' + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .textOverflow({ overflow: TextOverflow.None }) + .selection(this.start, this.end) + .onCopy((value: string) => { + this.onCopy = value + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage67.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage67.ets new file mode 100644 index 0000000000000000000000000000000000000000..99abffcdf773eaa29d83a40ab2827740c63f3821 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage67.ets @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage67 { + @State onCopy:string = '' + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 1000 + @State end: number = 1001 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .textOverflow({ overflow: TextOverflow.None }) + .selection(this.start, this.end) + .onCopy((value: string) => { + this.onCopy = value + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage68.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage68.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ea760f2715f18864ae016f0853d570e053065d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage68.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage68 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.NORMAL) + .maxLines(5) + .textOverflow({ overflow: TextOverflow.Clip }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage69.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage69.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4b0054e5c88eb2aec72d126834b8f339be6ffc5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage69.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage69 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .wordBreak(WordBreak.NORMAL) + .maxLines(1) + .textOverflow({ overflow: TextOverflow.Clip }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage70.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage70.ets new file mode 100644 index 0000000000000000000000000000000000000000..d538a177b50fcbfdf8c0d7dc5824db3910c8e59d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage70.ets @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage70 { + @State onCopy:string = "before copy" + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 10 + @State end: number = 1000 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Clip }) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage71.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage71.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c5653a38aa9dc13fd6ea34d33d89802c7138582 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage71.ets @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage71 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Clip }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage72.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage72.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3352482b2d47609949414f279dd93f4289e0048 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage72.ets @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage72 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 1000 + @State end: number = 1001 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Clip }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage73.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage73.ets new file mode 100644 index 0000000000000000000000000000000000000000..01b8fd3b23e4ee3775fb7d747195ec69a7aa11b2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage73.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage73 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .wordBreak(WordBreak.NORMAL) + .maxLines(5) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage74.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage74.ets new file mode 100644 index 0000000000000000000000000000000000000000..17f9aca454fd33534f1fbeb63c678a8c74792d17 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage74.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage74 { + @State selectText:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Tau" + + "matawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .wordBreak(WordBreak.NORMAL) + .maxLines(1) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage75.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage75.ets new file mode 100644 index 0000000000000000000000000000000000000000..a709b753eb4a5e21d6e489b2f4481a602a8f45ac --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage75.ets @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage75 { + @State onCopy:string = "before copy" + @State selectText:string = "我希望有个如你一般的人,如山间清爽的风,如古城温暖的光" + @State start: number = 20 + @State end: number = 1000 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .maxLines(1) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage76.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage76.ets new file mode 100644 index 0000000000000000000000000000000000000000..15476f540d8051e29ea1aa6e0c34414f41b750c5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage76.ets @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage76 { + @State onCopy:string = "before copy" + @State selectText:string = "我希望有个如你一般的人,如山间清爽的风,如古城温暖的光" + @State start: number = 21 + @State end: number = 40 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .maxLines(1) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage77.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage77.ets new file mode 100644 index 0000000000000000000000000000000000000000..1057537493522a3a80f56846bb9eb75766283b54 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage77.ets @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage77 { + @State onCopy:string = "before copy" + @State selectText:string = "我希望有个如你一般的人,如山间清爽的风,如古城温暖的光" + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .maxLines(2) + .onCopy((value: string) => { + this.onCopy = value + }) + + Text(this.onCopy) + .fontSize(20) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage78.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage78.ets new file mode 100644 index 0000000000000000000000000000000000000000..dadb8121c622daaa529d29c2da528d23f6cb501c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage78.ets @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage78 { + @State selectText:string = "我希望有个如你一般的人,如山间清爽的风,如古城温暖的光" + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.selectText) + .fontSize(20) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .textOverflow({ overflow: TextOverflow.MARQUEE }) + .maxLines(2) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage79.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage79.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc23ec693c5e3edd1fff1e67331496ef8737c206 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage79.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage79 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawh" + + "akatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State start: number = 10 + @State end: number = 20 + + build() { + Column() { + Text(this.text) + .fontSize(20) + .margin({top:50}) + + Button('切换text中文文本') + .id("changeText79_1") + .fontSize(20) + .margin({top:20}) + .onClick(() => { + this.text = '我希望有个如你一般的人,如山间清爽的风,如古城温暖的光' + }) + + Button('切换text日语文本') + .id("changeText79_2") + .fontSize(20) + .margin({top:20}) + .onClick(() => { + this.text = 'グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉' + }) + + Button('切换text韩语文本') + .id("changeText79_3") + .fontSize(20) + .margin({top:20}) + .onClick(() => { + this.text = '성공은 신념의 산물이며, 신념을 가진 사람은 기적에 가까운 일을 가능하게 한다' + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage80.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage80.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e90565827c38d53fd9d30ccba681d7dde98d32b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage80.ets @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage80 { + @State text:string = "山间清爽的风" + @State fontSize:number = 16 + + build() { + Column() { + Text(this.text) + .fontSize(this.fontSize) + .margin({top:50}) + + Button('change fontSize') + .id("changeText80") + .fontSize(20) + .margin({top:20}) + .onClick(() => { + this.fontSize = 30 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage81.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage81.ets new file mode 100644 index 0000000000000000000000000000000000000000..98f1110820cd0d511452d0fbcfd05e5efd56938a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage81.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage81 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要最后" + + "是你就好グレートブリテンおよび北アイルランド連合王国という言葉は本当に長い言葉성공은 신념의 산물이며, 신념을 가진 사람은 기적에 가까" + + "운 일을 가능하게 한다This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatan" + + "gihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + + build() { + Column() { + Text(this.text) + .fontSize(this.fontSize) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage82.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage82.ets new file mode 100644 index 0000000000000000000000000000000000000000..ca16bb62ceccef348bf813f76101a27f43aaebd6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage82.ets @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage82 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 5 + @State end: number = 20 + + build() { + Column() { + Text(){ + Span("fontAttributePage82") + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('Set text selection') + .id("changeSelection82") + .margin({left:20}) + .onClick(() => { + this.start = 10 + this.end = 15 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage83.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage83.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0a1cb2c65c681c65ef92e72dc2f40c1cb31bbc3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage83.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage83 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 5 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + + Button('Set text selection') + .id("changeSelection83") + .margin({left:20}) + .onClick(() => { + this.start = 10 + this.end = 15 + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage84.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage84.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8e663e46f288b14e137238d2cf075fee761d5eb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage84.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage84 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .verticalAlign(ImageSpanAlignment.TOP) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage85.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage85.ets new file mode 100644 index 0000000000000000000000000000000000000000..e67a42a2b7364b793433c72e168ac86352ab6499 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage85.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage85 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .verticalAlign(ImageSpanAlignment.CENTER) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage86.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage86.ets new file mode 100644 index 0000000000000000000000000000000000000000..40abf359c032107998ee2bfe328cd4bd4a2c8575 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage86.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage86 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .verticalAlign(ImageSpanAlignment.BOTTOM) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage87.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage87.ets new file mode 100644 index 0000000000000000000000000000000000000000..39237b143637088845fd69775102698559c65cbe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage87.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage87 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .verticalAlign(ImageSpanAlignment.BASELINE) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage88.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage88.ets new file mode 100644 index 0000000000000000000000000000000000000000..143d0a3d6a334f7e915804f8b283dcf2ad284ef4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage88.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage88 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.Contain) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage89.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage89.ets new file mode 100644 index 0000000000000000000000000000000000000000..6921e810693a4aa7636d850b82168f130da2449b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage89.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage89 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.Cover) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage90.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage90.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d9e25125b18f68704a27b97219d84e82b1c5e15 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage90.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage90 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.Auto) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage91.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage91.ets new file mode 100644 index 0000000000000000000000000000000000000000..617645c6b15806c838489dd32fca62e6baafe3e0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage91.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage91 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.Fill) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage92.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage92.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e0d31cecada80a6d6597058d37e87d648d9364a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage92.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage92 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.ScaleDown) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage93.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage93.ets new file mode 100644 index 0000000000000000000000000000000000000000..33854cb239803e472d72a0014ae0cc59891662ab --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage93.ets @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage93 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + + build() { + Column() { + Text(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .objectFit(ImageFit.None) + } + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage94.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage94.ets new file mode 100644 index 0000000000000000000000000000000000000000..2827861024a943ff3f953bfc92102e5e57e0076c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage94.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage94 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + + build() { + Column() { + Text(this.text){ + } + .id("fontAttributePage94") + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage95.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage95.ets new file mode 100644 index 0000000000000000000000000000000000000000..97c141ecbfe391a7a1100d98ce61d6ae73d2436b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage95.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage95 { + @State text:string = "我希望有个如你一般的人如山间清爽的风如古城温暖的光从清晨到夜晚由山野到书房等待不怕岁月蹉跎不怕路途遥远只要" + + "最后是你就好" + @State fontSize:number = 16 + @State start: number = 0 + @State end: number = 20 + @State columnHeight:number = 500 + + build() { + Column() { + Text(this.text){ + } + .id("fontAttributePage95") + .fontSize(this.fontSize) + .margin({top:50}) + .copyOption(CopyOptions.InApp) + .selection(this.start, this.end) + .clip(true) + + Button('Set column height') + .id("changeHeight95") + .margin({left:20}) + .onClick(() => { + this.columnHeight = 0 + }) + }.width('100%') + .height(this.columnHeight) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage96.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage96.ets new file mode 100644 index 0000000000000000000000000000000000000000..6bada6473cb3459840042bce96172d2b34e55fee --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage96.ets @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage96 { + @State text:string = "This is a long and Honorificabilitudinitatibus califragilisticexpialidocious Taumatawhakatan" + + "gihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu" + @State fontSize:number = 16 + + build() { + Column() { + Text(this.text){ + } + .id("fontAttributePage96") + .wordBreak(WordBreak.NORMAL) + .fontSize(this.fontSize) + .margin({top:50}) + .clip(false) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage97.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage97.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3d1fa1ae0825eee30c75eb0a59fd4a71c767040 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage97.ets @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage97 { + + build() { + Column() { + Text() { + ContainerSpan() { + }.textBackgroundStyle({color: "#7F007DFF", radius: "12vp"}) + } + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage98.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage98.ets new file mode 100644 index 0000000000000000000000000000000000000000..309ee3cdb34947a14ea854cb6279806010161c6c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage98.ets @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage98 { + + build() { + Column() { + Text() { + ContainerSpan() { + ImageSpan($r('app.media.icon')) + .width('40vp') + .height('40vp') + .verticalAlign(ImageSpanAlignment.CENTER) + Span(' Hello World ! ').fontSize('16fp').fontColor(Color.Black) + }.textBackgroundStyle({color: "#7F007DFF", radius: "12vp"}) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage99.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage99.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a1cb0a0fc0e54af33574e05bd37aec9d80c8bf0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface02/fontAttributePage99.ets @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributePage99 { + + build() { + Column() { + Text() { + Span(' Hello World ! ') + .fontSize('20fp') + .textBackgroundStyle({color:Color.Green,radius: 5}) + .fontColor(Color.Black) + }.margin({top:50}) + .width(240) + .height(150) + }.width('100%').alignItems(HorizontalAlign.Center) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle01.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle01.ets new file mode 100644 index 0000000000000000000000000000000000000000..87efa8e7cb6f9189f8be1dda18ee9c46b62282be --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle01.ets @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle01 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State letterSpacing:number | string | Resource = 0 + @State text:ResourceStr = "111111111" + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .type(InputType.Normal) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + .letterSpacing(this.letterSpacing) + + Button("decoration") + .id("fontAttributeAndStyle01_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle01_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle02.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle02.ets new file mode 100644 index 0000000000000000000000000000000000000000..10328d38a20a8468ec9608d9a7612a882e8ecb60 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle02.ets @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle02 { + @State text:ResourceStr = "111111111" + private clickNum1:number = 0 + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .type(InputType.Normal) + .width(240) + .height(60) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.text = this.text_all[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle03.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle03.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e5d741c3d837568fce6cbe3723049a919aabdf9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle03.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle03 { + @State text:ResourceStr = "111111111" + @State letterSpacing:number | string | Resource = 0 + @State textInput:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .type(InputType.Normal) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("Input") + .id("fontAttributeAndStyle03_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textInput = this.text_all[this.clickNum1] + this.text = this.textInput + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle03_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle03_03") + .fontSize(18) + .onClick(()=>{ + this.text = "" + }) + .margin({top:50}) + + Button("Input after clear") + .id("fontAttributeAndStyle03_04") + .fontSize(18) + .onClick(()=>{ + this.text = this.textInput + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle04.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle04.ets new file mode 100644 index 0000000000000000000000000000000000000000..f682983d854d96655ee54b89a02b5b90821c13f6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle04.ets @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle04 { + @State text:ResourceStr = "111111111" + @State textInput:ResourceStr = "开源鸿蒙" + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .id("fontAttributeAndStyle04_1") + .type(InputType.Normal) + .copyOption(CopyOptions.InApp) + .letterSpacing(3) + .width(240) + .height(60) + .margin({top:50}) + + TextInput({ placeholder: 'please input'}) + .id("fontAttributeAndStyle04_1") + .type(InputType.Normal) + .copyOption(CopyOptions.InApp) + .letterSpacing(-2) + .width(240) + .height(60) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle05.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle05.ets new file mode 100644 index 0000000000000000000000000000000000000000..d551a720a3c8d8c7332f3c62db2cf22b7f00ed08 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle05.ets @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle05 { + @State letterSpacing:number | string | Resource = 0 + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input'}) + .type(InputType.Normal) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle05") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle06.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle06.ets new file mode 100644 index 0000000000000000000000000000000000000000..58e556d5577e9be57f07c775e972b67fed6fe5fd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle06.ets @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle06 { + @State letterSpacing:number | string | Resource = 0 + @State type:InputType = InputType.Normal + @State text:string = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + private types:Array = [ + InputType.Normal, + InputType.Password, + InputType.Email, + InputType.Number, + InputType.PhoneNumber, + InputType.USER_NAME, + InputType.NEW_PASSWORD, + InputType.NUMBER_PASSWORD, + InputType.NUMBER_DECIMAL, + InputType.URL, + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle06_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<10){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==10){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle06_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle07.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle07.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c3ae505ade07b060964b271e1fe482eb0a4ba5c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle07.ets @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle07 { + @State letterSpacing:number | string | Resource = 0 + @State type:InputType = InputType.Normal + @State style:TextInputStyle = TextInputStyle.Default + @State text:string = "开源鸿蒙开源鸿蒙开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private styles:Array = [ + TextInputStyle.Default, + TextInputStyle.Inline + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle07_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle07_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle08.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle08.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b0a091ddf48a72347e65db81d2a477ebbace8f9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle08.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle08 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State textAlign:TextAlign = TextAlign.Start + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private textAligns:Array = [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .textAlign(this.textAlign) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle08_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("textAlign") + .id("fontAttributeAndStyle08_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle08_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle09.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle09.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb7316b7c72434bb2f03431ab94ed2bbc88cd9d5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle09.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle09 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State fontSize:Length = 18 + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(this.fontSize) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle09_1") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle09_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("fontSize") + .id("fontAttributeAndStyle09_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<4){ + this.fontSize = this.fontSizes[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==4){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle10.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle10.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9d131b9b8f82ca7b7951ddf284a132de0ffdf01 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle10.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle10 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .id("fontAttributeAndStyle10") + .fontSize(18) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .letterSpacing(this.letterSpacing) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle10_1") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle10_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle11.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle11.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfbcfab26d2daa0dc7436c014b6b5a7225eefcf5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle11.ets @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle11 { + @State text:ResourceStr = "开源鸿蒙" + @State lineHeight:number | string | Resource = 24 + private clickNum1:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle11") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle12.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle12.ets new file mode 100644 index 0000000000000000000000000000000000000000..01190e008d064979210d47e42318d03972a390a9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle12.ets @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle12 { + @State text:ResourceStr = "" + @State lineHeight:number | string | Resource = 24 + @State fontSize:Length = 18 + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(this.fontSize) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle12_1") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle12_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("fontSize") + .id("fontAttributeAndStyle12_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<4){ + this.fontSize = this.fontSizes[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==4){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle13.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle13.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ec41fe341363fd80a821785725d658ea7fecacc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle13.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle13 { + @State lineHeight:number | string | Resource = 24 + private clickNum1:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input' }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle13") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle14.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle14.ets new file mode 100644 index 0000000000000000000000000000000000000000..95c2aae669510f85555736bc533a4e43682feb47 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle14.ets @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle14 { + @State lineHeight:number | string | Resource = 24 + @State text:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("Input") + .id("fontAttributeAndStyle14_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.text = this.text_all[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle14_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle14_03") + .fontSize(18) + .onClick(()=>{ + this.text = "" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle15.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle15.ets new file mode 100644 index 0000000000000000000000000000000000000000..f07394234977744cd6c59b7806a37d77d5d5f092 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle15.ets @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle15 { + @State lineHeight:number | string | Resource = 24 + @State type:InputType = InputType.Normal + @State text:string = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private types:Array = [ + InputType.Normal, + InputType.Password, + InputType.Email, + InputType.Number, + InputType.PhoneNumber, + InputType.USER_NAME, + InputType.NEW_PASSWORD, + InputType.NUMBER_PASSWORD, + InputType.NUMBER_DECIMAL, + InputType.URL, + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle15_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<10){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==10){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle15_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle16.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle16.ets new file mode 100644 index 0000000000000000000000000000000000000000..921d2580731e96625d7b190967d4b432da92aead --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle16.ets @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle16 { + @State lineHeight:number | string | Resource = 24 + @State type:InputType = InputType.Normal + @State style:TextInputStyle = TextInputStyle.Default + @State text:string = "开源鸿蒙开源鸿蒙开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private styles:Array = [ + TextInputStyle.Default, + TextInputStyle.Inline + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .style(this.style) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle16_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle16_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle17.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle17.ets new file mode 100644 index 0000000000000000000000000000000000000000..9367d55640a7042702e5b4e3bef0d1c82f5fdc38 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle17.ets @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle17 { + @State text:ResourceStr = "开源鸿蒙" + @State lineHeight:number | string | Resource = 24 + private clickNum1:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextInput({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle17_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle18.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle18.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfad875fae3aca6922ef5b3e444015f9b010e649 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle18.ets @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle18 { + @State lineHeight:number | string | Resource = 24 + @State type:InputType = InputType.Normal + @State style:TextInputStyle = TextInputStyle.Default + @State text:string = "开源鸿蒙开源鸿蒙开源鸿蒙" + @State decoration:TextDecorationOptions = {type:TextDecorationType.None} + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private styles:Array = [ + TextInputStyle.Default, + TextInputStyle.Inline + ] + + build() { + Column() { + TextInput({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .type(InputType.Normal) + .style(this.style) + .decoration(this.decoration) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle18_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle18_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle18_03") + .fontSize(18) + .onClick(()=>{ + this.decoration = {type:TextDecorationType.Underline} + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle19.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle19.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2badd3a578d95c59c2e1b6eb3e078a8f4d51a6b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle19.ets @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle19 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State text:ResourceStr = "" + private clickNum1:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("decoration") + .id("fontAttributeAndStyle19_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle19_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle20.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle20.ets new file mode 100644 index 0000000000000000000000000000000000000000..405cbb4aabed33c68bfe6f90673918f4104002d9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle20.ets @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle20 { + @State text:ResourceStr = "" + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle20") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle21.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle21.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd569bda18c74d58f1e56aea4f5284459e4f4d59 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle21.ets @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle21 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State text:ResourceStr = "" + private clickNum1:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("decoration") + .id("fontAttributeAndStyle21_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle21_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle23.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle23.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f61ae1343a1d3aa500e5e188711699f568bafad --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle23.ets @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle23 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + private clickNum1:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("decoration") + .id("fontAttributeAndStyle23") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle24.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle24.ets new file mode 100644 index 0000000000000000000000000000000000000000..c5731b68015d95d07e6c93626be0933cd59b4ffe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle24.ets @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle24 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State type:TextAreaType = TextAreaType.NORMAL + @State text:ResourceStr = "" + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private types:Array = [ + TextAreaType.NORMAL, + TextAreaType.EMAIL, + TextAreaType.NUMBER, + TextAreaType.PHONE_NUMBER, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .type(this.type) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("type") + .id("fontAttributeAndStyle24_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle24_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<9){ + this.decoration = this.decorations[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==9){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle24_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle25.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle25.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cce7bcbe37e2167a8ceaaec387aa54d30782452 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle25.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle25 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State type:InputType = InputType.Normal + @State text:ResourceStr = "" + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private styles:Array = [ + TextContentStyle.DEFAULT, + TextContentStyle.INLINE + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .style(this.style) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("style") + .id("fontAttributeAndStyle25_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle25_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<9){ + this.decoration = this.decorations[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==9){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle25_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle26.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle26.ets new file mode 100644 index 0000000000000000000000000000000000000000..7834b4b3a50df72ecdaffb8613f4ebeaad6b7f03 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle26.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle26 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State text:ResourceStr = "" + @State textAlign:TextAlign = TextAlign.Start + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private textAligns:Array = [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .textAlign(this.textAlign) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("textAlign") + .id("fontAttributeAndStyle26_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle26_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<9){ + this.decoration = this.decorations[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==9){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle26_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle27.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle27.ets new file mode 100644 index 0000000000000000000000000000000000000000..c72d8e7c57551fce7d482426e026c56c2b8aaacc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle27.ets @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle27 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State text:ResourceStr = "" + @State fontSize:Length = 18 + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .fontSize(this.fontSize) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + + Button("fontSize") + .id("fontAttributeAndStyle27_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.fontSize = this.fontSizes[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle27_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<9){ + this.decoration = this.decorations[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==9){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle27_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle28.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle28.ets new file mode 100644 index 0000000000000000000000000000000000000000..da39099b0237b4dc17c8cd0ed52bcae7726f882c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle28.ets @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle28 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State text:ResourceStr = "" + @State maxLength:number = 20 + @State showCounter:boolean = false + private clickNum1:number = 0 + private clickNum2:number = 0 + private clickNum3:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private maxLengths:Array = [ + 20, + 50 + ] + private showCounters:Array = [ + true, + false + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .width(240) + .height(60) + .maxLength(this.maxLength) + .showCounter(this.showCounter) + .margin({top:50}) + .decoration(this.decoration) + + Button("maxLength") + .id("fontAttributeAndStyle28_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.maxLength = this.maxLengths[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("showCounter") + .id("fontAttributeAndStyle28_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<2){ + this.showCounter = this.showCounters[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==2){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle28_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum3<9){ + this.decoration = this.decorations[this.clickNum3] + this.clickNum3++ + if(this.clickNum3==9){ + this.clickNum3=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle28_4") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("clear") + .id("fontAttributeAndStyle28_5") + .fontSize(18) + .onClick(()=>{ + this.text = "" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle29.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle29.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a371d8676aa49ece4557d979ada45241a4fad5a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle29.ets @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle29 { + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + @State letterSpacing:number | string | Resource = 0 + @State text:ResourceStr = "" + private clickNum1:number = 0 + private clickNum2:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + .decoration(this.decoration) + .letterSpacing(this.letterSpacing) + + Button("decoration") + .id("fontAttributeAndStyle29_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle29_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==4){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle30.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle30.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9b9a92868c11e82312e37cdb2d0ee3254e7eada --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle30.ets @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle30 { + @State text:ResourceStr = "111111111" + private clickNum1:number = 0 + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle30") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.text = this.text_all[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle31.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle31.ets new file mode 100644 index 0000000000000000000000000000000000000000..c85503a66755f5e0e88f3aa024ef38f41229fee2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle31.ets @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle31 { + @State letterSpacing:number | string | Resource = 0 + @State textInput:ResourceStr = "开源鸿蒙" + @State text:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("Input") + .id("fontAttributeAndStyle31_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textInput = this.text_all[this.clickNum1] + this.text = this.textInput + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle31_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle31_03") + .fontSize(18) + .onClick(()=>{ + this.text = "" + }) + .margin({top:50}) + + Button("Input after clear") + .id("fontAttributeAndStyle31_04") + .fontSize(18) + .onClick(()=>{ + this.text = this.textInput + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle32.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle32.ets new file mode 100644 index 0000000000000000000000000000000000000000..20088ff341b1cc37b15cc8bea4edf08ac8e0f00a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle32.ets @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle32 { + @State letterSpacing:number | string | Resource = 0 + private clickNum:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .fontSize(24) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle32") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum<5){ + this.letterSpacing = this.letterSpacings[this.clickNum] + this.clickNum++ + if(this.clickNum==5){ + this.clickNum=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle33.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle33.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0a748bc147cd23b0591796535dd9030ef3fe816 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle33.ets @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle33 { + @State type:TextAreaType = TextAreaType.NORMAL + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State textInput:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private types:Array = [ + TextAreaType.NORMAL, + TextAreaType.EMAIL, + TextAreaType.NUMBER, + TextAreaType.PHONE_NUMBER, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .letterSpacing(this.letterSpacing) + .type(this.type) + .width(240) + .height(60) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle33_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle33_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle33_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle34.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle34.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb116ea6b0578fd71650c1299e38172b1249a655 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle34.ets @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle34 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State textInput:ResourceStr = "开源鸿蒙" + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private styles:Array = [ + TextContentStyle.DEFAULT, + TextContentStyle.INLINE + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .style(this.style) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle34_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle34_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle34_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle35.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle35.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2c69e877ff1fc1e835056295907b9e79c67f00a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle35.ets @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle35 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State textAlign:TextAlign = TextAlign.Start + @State textInput:ResourceStr = "开源鸿蒙" + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private textAligns:Array = [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .textAlign(this.textAlign) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle35_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("textAlign") + .id("fontAttributeAndStyle35_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle35_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle36.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle36.ets new file mode 100644 index 0000000000000000000000000000000000000000..93fff666b945a04c835789f20d5c8d15447e1187 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle36.ets @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle36 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State fontSize:Length = 18 + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum1:number = 0 + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(this.fontSize) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle36_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("fontSize") + .id("fontAttributeAndStyle36_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.fontSize = this.fontSizes[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + Button("input") + .id("fontAttributeAndStyle36_3") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle37.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle37.ets new file mode 100644 index 0000000000000000000000000000000000000000..b89b9b753421d5a8548b6673e3a5db6575a27158 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle37.ets @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle37 { + @State text:ResourceStr = "" + @State letterSpacing:number | string | Resource = 0 + @State style:TextContentStyle = TextContentStyle.DEFAULT + private clickNum2:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .letterSpacing(this.letterSpacing) + .width(240) + .height(60) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle37_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle37_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle38.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle38.ets new file mode 100644 index 0000000000000000000000000000000000000000..b33d19aed0c24ae45575783d4986f9592b0f673b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle38.ets @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle38 { + @State letterSpacing:number | string | Resource = 0 + @State text:ResourceStr = "" + @State maxLength:number = 20 + @State showCounter:boolean = false + private clickNum1:number = 0 + private clickNum2:number = 0 + private clickNum3:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private maxLengths:Array = [ + 20, + 50 + ] + private showCounters:Array = [ + true, + false + ] + + build() { + Column() { + TextArea({ placeholder: 'please input',text:this.text }) + .width(240) + .height(60) + .maxLength(this.maxLength) + .showCounter(this.showCounter) + .margin({top:50}) + + Button("maxLength") + .id("fontAttributeAndStyle38_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.maxLength = this.maxLengths[this.clickNum1] + this.clickNum1++ + } + if(this.clickNum1==2){ + this.clickNum1=0 + } + }) + .margin({top:50}) + + Button("showCounter") + .id("fontAttributeAndStyle38_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<2){ + this.showCounter = this.showCounters[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==2){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle38_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum3<5){ + this.letterSpacing = this.letterSpacings[this.clickNum3] + this.clickNum3++ + if(this.clickNum3==5){ + this.clickNum3=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle38_4") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle39.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle39.ets new file mode 100644 index 0000000000000000000000000000000000000000..891a13b400c0dde622dd6ca363a77ffa1b94dd4b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle39.ets @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle39 { + @State letterSpacing:number | string | Resource = 0 + @State text:ResourceStr = "" + private clickNum:number = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input',text:this.text }) + .width(240) + .height(60) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle39_1") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle39_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum<5){ + this.letterSpacing = this.letterSpacings[this.clickNum] + this.clickNum++ + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle40.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle40.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e3e1cf5f5aa5d960b264fcb8918124de03ceaa0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle40.ets @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle40 { + @State lineHeight:number | string | Resource = 24 + @State text:ResourceStr = "" + @State fontSize:Length = 18 + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + + build() { + Column() { + TextArea({ placeholder: 'please input',text:this.text }) + .width(240) + .height(60) + .fontSize(this.fontSize) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle40_1") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle40_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("fontSize") + .id("fontAttributeAndStyle40_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<4){ + this.fontSize = this.fontSizes[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==4){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle41.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle41.ets new file mode 100644 index 0000000000000000000000000000000000000000..b505ca1ace87532b4af73798c1b7dcfcf7065f76 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle41.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle41 { + @State lineHeight:number | string | Resource = 24 + private clickNum:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input' }) + .fontSize(24) + .lineHeight(this.lineHeight) + .width(240) + .height(60) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle41") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum<6){ + this.lineHeight = this.lineHeights[this.clickNum] + this.clickNum++ + if(this.clickNum==6){ + this.clickNum=0 + } + } + }) + .margin({top:50}) + + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle42.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle42.ets new file mode 100644 index 0000000000000000000000000000000000000000..6129306d1c4ef144df8239702797f36d9f5fa032 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle42.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle42 { + @State lineHeight:number | string | Resource = 24 + @State textInput:ResourceStr = "开源鸿蒙" + @State text:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input',text:this.text }) + .fontSize(24) + .lineHeight(this.lineHeight) + .width(240) + .height(60) + .margin({top:50}) + + Button("Input") + .id("fontAttributeAndStyle42_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textInput = this.text_all[this.clickNum1] + this.text = this.textInput + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle42") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle42_03") + .fontSize(18) + .onClick(()=>{ + this.text = "" + }) + .margin({top:50}) + + Button("Input after clear") + .id("fontAttributeAndStyle42_04") + .fontSize(18) + .onClick(()=>{ + this.text = this.textInput + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle43.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle43.ets new file mode 100644 index 0000000000000000000000000000000000000000..0132ff2e448e5f5d961112e26f4c64ab68d6c0a7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle43.ets @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle43 { + @State type:TextAreaType = TextAreaType.NORMAL + @State text:ResourceStr = "" + @State lineHeight:number | string | Resource = 24 + @State textInput:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private types:Array = [ + TextAreaType.NORMAL, + TextAreaType.EMAIL, + TextAreaType.NUMBER, + TextAreaType.PHONE_NUMBER, + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .lineHeight(this.lineHeight) + .type(this.type) + .width(240) + .height(60) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle43_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle43_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle43_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle44.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle44.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4b533cf33cf57152fde6b6bfd8b55fecb0da5e4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle44.ets @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle44 { + @State style:TextContentStyle = TextContentStyle.DEFAULT + @State text:ResourceStr = "" + @State lineHeight:number | string | Resource = 24 + @State textInput:ResourceStr = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private styles:Array = [ + TextContentStyle.DEFAULT, + TextContentStyle.INLINE + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .lineHeight(this.lineHeight) + .style(this.style) + .width(240) + .height(60) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle44_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<2){ + this.style = this.styles[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==2){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle44_2") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle44_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle45.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle45.ets new file mode 100644 index 0000000000000000000000000000000000000000..325825043b24edbb118171a60bd308bb5153adb5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle45.ets @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle45 { + @State text:ResourceStr = "开源鸿蒙" + @State lineHeight:number | string | Resource = 24 + private clickNum1:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle45_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle46.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle46.ets new file mode 100644 index 0000000000000000000000000000000000000000..76c2d1276c0db44905369a42804a294f4969b0e3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle46.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle46 { + @State text:ResourceStr = "开源鸿蒙" + @State style:TextContentStyle = TextContentStyle.DEFAULT + @State lineHeight:number | string | Resource = 24 + @State decoration:TextDecorationOptions = {type: TextDecorationType.None} + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private styles:Array = [ + TextContentStyle.DEFAULT, + TextContentStyle.INLINE + ] + + build() { + Column() { + TextArea({ placeholder: 'please input', text:this.text }) + .fontSize(24) + .width(240) + .height(60) + .lineHeight(this.lineHeight) + .decoration(this.decoration) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle46_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle46_2") + .fontSize(18) + .onClick(()=>{ + this.decoration = {type: TextDecorationType.Underline} + }) + .margin({top:50}) + + Button("style") + .id("fontAttributeAndStyle46_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<2){ + this.style = this.styles[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==2){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle46_4") + .fontSize(18) + .onClick(()=>{ + this.text = "开源鸿蒙开源鸿蒙开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle47.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle47.ets new file mode 100644 index 0000000000000000000000000000000000000000..d1eb89814347e677662c5505916feebeeb5917d3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle47.ets @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle47 { + @State changeValue: string = '' + @State decoration: TextDecorationOptions = {type: TextDecorationType.None, color: Color.Black} + private clickNum1:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .decoration(this.decoration) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle47_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle47_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle48.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle48.ets new file mode 100644 index 0000000000000000000000000000000000000000..c677d043d9a84c0581143ee58ccddaf941703724 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle48.ets @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle48 { + @State changeValue: string = '' + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle48") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle49.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle49.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3fc9388b83d51855a1ea031a658b95c98a8a223 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle49.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle49 { + @State changeValue: string = '' + @State decoration: TextDecorationOptions = {type: TextDecorationType.None} + private clickNum1:number = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .decoration(this.decoration) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle49_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("decoration.type") + .id("fontAttributeAndStyle49_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle50.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle50.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e1ea8b9046ba28c6956bc155142ef60b2d64006 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle50.ets @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle50 { + @State changeValue: string = '' + @State decoration: TextDecorationOptions = {type: TextDecorationType.None} + private clickNum1:number = 0 + private clickNum2:number = 0 + @State letterSpacing:number | string | Resource = 0 + private decorations:Array = [ + {type: TextDecorationType.Underline}, + {type: TextDecorationType.LineThrough}, + {type: TextDecorationType.Overline}, + {type: TextDecorationType.None}, + {type: TextDecorationType.Underline, color: Color.Pink}, + {type: TextDecorationType.Underline, color: "0x008000"}, + {type: TextDecorationType.Underline, color: "rgb(255, 0, 0)"}, + {type: TextDecorationType.Underline, color: "#0000ff"}, + {type: TextDecorationType.Underline, color: $r('app.color.yellow')}, + ] + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .decoration(this.decoration) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle50_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("decoration.type") + .id("fontAttributeAndStyle50_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<9){ + this.decoration = this.decorations[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==9){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle50_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle51.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle51.ets new file mode 100644 index 0000000000000000000000000000000000000000..06e08b2d968be54fa85c0939f17630d3f8e35735 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle51.ets @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle51 { + @State changeValue: string = '' + @State textInput:string = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + @State letterSpacing:number | string | Resource = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle51_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textInput = this.text_all[this.clickNum1] + this.changeValue = this.textInput + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle51_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle51_03") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "" + }) + .margin({top:50}) + + Button("Input after clear") + .id("fontAttributeAndStyle51_04") + .fontSize(18) + .onClick(()=>{ + this.changeValue = this.textInput + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle52.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle52.ets new file mode 100644 index 0000000000000000000000000000000000000000..45519bcf8ce410e9865afb3a556269a9314da32c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle52.ets @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle52 { + private clickNum2:number = 0 + @State letterSpacing:number | string | Resource = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle52") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle53.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle53.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8a263663db8b4343d18bc182c8d633e0eab05c6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle53.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle53 { + private clickNum1:number = 0 + private clickNum2:number = 0 + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + @State letterSpacing:number | string | Resource = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private types:Array = [ + SearchType.NORMAL, + SearchType.EMAIL, + SearchType.NUMBER, + SearchType.PHONE_NUMBER, + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .type(this.type) + .width('80%') + .height(40) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle53_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle53_2") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle53_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==5){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle54.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle54.ets new file mode 100644 index 0000000000000000000000000000000000000000..c0f7a6981c64932011cd9ba11e70ef5cfd5213ee --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle54.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle54 { + private clickNum1:number = 0 + private clickNum2:number = 0 + @State textAlign:TextAlign = TextAlign.Start + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + @State letterSpacing:number | string | Resource = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + private textAligns:Array = [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .textAlign(this.textAlign) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle54_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle54_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("textAlign") + .id("fontAttributeAndStyle54_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle55.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle55.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfabbe34524e465c821d0ad6537a588ddea858f1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle55.ets @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle55 { + private clickNum1:number = 0 + private clickNum2:number = 0 + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + @State letterSpacing:number | string | Resource = 0 + private letterSpacings:Array = [ + -2, + 0, + 3, + "5px", + "10%" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .letterSpacing(this.letterSpacing) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle55_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("letterSpacing") + .id("fontAttributeAndStyle55_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<5){ + this.letterSpacing = this.letterSpacings[this.clickNum2] + this.clickNum2++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d2cf512aff8ab5b62837d43421fddad3e3ccac6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56.ets @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle56 { + private clickNum1:number = 0 + @State lineHeight:number | string | Resource = 24 + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .lineHeight(this.lineHeight) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle56_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle56_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle57.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle57.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba296b6e33ec19651848aed17543a7b7b3844fe5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle57.ets @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle57 { + @State lineHeight:number | string | Resource = 24 + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + @State fontSize:Length = 18 + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private fontSizes:Array = [ + 0, + 10, + 20, + 30 + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .lineHeight(this.lineHeight) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: this.fontSize, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle57_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle57_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("fontSize") + .id("fontAttributeAndStyle57_3") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<4){ + this.fontSize = this.fontSizes[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==4){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle58.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle58.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc53429a5e7c0d26e5a2a0c7528b3a38b92a9286 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle58.ets @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle58 { + @State lineHeight:number | string | Resource = 24 + private clickNum1:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .lineHeight(this.lineHeight) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 18, weight: 400 }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle58") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.lineHeight = this.lineHeights[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle59.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle59.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ff9ea493e3cc904c7a0833df2e739e7cd3322a3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle59.ets @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle59 { + @State lineHeight:number | string | Resource = 24 + @State changeValue: string = '' + @State textInput:string = "开源鸿蒙" + private clickNum1:number = 0 + private clickNum2:number = 0 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private text_all:Array = [ + "总有一条蜿蜒在童话镇里七彩的河", + "%¥……@!*()&", + " " + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('80%') + .height(40) + .lineHeight(this.lineHeight) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("Input") + .id("fontAttributeAndStyle59_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textInput = this.text_all[this.clickNum1] + this.changeValue = this.textInput + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle59_02") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("clear text") + .id("fontAttributeAndStyle59_03") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "" + }) + .margin({top:50}) + + Button("Input after clear") + .id("fontAttributeAndStyle59_04") + .fontSize(18) + .onClick(()=>{ + this.changeValue = this.textInput + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle60.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle60.ets new file mode 100644 index 0000000000000000000000000000000000000000..95e8cb44a47cf79435e88dbced40c9ed1993d70b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle60.ets @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle60 { + private clickNum1:number = 0 + private clickNum2:number = 0 + @State changeValue: string = '' + @State type:SearchType = SearchType.NORMAL + @State lineHeight:number | string | Resource = 24 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + private types:Array = [ + SearchType.NORMAL, + SearchType.EMAIL, + SearchType.NUMBER, + SearchType.PHONE_NUMBER, + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .type(this.type) + .lineHeight(this.lineHeight) + .width('80%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("type") + .id("fontAttributeAndStyle60_1") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.type = this.types[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle60_2") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle60_03") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle61.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle61.ets new file mode 100644 index 0000000000000000000000000000000000000000..9363a7f07b1a1471a055aa8b4d29afb9c169772b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle61.ets @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle61 { + private clickNum2:number = 0 + @State changeValue: string = '' + @State lineHeight:number | string | Resource = 24 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .lineHeight(this.lineHeight) + .width('80%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle61_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle61_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle62.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle62.ets new file mode 100644 index 0000000000000000000000000000000000000000..3c602b0560d0263fa298b180fcb84e0ccddf4e7f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle62.ets @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle62 { + private clickNum2:number = 0 + @State changeValue: string = '' + @State decoration:TextDecorationOptions = {type:TextDecorationType.None} + @State lineHeight:number | string | Resource = 24 + private lineHeights:Array = [ + -5, + 0, + 10, + 20, + "30%", + "40vp" + ] + controller: SearchController = new SearchController() + + build() { + Column() { + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .lineHeight(this.lineHeight) + .decoration(this.decoration) + .width('80%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin({top:50}) + + Button("input") + .id("fontAttributeAndStyle62_1") + .fontSize(18) + .onClick(()=>{ + this.changeValue = "开源鸿蒙" + }) + .margin({top:50}) + + Button("lineHeight") + .id("fontAttributeAndStyle62_2") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum2<6){ + this.lineHeight = this.lineHeights[this.clickNum2] + this.clickNum2++ + if(this.clickNum2==6){ + this.clickNum2=0 + } + } + }) + .margin({top:50}) + + Button("decoration") + .id("fontAttributeAndStyle62_3") + .fontSize(18) + .onClick(()=>{ + this.decoration = {type:TextDecorationType.Underline} + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle63.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle63.ets new file mode 100644 index 0000000000000000000000000000000000000000..c46f1fd12cc270c18137475ea6b6518a4b42f992 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle63.ets @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle63 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30 + } + }) + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle64.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle64.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1b70fe29fce1c37a629849e513b856ffcce6f00 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle64.ets @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle64 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addSymbolSpan($r("app.media.img2"), + { + style: + { + fontSize: 30 + } + }) + }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle65.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle65.ets new file mode 100644 index 0000000000000000000000000000000000000000..aabba0a896670e3364930e66200752ba1e4ce482 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle65.ets @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle65 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("012345", + { + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }) + this.controller.addImageSpan($r("app.media.icon"), + { + imageStyle: + { + size: ["57px", "57px"] + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle65_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30 + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle66.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle66.ets new file mode 100644 index 0000000000000000000000000000000000000000..2914fbd71d4c5b1877a04c39eb2d431fe6d4fea4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle66.ets @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle66 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan_01") + .id("fontAttributeAndStyle66_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30 + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_02") + .id("fontAttributeAndStyle66_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: -30 + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_03") + .id("fontAttributeAndStyle66_03") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 0 + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle67.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle67.ets new file mode 100644 index 0000000000000000000000000000000000000000..a62d7c4dc761ce3e4a3cd603eca199370c383935 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle67.ets @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle67 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan_01") + .id("fontAttributeAndStyle67_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: '10' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_02") + .id("fontAttributeAndStyle67_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: '-10' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_03") + .id("fontAttributeAndStyle67_03") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: '10abc' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_04") + .id("fontAttributeAndStyle67_04") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: '50%' + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle68.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle68.ets new file mode 100644 index 0000000000000000000000000000000000000000..e53b32a599c6ebaa05ebd53650a22f06c34a75c8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle68.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle68 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan_01") + .id("fontAttributeAndStyle68_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: [Color.Red,Color.Black] + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_02") + .id("fontAttributeAndStyle68_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: [Color.Red,Color.Black,Color.Pink] + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle69.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle69.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a1c6416fd44931e943ecfcd6f88069bef2e0b77 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle69.ets @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle69 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle69_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: ["0xff0000"] + } + }) + }) + .margin({top:50}) + + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle70.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle70.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b4cf270b83cc2d4c7b7990c673f039cd5751125 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle70.ets @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle70 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan_1") + .id("fontAttributeAndStyle70_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: ["#008800"] + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_2") + .id("fontAttributeAndStyle70_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: ["rgba(0,255,0,1)"] + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan_3") + .id("fontAttributeAndStyle70_03") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: ["rgb(0,0,255)"] + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle71.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle71.ets new file mode 100644 index 0000000000000000000000000000000000000000..17e836d58c2fbadf58eab27f00b213f8d1b9de92 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle71.ets @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle71 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle71_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontColor: [$r("app.color.colorRed")] + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle72.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle72.ets new file mode 100644 index 0000000000000000000000000000000000000000..6af085fb7ac8363d04525cc5b24eae0d9ad6b1f7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle72.ets @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle72 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle72_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:150 + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle72_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:200 + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle72_03") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:250 + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle73.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle73.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6ef21e2c4373b751f4dc2b0dcc6ae4f6c81474d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle73.ets @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle73 { + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle73_01") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:'600' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle73_02") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:'-100' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle73_03") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:'400abc' + } + }) + }) + .margin({top:50}) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle73_04") + .fontSize(18) + .onClick(()=>{ + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:'500%' + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle74.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle74.ets new file mode 100644 index 0000000000000000000000000000000000000000..51af2fc721321516bd80e3183284b91fac3c26c8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle74.ets @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle74 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private fontWeights1:Array = [ + FontWeight.Lighter, + FontWeight.Regular, + FontWeight.Medium, + FontWeight.Bold, + FontWeight.Bolder, + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle74_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<5){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==5){ + this.clickNum1=0 + } + } + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash_circle"), + { + style: + { + fontSize: 30, + fontWeight:this.symbolFontWeight + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle75.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle75.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3af63848bc4c458befece1d11680e0e961b2d81 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle75.ets @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle75 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + @State textSize:Length = 10 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textSizes:Array = [ + -20, + 0, + 20, + 40 + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: Color.Orange, + fontSize: 10 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle75_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.textSize = this.textSizes[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontSize: this.textSize } + }) + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle76.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle76.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffc07d960e6854b2698bc581c1b23aa6cacf5b30 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle76.ets @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle76 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + @State textSize:Length = 20 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textSizes:Array = [ + 10, + -10, + '10abc', + '50%' + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle76_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.textSize = this.textSizes[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontSize: this.textSize } + }) + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle77.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle77.ets new file mode 100644 index 0000000000000000000000000000000000000000..163e735b43071ee08800cd60ebc5a2d22139aa82 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle77.ets @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle77 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + @State textColor:Color = Color.Red + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textColors:Array= [ + Color.Red, + Color.Black, + Color.Pink + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle77_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textColor = this.textColors[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontColor: this.textColor } + }) + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle78.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle78.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ad4e9f2b602acb025884e413882e7da06940699 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle78.ets @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle78 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + @State textColor:Color |string = Color.Blue + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: this.textColor, + fontSize: 20 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle78_01") + .fontSize(18) + .onClick(()=>{ + this.textColor = '#FF0000' + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontColor: this.textColor } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle79.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle79.ets new file mode 100644 index 0000000000000000000000000000000000000000..a63ff3fb9acf1c18235d5df2d832b1231dc0a775 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle79.ets @@ -0,0 +1,71 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle79 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + @State textColor:string = "#FF0000" + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textColors:Array= [ + '#008800', + 'rgba(0,255,0,1)', + 'rgb(0,0,255)' + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: this.textColor, + fontSize: 20 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle79_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textColor = this.textColors[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontColor: this.textColor } + }) + } + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle80.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle80.ets new file mode 100644 index 0000000000000000000000000000000000000000..423cf1028fbef5d61bbb280bec8e39d4172a4506 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle80.ets @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle80 { + @State symbolFontWeight:string | number = 100 + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private fontWeights1:Array = [ + 150, + 200, + 250, + 300, + 400, + 900 + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: Color.Orange, + fontSize: 30, + fontWeight:100 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle80_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontWeight: this.symbolFontWeight } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle81.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle81.ets new file mode 100644 index 0000000000000000000000000000000000000000..44f6949b2327a4d5b8a433d8efa45289b3d9b7cf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle81.ets @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle81 { + @State symbolFontWeight:string | number = 100 + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private fontWeights1:Array = [ + '600', + '-100', + '400abc', + '500%' + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontColor: Color.Orange, + fontSize: 30, + fontWeight:100 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle81_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontWeight: this.symbolFontWeight } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle82.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle82.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e9580a88aba1e1e7281a4c0c512063bc106f03a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle82.ets @@ -0,0 +1,73 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle82 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private fontWeights1:Array = [ + FontWeight.Normal, + FontWeight.Lighter, + FontWeight.Regular, + FontWeight.Medium, + FontWeight.Bold, + FontWeight.Bolder, + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontColor: Color.Orange, + fontSize: 20 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle82_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<6){ + this.symbolFontWeight = this.fontWeights1[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==6){ + this.clickNum1=0 + } + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + textStyle: { fontWeight: this.symbolFontWeight } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle83.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle83.ets new file mode 100644 index 0000000000000000000000000000000000000000..12a2ed87f9f853a4a1ab1d4d452f184d2f3dd378 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle83.ets @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle83 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State symbolRenderingStrategy:SymbolRenderingStrategy = SymbolRenderingStrategy.SINGLE + @State textColor:ResourceColor[] = [Color.Red] + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private renderingStrategies:Array = [ + SymbolRenderingStrategy.SINGLE, + SymbolRenderingStrategy.MULTIPLE_COLOR, + SymbolRenderingStrategy.MULTIPLE_OPACITY + ] + + private textColors:Array= [ + [Color.Red], + [Color.Red,Color.Yellow], + [Color.Red,Color.Red], + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123", + { + style: + { + fontSize: 30 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle83_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<3){ + this.textColor = this.textColors[this.clickNum1] + this.symbolRenderingStrategy = this.renderingStrategies[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==3){ + this.clickNum1=0 + } + } + this.controller.updateSpanStyle({ + start: this.start, + end: this.end, + symbolStyle: { + fontColor: this.textColor, + renderingStrategy:SymbolRenderingStrategy.MULTIPLE_COLOR, + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle84.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle84.ets new file mode 100644 index 0000000000000000000000000000000000000000..5592a2bb2bfa953df65fc96bcd97acc1fb6ba682 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle84.ets @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle84 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State symbolRenderingStrategy:SymbolRenderingStrategy = SymbolRenderingStrategy.SINGLE + @State textColor:ResourceColor[] = [Color.Red] + @State textAlign: TextAlign = TextAlign.Start + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textAligns:TextAlign[]= [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End, + TextAlign.JUSTIFY + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontSize: 30 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle84_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + this.controller.updateParagraphStyle({ + start: this.start, + end: this.end, + style: { + textAlign:this.textAlign + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle85.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle85.ets new file mode 100644 index 0000000000000000000000000000000000000000..415d6fd242a7dbe2fa8555bb97c61ccd295b37a6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle85.ets @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle85 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State symbolRenderingStrategy:SymbolRenderingStrategy = SymbolRenderingStrategy.SINGLE + @State textColor:ResourceColor[] = [Color.Red] + @State textAlign: TextAlign = TextAlign.Start + @State start: number = -1 + @State end: number = -1 + private clickNum1:number = 0 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + private textAligns:TextAlign[]= [ + TextAlign.Start, + TextAlign.Center, + TextAlign.End, + TextAlign.JUSTIFY + ] + + build() { + Column() { + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontSize: 30 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle85_01") + .fontSize(18) + .onClick(()=>{ + if(this.clickNum1<4){ + this.textAlign = this.textAligns[this.clickNum1] + this.clickNum1++ + if(this.clickNum1==4){ + this.clickNum1=0 + } + } + this.controller.updateParagraphStyle({ + start: this.start, + end: this.end, + style: { + textAlign:this.textAlign + } + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle86.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle86.ets new file mode 100644 index 0000000000000000000000000000000000000000..67131badba3c7b3af52fbed0b6d647d69f7aac68 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle86.ets @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct fontAttributeAndStyle86 { + @State symbolFontWeight:FontWeight = FontWeight.Normal + @State symbolRenderingStrategy:SymbolRenderingStrategy = SymbolRenderingStrategy.SINGLE + @State textColor:ResourceColor[] = [Color.Red] + @State textAlign: TextAlign = TextAlign.Start + @State start: number = -1 + @State end: number = -1 + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller } + + build() { + Column() { + RichEditor(this.options) + .id("RichEditor_086") + .onReady(() => { + this.controller.addTextSpan("123456", + { + style: + { + fontSize: 30 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + }) + + Button("addSymbolSpan") + .id("fontAttributeAndStyle86_01") + .fontSize(18) + .onClick(()=>{ + this.controller.setTypingStyle( + { + fontWeight: 600, + fontColor: Color.Red, + fontSize: 30, + }) + }) + .margin({top:50}) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface04/fontAttributeAndStyle_01.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface04/fontAttributeAndStyle_01.ets new file mode 100644 index 0000000000000000000000000000000000000000..68f3789eb44d1c3e19aec1a4c062bbb4dc50e741 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributeFontInterface04/fontAttributeAndStyle_01.ets @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BlankModifier } from "@ohos.arkui.modifier"; + +class MyBlankModifier extends BlankModifier { + applyBlankAttribute(instance: BlankAttribute): void { + super.applyNormalAttribute?.(instance); + } + + onChange() { + this.color("#FF654321") + } +} + +@Entry +@Component +struct BlankExample { + @State myBlankModifier: BlankModifier = new MyBlankModifier() + // @State customModifier: BlankModifier = new CustomModifier() + // .color("#FF123456") + + build() { + Column({ space: 5 }) { + Button("change value").onClick(() => { + (this.myBlankModifier as MyBlankModifier).onChange(); + }).key("changeButton") + + Column() { + Blank("160") + .attributeModifier(this.myBlankModifier as MyBlankModifier) + .key('blank') + Toggle({ type: ToggleType.Switch }).margin({ top: 14, bottom: 14, left: 6, right: 6 }) + }.backgroundColor(Color.Gray).padding(20) + } + .width('100%') + .margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/color.json b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/color.json index 249b599120e715286a9ec5be63f647712459ce68..03d835fb48e435eb83f00da8336d83c20986a115 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/color.json +++ b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/color.json @@ -15,6 +15,10 @@ { "name": "blue", "value": "#0000ff" + }, + { + "name": "colorRed", + "value": "#FF0000" } ] } \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/string.json b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/string.json index 844c9aefc7ef9da8fcf906c57bd7cd5bd6c6cfe8..273e23b03ea5c45382994f0c894f986377cb090e 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/string.json +++ b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/element/string.json @@ -36,6 +36,10 @@ "name": "fontfamily_1", "value": "HarmonyOS Sans" }, + { + "name": "span", + "value": "span" + }, { "name": "test_value", "value": "-10" diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7a32b59293c29076b7ff37af37dc09318aa26462 Binary files /dev/null and b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/big_icon.png differ diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/img2.png b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/img2.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/media/img2.png differ diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json index 6e5275ce4e8b7319247b407fd22b5748df155df7..f481a818d416b2232156fb6e46e1ca04cdda95d5 100644 --- a/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json +++ b/function/ui_compare/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -1343,7 +1343,7 @@ "testability/pages/ComponentTextCommonAffineTransformation/ComponentTextCommonAffineTransformation009", "testability/pages/ComponentTextCommonAffineTransformation/ComponentTextCommonAffineTransformation010", "testability/pages/ComponentTextCommonAffineTransformation/ComponentTextCommonAffineTransformation011", - "testability/pages/ComponentTextCommonAffineTransformation/ComponentTextCommonAffineTransformation012" + "testability/pages/ComponentTextCommonAffineTransformation/ComponentTextCommonAffineTransformation012", "testability/pages/UIComponentTextTextinputAction/UIComponentTextTextinputAction001", "testability/pages/UIComponentTextTextinputAction/UIComponentTextTextinputAction014", "testability/pages/UIComponentTextTextinputAction/UIComponentTextTextinputAction024", @@ -1405,6 +1405,270 @@ "testability/pages/UIAttributeFontSupportstage/UIAttributeFontSupportstage009", "testability/pages/UIAttributeFontSupportstage/UIAttributeFontSupportstage010", "testability/pages/UIAttributeFontInterface/UIAttributeFontInterface050", - "testability/pages/UIAttributeFontInterface/UIAttributeFontInterface060" + "testability/pages/UIAttributeFontInterface/UIAttributeFontInterface060", + "testability/pages/UIAttributeFontInterface02/fontAttributePage01", + "testability/pages/UIAttributeFontInterface02/fontAttributePage03", + "testability/pages/UIAttributeFontInterface02/fontAttributePage04", + "testability/pages/UIAttributeFontInterface02/fontAttributePage05", + "testability/pages/UIAttributeFontInterface02/fontAttributePage06", + "testability/pages/UIAttributeFontInterface02/fontAttributePage07", + "testability/pages/UIAttributeFontInterface02/fontAttributePage08", + "testability/pages/UIAttributeFontInterface02/fontAttributePage09", + "testability/pages/UIAttributeFontInterface02/fontAttributePage10", + "testability/pages/UIAttributeFontInterface02/fontAttributePage11", + "testability/pages/UIAttributeFontInterface02/fontAttributePage12", + "testability/pages/UIAttributeFontInterface02/fontAttributePage13", + "testability/pages/UIAttributeFontInterface02/fontAttributePage14", + "testability/pages/UIAttributeFontInterface02/fontAttributePage15", + "testability/pages/UIAttributeFontInterface02/fontAttributePage16", + "testability/pages/UIAttributeFontInterface02/fontAttributePage17", + "testability/pages/UIAttributeFontInterface02/fontAttributePage18", + "testability/pages/UIAttributeFontInterface02/fontAttributePage19", + "testability/pages/UIAttributeFontInterface02/fontAttributePage20", + "testability/pages/UIAttributeFontInterface02/fontAttributePage21", + "testability/pages/UIAttributeFontInterface02/fontAttributePage22", + "testability/pages/UIAttributeFontInterface02/fontAttributePage23", + "testability/pages/UIAttributeFontInterface02/fontAttributePage24", + "testability/pages/UIAttributeFontInterface02/fontAttributePage25", + "testability/pages/UIAttributeFontInterface02/fontAttributePage26", + "testability/pages/UIAttributeFontInterface02/fontAttributePage27", + "testability/pages/UIAttributeFontInterface02/fontAttributePage28", + "testability/pages/UIAttributeFontInterface02/fontAttributePage29", + "testability/pages/UIAttributeFontInterface02/fontAttributePage30", + "testability/pages/UIAttributeFontInterface02/fontAttributePage33", + "testability/pages/UIAttributeFontInterface02/fontAttributePage34", + "testability/pages/UIAttributeFontInterface02/fontAttributePage35", + "testability/pages/UIAttributeFontInterface02/fontAttributePage36", + "testability/pages/UIAttributeFontInterface02/fontAttributePage41", + "testability/pages/UIAttributeFontInterface02/fontAttributePage42", + "testability/pages/UIAttributeFontInterface02/fontAttributePage43", + "testability/pages/UIAttributeFontInterface02/fontAttributePage44", + "testability/pages/UIAttributeFontInterface02/fontAttributePage45", + "testability/pages/UIAttributeFontInterface02/fontAttributePage46", + "testability/pages/UIAttributeFontInterface02/fontAttributePage47", + "testability/pages/UIAttributeFontInterface02/fontAttributePage48", + "testability/pages/UIAttributeFontInterface02/fontAttributePage49", + "testability/pages/UIAttributeFontInterface02/fontAttributePage50", + "testability/pages/UIAttributeFontInterface02/fontAttributePage51", + "testability/pages/UIAttributeFontInterface02/fontAttributePage52", + "testability/pages/UIAttributeFontInterface02/fontAttributePage53", + "testability/pages/UIAttributeFontInterface02/fontAttributePage54", + "testability/pages/UIAttributeFontInterface02/fontAttributePage55", + "testability/pages/UIAttributeFontInterface02/fontAttributePage56", + "testability/pages/UIAttributeFontInterface02/fontAttributePage57", + "testability/pages/UIAttributeFontInterface02/fontAttributePage58", + "testability/pages/UIAttributeFontInterface02/fontAttributePage59", + "testability/pages/UIAttributeFontInterface02/fontAttributePage60", + "testability/pages/UIAttributeFontInterface02/fontAttributePage61", + "testability/pages/UIAttributeFontInterface02/fontAttributePage62", + "testability/pages/UIAttributeFontInterface02/fontAttributePage63", + "testability/pages/UIAttributeFontInterface02/fontAttributePage64", + "testability/pages/UIAttributeFontInterface02/fontAttributePage65", + "testability/pages/UIAttributeFontInterface02/fontAttributePage66", + "testability/pages/UIAttributeFontInterface02/fontAttributePage67", + "testability/pages/UIAttributeFontInterface02/fontAttributePage68", + "testability/pages/UIAttributeFontInterface02/fontAttributePage69", + "testability/pages/UIAttributeFontInterface02/fontAttributePage70", + "testability/pages/UIAttributeFontInterface02/fontAttributePage71", + "testability/pages/UIAttributeFontInterface02/fontAttributePage72", + "testability/pages/UIAttributeFontInterface02/fontAttributePage73", + "testability/pages/UIAttributeFontInterface02/fontAttributePage74", + "testability/pages/UIAttributeFontInterface02/fontAttributePage75", + "testability/pages/UIAttributeFontInterface02/fontAttributePage76", + "testability/pages/UIAttributeFontInterface02/fontAttributePage77", + "testability/pages/UIAttributeFontInterface02/fontAttributePage78", + "testability/pages/UIAttributeFontInterface02/fontAttributePage79", + "testability/pages/UIAttributeFontInterface02/fontAttributePage80", + "testability/pages/UIAttributeFontInterface02/fontAttributePage81", + "testability/pages/UIAttributeFontInterface02/fontAttributePage82", + "testability/pages/UIAttributeFontInterface02/fontAttributePage83", + "testability/pages/UIAttributeFontInterface02/fontAttributePage84", + "testability/pages/UIAttributeFontInterface02/fontAttributePage85", + "testability/pages/UIAttributeFontInterface02/fontAttributePage86", + "testability/pages/UIAttributeFontInterface02/fontAttributePage87", + "testability/pages/UIAttributeFontInterface02/fontAttributePage88", + "testability/pages/UIAttributeFontInterface02/fontAttributePage89", + "testability/pages/UIAttributeFontInterface02/fontAttributePage90", + "testability/pages/UIAttributeFontInterface02/fontAttributePage91", + "testability/pages/UIAttributeFontInterface02/fontAttributePage92", + "testability/pages/UIAttributeFontInterface02/fontAttributePage93", + "testability/pages/UIAttributeFontInterface02/fontAttributePage94", + "testability/pages/UIAttributeFontInterface02/fontAttributePage95", + "testability/pages/UIAttributeFontInterface02/fontAttributePage96", + "testability/pages/UIAttributeFontInterface02/fontAttributePage97", + "testability/pages/UIAttributeFontInterface02/fontAttributePage98", + "testability/pages/UIAttributeFontInterface02/fontAttributePage99", + "testability/pages/UIAttributeFontInterface02/fontAttributePage100", + "testability/pages/UIAttributeFontInterface02/fontAttributePage101", + "testability/pages/UIAttributeFontInterface02/fontAttributePage102", + "testability/pages/UIAttributeFontInterface02/fontAttributePage103", + "testability/pages/UIAttributeFontInterface02/fontAttributePage104", + "testability/pages/UIAttributeFontInterface02/fontAttributePage105", + "testability/pages/UIAttributeFontInterface02/fontAttributePage106", + "testability/pages/UIAttributeFontInterface02/fontAttributePage107", + "testability/pages/UIAttributeFontInterface02/fontAttributePage108", + "testability/pages/UIAttributeFontInterface02/fontAttributePage109", + "testability/pages/UIAttributeFontInterface02/fontAttributePage110", + "testability/pages/UIAttributeFontInterface02/fontAttributePage111", + "testability/pages/UIAttributeFontInterface02/fontAttributePage112", + "testability/pages/UIAttributeFontInterface02/fontAttributePage113", + "testability/pages/UIAttributeFontInterface02/fontAttributePage114", + "testability/pages/UIAttributeFontInterface02/fontAttributePage115", + "testability/pages/UIAttributeFontInterface02/fontAttributePage116", + "testability/pages/UIAttributeFontInterface02/fontAttributePage117", + "testability/pages/UIAttributeFontInterface02/fontAttributePage118", + "testability/pages/UIAttributeFontInterface02/fontAttributePage119", + "testability/pages/UIAttributeFontInterface02/fontAttributePage120", + "testability/pages/UIAttributeFontInterface02/fontAttributePage121", + "testability/pages/UIAttributeFontInterface02/fontAttributePage122", + "testability/pages/UIAttributeFontInterface02/fontAttributePage123", + "testability/pages/UIAttributeFontInterface02/fontAttributePage124", + "testability/pages/UIAttributeFontInterface02/fontAttributePage125", + "testability/pages/UIAttributeFontInterface02/fontAttributePage126", + "testability/pages/UIAttributeFontInterface02/fontAttributePage127", + "testability/pages/UIAttributeFontInterface02/fontAttributePage128", + "testability/pages/UIAttributeFontInterface02/fontAttributePage129", + "testability/pages/UIAttributeFontInterface02/fontAttributePage130", + "testability/pages/UIAttributeFontInterface02/fontAttributePage131", + "testability/pages/UIAttributeFontInterface02/fontAttributePage132", + "testability/pages/UIAttributeFontInterface02/fontAttributePage133", + "testability/pages/UIAttributeFontInterface02/fontAttributePage134", + "testability/pages/UIAttributeFontInterface02/fontAttributePage135", + "testability/pages/UIAttributeFontInterface02/fontAttributePage136", + "testability/pages/UIAttributeFontInterface02/fontAttributePage137", + "testability/pages/UIAttributeFontInterface02/fontAttributePage138", + "testability/pages/UIAttributeFontInterface02/fontAttributePage139", + "testability/pages/UIAttributeFontInterface02/fontAttributePage140", + "testability/pages/UIAttributeFontInterface02/fontAttributePage141", + "testability/pages/UIAttributeFontInterface02/fontAttributePage142", + "testability/pages/UIAttributeFontInterface02/fontAttributePage143", + "testability/pages/UIAttributeFontInterface02/fontAttributePage144", + "testability/pages/UIAttributeFontInterface02/fontAttributePage145", + "testability/pages/UIAttributeFontInterface02/fontAttributePage146", + "testability/pages/UIAttributeFontInterface02/fontAttributePage147", + "testability/pages/UIAttributeFontInterface02/fontAttributePage148", + "testability/pages/UIAttributeFontInterface02/fontAttributePage149", + "testability/pages/UIAttributeFontInterface02/fontAttributePage150", + "testability/pages/UIAttributeFontInterface02/fontAttributePage151", + "testability/pages/UIAttributeFontInterface02/fontAttributePage152", + "testability/pages/UIAttributeFontInterface02/fontAttributePage153", + "testability/pages/UIAttributeFontInterface02/fontAttributePage154", + "testability/pages/UIAttributeFontInterface02/fontAttributePage155", + "testability/pages/UIAttributeFontInterface02/fontAttributePage156", + "testability/pages/UIAttributeFontInterface02/fontAttributePage157", + "testability/pages/UIAttributeFontInterface02/fontAttributePage158", + "testability/pages/UIAttributeFontInterface02/fontAttributePage159", + "testability/pages/UIAttributeFontInterface02/fontAttributePage160", + "testability/pages/UIAttributeFontInterface02/fontAttributePage161", + "testability/pages/UIAttributeFontInterface02/fontAttributePage162", + "testability/pages/UIAttributeFontInterface02/fontAttributePage163", + "testability/pages/UIAttributeFontInterface02/fontAttributePage164", + "testability/pages/UIAttributeFontInterface02/fontAttributePage165", + "testability/pages/UIAttributeFontInterface02/fontAttributePage166", + "testability/pages/UIAttributeFontInterface02/fontAttributePage167", + "testability/pages/UIAttributeFontInterface02/fontAttributePage168", + "testability/pages/UIAttributeFontInterface02/fontAttributePage169", + "testability/pages/UIAttributeFontInterface02/fontAttributePage170", + "testability/pages/UIAttributeFontInterface02/fontAttributePage171", + "testability/pages/UIAttributeFontInterface02/fontAttributePage172", + "testability/pages/UIAttributeFontInterface02/fontAttributePage173", + "testability/pages/UIAttributeFontInterface02/fontAttributePage174", + "testability/pages/UIAttributeFontInterface02/fontAttributePage175", + "testability/pages/UIAttributeFontInterface02/fontAttributePage176", + "testability/pages/UIAttributeFontInterface02/fontAttributePage177", + "testability/pages/UIAttributeFontInterface02/fontAttributePage178", + "testability/pages/UIAttributeFontInterface02/fontAttributePage179", + "testability/pages/UIAttributeFontInterface02/fontAttributePage180", + "testability/pages/UIAttributeFontInterface02/fontAttributePage181", + "testability/pages/UIAttributeFontInterface02/fontAttributePage182", + "testability/pages/UIAttributeFontInterface02/fontAttributePage183", + "testability/pages/UIAttributeFontInterface02/fontAttributePage184", + "testability/pages/UIAttributeFontInterface02/fontAttributePage185", + "testability/pages/UIAttributeFontInterface02/fontAttributePage186", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle01", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle02", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle03", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle04", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle05", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle06", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle07", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle08", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle09", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle10", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle11", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle12", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle13", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle14", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle15", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle16", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle17", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle18", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle19", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle20", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle21", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle23", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle24", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle25", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle26", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle27", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle28", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle29", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle30", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle31", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle32", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle33", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle34", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle35", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle36", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle37", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle38", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle39", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle40", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle41", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle42", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle43", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle44", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle45", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle46", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle47", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle48", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle49", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle50", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle51", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle52", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle53", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle54", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle55", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle56", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle57", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle58", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle59", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle60", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle61", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle62", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle63", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle64", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle65", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle66", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle67", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle68", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle69", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle70", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle71", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle72", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle73", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle74", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle75", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle76", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle77", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle78", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle79", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle80", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle81", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle82", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle83", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle84", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle85", + "testability/pages/UIAttributeFontInterface03/fontAttributeAndStyle86" ] }