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 2646f9a826a0ec6458a4b0a8b4591f5aba16573d..98d07d06eaa576dc32a60275587c4c8e7a3c4a7d 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 @@ -31,6 +31,258 @@ import UiComponentTextCommonTextstyle from './UiComponentTextCommonTextstyleTest import UiComponentTextTextareaInterface from './UiComponentTextTextareaInterfaceTest/UiComponentTextTextareaInterface.test' import UIAttributePositionSizeLayoutTest from './UIAttributePositionSizeLayoutTest/UIAttributePositionSizeLayoutTest.test' import UIAttributePositionInterfaceTest from './UIAttributePositionInterfaceTest/UIAttributePositionInterfaceTest.test' +import UiComponentDividerStyle001 from './UiComponentDividerStyleTest/UiComponentDividerStyle001.test' +import UiComponentDividerStyle002 from './UiComponentDividerStyleTest/UiComponentDividerStyle002.test' +import UiComponentDividerStyle003 from './UiComponentDividerStyleTest/UiComponentDividerStyle003.test' +import UiComponentDividerStyle004 from './UiComponentDividerStyleTest/UiComponentDividerStyle004.test' +import UiComponentDividerStyle005 from './UiComponentDividerStyleTest/UiComponentDividerStyle005.test' +import UiComponentDividerStyle006 from './UiComponentDividerStyleTest/UiComponentDividerStyle006.test' +import UiComponentDividerStyle007 from './UiComponentDividerStyleTest/UiComponentDividerStyle007.test' +import UiComponentDividerStyle008 from './UiComponentDividerStyleTest/UiComponentDividerStyle008.test' +import UiComponentDividerStyle009 from './UiComponentDividerStyleTest/UiComponentDividerStyle009.test' +import UiComponentDividerStyle010 from './UiComponentDividerStyleTest/UiComponentDividerStyle010.test' +import UiComponentDividerStyle011 from './UiComponentDividerStyleTest/UiComponentDividerStyle011.test' +import UiComponentDividerStyle012 from './UiComponentDividerStyleTest/UiComponentDividerStyle012.test' +import UiComponentDividerStyle013 from './UiComponentDividerStyleTest/UiComponentDividerStyle013.test' +import UiComponentDividerStyle014 from './UiComponentDividerStyleTest/UiComponentDividerStyle014.test' +import UiComponentDividerStyle015 from './UiComponentDividerStyleTest/UiComponentDividerStyle015.test' +import UiComponentDividerStyle016 from './UiComponentDividerStyleTest/UiComponentDividerStyle016.test' +import UiComponentDividerStyle017 from './UiComponentDividerStyleTest/UiComponentDividerStyle017.test' +import UiComponentDividerStyle018 from './UiComponentDividerStyleTest/UiComponentDividerStyle018.test' +import UiComponentDividerStyle019 from './UiComponentDividerStyleTest/UiComponentDividerStyle019.test' +import UiComponentDividerStyle020 from './UiComponentDividerStyleTest/UiComponentDividerStyle020.test' +import UiComponentDividerStyle021 from './UiComponentDividerStyleTest/UiComponentDividerStyle021.test' +import UiComponentDividerStyle022 from './UiComponentDividerStyleTest/UiComponentDividerStyle022.test' +import UiComponentDividerStyle023 from './UiComponentDividerStyleTest/UiComponentDividerStyle023.test' +import UiComponentDividerStyle024 from './UiComponentDividerStyleTest/UiComponentDividerStyle024.test' +import UiComponentDividerStyle025 from './UiComponentDividerStyleTest/UiComponentDividerStyle025.test' +import UiComponentDividerStyle026 from './UiComponentDividerStyleTest/UiComponentDividerStyle026.test' +import UiComponentDividerStyle027 from './UiComponentDividerStyleTest/UiComponentDividerStyle027.test' +import UiComponentDividerStyle028 from './UiComponentDividerStyleTest/UiComponentDividerStyle028.test' +import UiComponentLayoutCommonPixel001 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel001.test' +import UiComponentLayoutCommonPixel002 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel002.test' +import UiComponentLayoutCommonPixel003 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel003.test' +import UiComponentLayoutCommonPixel004 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel004.test' +import UiComponentLayoutCommonPixel005 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel005.test' +import UiComponentLayoutCommonPixel006 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel006.test' +import UiComponentLayoutCommonPixel007 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel007.test' +import UiComponentLayoutCommonPixel008 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel008.test' +import UiComponentLayoutCommonPixel009 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel009.test' +import UiComponentLayoutCommonPixel010 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel010.test' +import UiComponentLayoutCommonPixel011 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel011.test' +import UiComponentLayoutCommonPixel012 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel012.test' +import UiComponentLayoutCommonPixel024 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel024.test' +import UiComponentLayoutCommonPixel025 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel025.test' +import UiComponentLayoutCommonPixel026 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel026.test' +import UiComponentLayoutCommonPixel027 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel027.test' +import UiComponentLayoutCommonPixel028 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel028.test' +import UiComponentLayoutCommonPixel029 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel029.test' +import UiComponentLayoutCommonPixel030 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel030.test' +import UiComponentLayoutCommonPixel031 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel031.test' +import UiComponentLayoutCommonPixel042 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel042.test' +import UiComponentLayoutCommonPixel043 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel043.test' +import UiComponentLayoutCommonPixel045 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel045.test' +import UiComponentLayoutCommonPixel046 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel046.test' +import UiComponentLayoutCommonPixel047 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel047.test' +import UiComponentLayoutCommonPixel048 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel048.test' +import UiComponentLayoutCommonPixel049 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel049.test' +import UiComponentLayoutCommonPixel050 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel050.test' +import UiComponentLayoutCommonPixel051 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel051.test' +import UiComponentLayoutCommonPixel063 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel063.test' +import UiComponentLayoutCommonPixel066 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel066.test' +import UiComponentLayoutCommonPixel068 from './UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel068.test' +import UiComponentRowcolumnSidebarcontainerInterface018 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface018.test' +import UiComponentRowcolumnSidebarcontainerInterface019 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface019.test' +import UiComponentRowcolumnSidebarcontainerInterface020 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface020.test' +import UiComponentRowcolumnSidebarcontainerInterface021 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface021.test' +import UiComponentRowcolumnSidebarcontainerInterface022 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface022.test' +import UiComponentRowcolumnSidebarcontainerInterface023 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface023.test' +import UiComponentRowcolumnSidebarcontainerInterface024 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface024.test' +import UiComponentRowcolumnSidebarcontainerInterface026 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface026.test' +import UiComponentRowcolumnSidebarcontainerInterface075 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface075.test' +import UiComponentRowcolumnSidebarcontainerInterface076 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface076.test' +import UiComponentRowcolumnSidebarcontainerInterface077 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface077.test' +import UiComponentRowcolumnSidebarcontainerInterface078 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface078.test' +import UiComponentRowcolumnSidebarcontainerInterface079 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface079.test' +import UiComponentRowcolumnSidebarcontainerInterface080 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface080.test' +import UiComponentRowcolumnSidebarcontainerInterface081 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface081.test' +import UiComponentRowcolumnSidebarcontainerInterface082 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface082.test' +import UiComponentRowcolumnSidebarcontainerInterface083 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface083.test' +import UiComponentRowcolumnSidebarcontainerInterface084 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface084.test' +import UiComponentRowcolumnSidebarcontainerInterface085 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface085.test' +import UiComponentRowcolumnSidebarcontainerInterface086 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface086.test' +import UiComponentRowcolumnSidebarcontainerInterface087 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface087.test' +import UiComponentRowcolumnSidebarcontainerInterface088 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface088.test' +import UiComponentRowcolumnSidebarcontainerInterface089 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface089.test' +import UiComponentRowcolumnSidebarcontainerInterface090 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface090.test' +import UiComponentRowcolumnSidebarcontainerInterface091 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface091.test' +import UiComponentRowcolumnSidebarcontainerInterface092 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface092.test' +import UiComponentRowcolumnSidebarcontainerInterface093 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface093.test' +import UiComponentRowcolumnSidebarcontainerInterface094 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface094.test' +import UiComponentRowcolumnSidebarcontainerInterface095 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface095.test' +import UiComponentRowcolumnSidebarcontainerInterface096 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface096.test' +import UiComponentRowcolumnSidebarcontainerInterface097 from './UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface097.test' +import UiComponentTextCommonTextstyle001 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle001.test' +import UiComponentTextCommonTextstyle002 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle002.test' +import UiComponentTextCommonTextstyle003 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle003.test' +import UiComponentTextCommonTextstyle004 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle004.test' +import UiComponentTextCommonTextstyle005 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle005.test' +import UiComponentTextCommonTextstyle006 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle006.test' +import UiComponentTextCommonTextstyle007 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle007.test' +import UiComponentTextCommonTextstyle008 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle008.test' +import UiComponentTextCommonTextstyle009 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle009.test' +import UiComponentTextCommonTextstyle010 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle010.test' +import UiComponentTextCommonTextstyle011 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle011.test' +import UiComponentTextCommonTextstyle012 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle012.test' +import UiComponentTextCommonTextstyle013 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle013.test' +import UiComponentTextCommonTextstyle014 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle014.test' +import UiComponentTextCommonTextstyle015 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle015.test' +import UiComponentTextCommonTextstyle016 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle016.test' +import UiComponentTextCommonTextstyle017 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle017.test' +import UiComponentTextCommonTextstyle018 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle018.test' +import UiComponentTextCommonTextstyle019 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle019.test' +import UiComponentTextCommonTextstyle020 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle020.test' +import UiComponentTextCommonTextstyle023 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle023.test' +import UiComponentTextCommonTextstyle024 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle024.test' +import UiComponentTextCommonTextstyle025 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle025.test' +import UiComponentTextCommonTextstyle026 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle026.test' +import UiComponentTextCommonTextstyle027 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle027.test' +import UiComponentTextCommonTextstyle028 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle028.test' +import UiComponentTextCommonTextstyle029 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle029.test' +import UiComponentTextCommonTextstyle030 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle030.test' +import UiComponentTextCommonTextstyle031 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle031.test' +import UiComponentTextCommonTextstyle037 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle037.test' +import UiComponentTextCommonTextstyle038 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle038.test' +import UiComponentTextCommonTextstyle039 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle039.test' +import UiComponentTextCommonTextstyle040 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle040.test' +import UiComponentTextCommonTextstyle041 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle041.test' +import UiComponentTextCommonTextstyle042 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle042.test' +import UiComponentTextCommonTextstyle043 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle043.test' +import UiComponentTextCommonTextstyle044 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle044.test' +import UiComponentTextCommonTextstyle045 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle045.test' +import UiComponentTextCommonTextstyle046 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle046.test' +import UiComponentTextCommonTextstyle047 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle047.test' +import UiComponentTextCommonTextstyle048 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle048.test' +import UiComponentTextCommonTextstyle049 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle049.test' +import UiComponentTextCommonTextstyle050 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle050.test' +import UiComponentTextCommonTextstyle051 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle051.test' +import UiComponentTextCommonTextstyle052 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle052.test' +import UiComponentTextCommonTextstyle053 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle053.test' +import UiComponentTextCommonTextstyle054 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle054.test' +import UiComponentTextCommonTextstyle055 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle055.test' +import UiComponentTextCommonTextstyle056 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle056.test' +import UiComponentTextCommonTextstyle057 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle057.test' +import UiComponentTextCommonTextstyle058 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle058.test' +import UiComponentTextCommonTextstyle059 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle059.test' +import UiComponentTextCommonTextstyle060 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle060.test' +import UiComponentTextCommonTextstyle061 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle061.test' +import UiComponentTextCommonTextstyle062 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle062.test' +import UiComponentTextCommonTextstyle063 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle063.test' +import UiComponentTextCommonTextstyle064 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle064.test' +import UiComponentTextCommonTextstyle065 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle065.test' +import UiComponentTextCommonTextstyle066 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle066.test' +import UiComponentTextCommonTextstyle067 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle067.test' +import UiComponentTextCommonTextstyle068 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle068.test' +import UiComponentTextCommonTextstyle069 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle069.test' +import UiComponentTextCommonTextstyle070 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle070.test' +import UiComponentTextCommonTextstyle071 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle071.test' +import UiComponentTextCommonTextstyle072 from './UiComponentTextCommonTextstyleTest/UiComponentTextCommonTextstyle072.test' +import UiComponentTextModifier001 from './UiComponentTextModifierTest/UiComponentTextModifier001.test' +import UiComponentTextModifier002 from './UiComponentTextModifierTest/UiComponentTextModifier002.test' +import UiComponentTextModifier003 from './UiComponentTextModifierTest/UiComponentTextModifier003.test' +import UiComponentTextModifier004 from './UiComponentTextModifierTest/UiComponentTextModifier004.test' +import UiComponentTextModifier005 from './UiComponentTextModifierTest/UiComponentTextModifier005.test' +import UiComponentTextModifier006 from './UiComponentTextModifierTest/UiComponentTextModifier006.test' +import UiComponentTextModifier007 from './UiComponentTextModifierTest/UiComponentTextModifier007.test' +import UiComponentTextModifier008 from './UiComponentTextModifierTest/UiComponentTextModifier008.test' +import UiComponentTextModifier009 from './UiComponentTextModifierTest/UiComponentTextModifier009.test' +import UiComponentTextModifier010 from './UiComponentTextModifierTest/UiComponentTextModifier010.test' +import UiComponentTextModifier011 from './UiComponentTextModifierTest/UiComponentTextModifier011.test' +import UiComponentTextModifier012 from './UiComponentTextModifierTest/UiComponentTextModifier012.test' +import UiComponentTextModifier013 from './UiComponentTextModifierTest/UiComponentTextModifier013.test' +import UiComponentTextModifier014 from './UiComponentTextModifierTest/UiComponentTextModifier014.test' +import UiComponentTextModifier015 from './UiComponentTextModifierTest/UiComponentTextModifier015.test' +import UiComponentTextModifier016 from './UiComponentTextModifierTest/UiComponentTextModifier016.test' +import UiComponentTextModifier017 from './UiComponentTextModifierTest/UiComponentTextModifier017.test' +import UiComponentTextModifier018 from './UiComponentTextModifierTest/UiComponentTextModifier018.test' +import UiComponentTextModifier019 from './UiComponentTextModifierTest/UiComponentTextModifier019.test' +import UiComponentTextModifier020 from './UiComponentTextModifierTest/UiComponentTextModifier020.test' +import UiComponentTextModifier021 from './UiComponentTextModifierTest/UiComponentTextModifier021.test' +import UiComponentTextModifier022 from './UiComponentTextModifierTest/UiComponentTextModifier022.test' +import UiComponentTextModifier023 from './UiComponentTextModifierTest/UiComponentTextModifier023.test' +import UiComponentTextModifier024 from './UiComponentTextModifierTest/UiComponentTextModifier024.test' +import UiComponentTextModifier025 from './UiComponentTextModifierTest/UiComponentTextModifier025.test' +import UiComponentTextModifier026 from './UiComponentTextModifierTest/UiComponentTextModifier026.test' +import UiComponentTextModifier027 from './UiComponentTextModifierTest/UiComponentTextModifier027.test' +import UiComponentTextModifier028 from './UiComponentTextModifierTest/UiComponentTextModifier028.test' +import UiComponentTextModifier029 from './UiComponentTextModifierTest/UiComponentTextModifier029.test' +import UiComponentTextModifier030 from './UiComponentTextModifierTest/UiComponentTextModifier030.test' +import UiComponentTextModifier031 from './UiComponentTextModifierTest/UiComponentTextModifier031.test' +import UiComponentTextModifier032 from './UiComponentTextModifierTest/UiComponentTextModifier032.test' +import UiComponentTextModifier033 from './UiComponentTextModifierTest/UiComponentTextModifier033.test' +import UiComponentTextModifier034 from './UiComponentTextModifierTest/UiComponentTextModifier034.test' +import UiComponentTextModifier035 from './UiComponentTextModifierTest/UiComponentTextModifier035.test' +import UiComponentTextModifier036 from './UiComponentTextModifierTest/UiComponentTextModifier036.test' +import UiComponentTextModifier037 from './UiComponentTextModifierTest/UiComponentTextModifier037.test' +import UiComponentTextModifier038 from './UiComponentTextModifierTest/UiComponentTextModifier038.test' +import UiComponentTextModifier039 from './UiComponentTextModifierTest/UiComponentTextModifier039.test' +import UiComponentTextModifier040 from './UiComponentTextModifierTest/UiComponentTextModifier040.test' +import UiComponentTextModifier041 from './UiComponentTextModifierTest/UiComponentTextModifier041.test' +import UiComponentTextModifier042 from './UiComponentTextModifierTest/UiComponentTextModifier042.test' +import UiComponentTextModifier043 from './UiComponentTextModifierTest/UiComponentTextModifier043.test' +import UiComponentTextModifier044 from './UiComponentTextModifierTest/UiComponentTextModifier044.test' +import UiComponentTextModifier045 from './UiComponentTextModifierTest/UiComponentTextModifier045.test' +import UiComponentTextModifier046 from './UiComponentTextModifierTest/UiComponentTextModifier046.test' +import UiComponentTextModifier047 from './UiComponentTextModifierTest/UiComponentTextModifier047.test' +import UiComponentTextModifier048 from './UiComponentTextModifierTest/UiComponentTextModifier048.test' +import UiComponentTextModifier049 from './UiComponentTextModifierTest/UiComponentTextModifier049.test' +import UiComponentTextModifier050 from './UiComponentTextModifierTest/UiComponentTextModifier050.test' +import UiComponentTextModifier051 from './UiComponentTextModifierTest/UiComponentTextModifier051.test' +import UiComponentTextModifier052 from './UiComponentTextModifierTest/UiComponentTextModifier052.test' +import UiComponentTextModifier053 from './UiComponentTextModifierTest/UiComponentTextModifier053.test' +import UiComponentTextModifier054 from './UiComponentTextModifierTest/UiComponentTextModifier054.test' +import UiComponentTextModifier055 from './UiComponentTextModifierTest/UiComponentTextModifier055.test' +import UiComponentTextModifier056 from './UiComponentTextModifierTest/UiComponentTextModifier056.test' +import UiComponentTextModifier057 from './UiComponentTextModifierTest/UiComponentTextModifier057.test' +import UiComponentTextModifier058 from './UiComponentTextModifierTest/UiComponentTextModifier058.test' +import UiComponentTextModifier059 from './UiComponentTextModifierTest/UiComponentTextModifier059.test' +import UiComponentTextModifier060 from './UiComponentTextModifierTest/UiComponentTextModifier060.test' +import UiComponentTextModifier061 from './UiComponentTextModifierTest/UiComponentTextModifier061.test' +import UiComponentTextModifier062 from './UiComponentTextModifierTest/UiComponentTextModifier062.test' +import UiComponentTextModifier063 from './UiComponentTextModifierTest/UiComponentTextModifier063.test' +import UiComponentTextModifier064 from './UiComponentTextModifierTest/UiComponentTextModifier064.test' +import UiComponentTextModifier065 from './UiComponentTextModifierTest/UiComponentTextModifier065.test' +import UiComponentTextModifier066 from './UiComponentTextModifierTest/UiComponentTextModifier066.test' +import UiComponentTextModifier067 from './UiComponentTextModifierTest/UiComponentTextModifier067.test' +import UiComponentTextModifier068 from './UiComponentTextModifierTest/UiComponentTextModifier068.test' +import UiComponentTextModifier069 from './UiComponentTextModifierTest/UiComponentTextModifier069.test' +import UiComponentTextModifier070 from './UiComponentTextModifierTest/UiComponentTextModifier070.test' +import UiComponentTextModifier071 from './UiComponentTextModifierTest/UiComponentTextModifier071.test' +import UiComponentTextModifier072 from './UiComponentTextModifierTest/UiComponentTextModifier072.test' +import UiComponentTextModifier073 from './UiComponentTextModifierTest/UiComponentTextModifier073.test' +import UiComponentTextModifier074 from './UiComponentTextModifierTest/UiComponentTextModifier074.test' +import UiComponentTextModifier075 from './UiComponentTextModifierTest/UiComponentTextModifier075.test' +import UiComponentTextModifier076 from './UiComponentTextModifierTest/UiComponentTextModifier076.test' +import UiComponentTextModifier077 from './UiComponentTextModifierTest/UiComponentTextModifier077.test' +import UiComponentTextModifier078 from './UiComponentTextModifierTest/UiComponentTextModifier078.test' +import UiComponentTextModifier079 from './UiComponentTextModifierTest/UiComponentTextModifier079.test' +import UiComponentTextModifier080 from './UiComponentTextModifierTest/UiComponentTextModifier080.test' +import UiComponentTextModifier081 from './UiComponentTextModifierTest/UiComponentTextModifier081.test' +import UiComponentTextModifier082 from './UiComponentTextModifierTest/UiComponentTextModifier082.test' +import UiComponentTextModifier083 from './UiComponentTextModifierTest/UiComponentTextModifier083.test' +import UiComponentTextModifier084 from './UiComponentTextModifierTest/UiComponentTextModifier084.test' +import UiComponentTextModifier085 from './UiComponentTextModifierTest/UiComponentTextModifier085.test' +import UiComponentTextModifier086 from './UiComponentTextModifierTest/UiComponentTextModifier086.test' +import UiComponentTextModifier087 from './UiComponentTextModifierTest/UiComponentTextModifier087.test' +import UiComponentTextModifier088 from './UiComponentTextModifierTest/UiComponentTextModifier088.test' +import UiComponentTextModifier089 from './UiComponentTextModifierTest/UiComponentTextModifier089.test' +import UiComponentTextModifier090 from './UiComponentTextModifierTest/UiComponentTextModifier090.test' +import UiComponentTextModifier091 from './UiComponentTextModifierTest/UiComponentTextModifier091.test' +import UiComponentTextModifier092 from './UiComponentTextModifierTest/UiComponentTextModifier092.test' +import UiComponentTextModifier093 from './UiComponentTextModifierTest/UiComponentTextModifier093.test' +import UiComponentTextModifier094 from './UiComponentTextModifierTest/UiComponentTextModifier094.test' +import UiComponentTextModifier095 from './UiComponentTextModifierTest/UiComponentTextModifier095.test' +import UiComponentTextModifier096 from './UiComponentTextModifierTest/UiComponentTextModifier096.test' export default function testsuite() { demoTest(); UIAttributeFontInterface001(); @@ -50,4 +302,257 @@ export default function testsuite() { UiComponentTextTextareaInterface(); UIAttributePositionSizeLayoutTest(); UIAttributePositionInterfaceTest(); + UIAttributeFontInterface001(); + UiComponentDividerStyle001(); + UiComponentDividerStyle002(); + UiComponentDividerStyle003(); + UiComponentDividerStyle004(); + UiComponentDividerStyle005(); + UiComponentDividerStyle006(); + UiComponentDividerStyle007(); + UiComponentDividerStyle008(); + UiComponentDividerStyle009(); + UiComponentDividerStyle010(); + UiComponentDividerStyle011(); + UiComponentDividerStyle012(); + UiComponentDividerStyle013(); + UiComponentDividerStyle014(); + UiComponentDividerStyle015(); + UiComponentDividerStyle016(); + UiComponentDividerStyle017(); + UiComponentDividerStyle018(); + UiComponentDividerStyle019(); + UiComponentDividerStyle020(); + UiComponentDividerStyle021(); + UiComponentDividerStyle022(); + UiComponentDividerStyle023(); + UiComponentDividerStyle024(); + UiComponentDividerStyle025(); + UiComponentDividerStyle026(); + UiComponentDividerStyle027(); + UiComponentDividerStyle028(); + UiComponentLayoutCommonPixel001(); + UiComponentLayoutCommonPixel002(); + UiComponentLayoutCommonPixel003(); + UiComponentLayoutCommonPixel004(); + UiComponentLayoutCommonPixel005(); + UiComponentLayoutCommonPixel006(); + UiComponentLayoutCommonPixel007(); + UiComponentLayoutCommonPixel008(); + UiComponentLayoutCommonPixel009(); + UiComponentLayoutCommonPixel010(); + UiComponentLayoutCommonPixel011(); + UiComponentLayoutCommonPixel012(); + UiComponentLayoutCommonPixel024(); + UiComponentLayoutCommonPixel025(); + UiComponentLayoutCommonPixel026(); + UiComponentLayoutCommonPixel027(); + UiComponentLayoutCommonPixel028(); + UiComponentLayoutCommonPixel029(); + UiComponentLayoutCommonPixel030(); + UiComponentLayoutCommonPixel031(); + UiComponentLayoutCommonPixel042(); + UiComponentLayoutCommonPixel043(); + UiComponentLayoutCommonPixel045(); + UiComponentLayoutCommonPixel046(); + UiComponentLayoutCommonPixel047(); + UiComponentLayoutCommonPixel048(); + UiComponentLayoutCommonPixel049(); + UiComponentLayoutCommonPixel050(); + UiComponentLayoutCommonPixel051(); + UiComponentLayoutCommonPixel063(); + UiComponentLayoutCommonPixel066(); + UiComponentLayoutCommonPixel068(); + UiComponentRowcolumnSidebarcontainerInterface018(); + UiComponentRowcolumnSidebarcontainerInterface019(); + UiComponentRowcolumnSidebarcontainerInterface020(); + UiComponentRowcolumnSidebarcontainerInterface021(); + UiComponentRowcolumnSidebarcontainerInterface022(); + UiComponentRowcolumnSidebarcontainerInterface023(); + UiComponentRowcolumnSidebarcontainerInterface024(); + UiComponentRowcolumnSidebarcontainerInterface026(); + UiComponentRowcolumnSidebarcontainerInterface075(); + UiComponentRowcolumnSidebarcontainerInterface076(); + UiComponentRowcolumnSidebarcontainerInterface077(); + UiComponentRowcolumnSidebarcontainerInterface078(); + UiComponentRowcolumnSidebarcontainerInterface079(); + UiComponentRowcolumnSidebarcontainerInterface080(); + UiComponentRowcolumnSidebarcontainerInterface081(); + UiComponentRowcolumnSidebarcontainerInterface082(); + UiComponentRowcolumnSidebarcontainerInterface083(); + UiComponentRowcolumnSidebarcontainerInterface084(); + UiComponentRowcolumnSidebarcontainerInterface085(); + UiComponentRowcolumnSidebarcontainerInterface086(); + UiComponentRowcolumnSidebarcontainerInterface087(); + UiComponentRowcolumnSidebarcontainerInterface088(); + UiComponentRowcolumnSidebarcontainerInterface089(); + UiComponentRowcolumnSidebarcontainerInterface090(); + UiComponentRowcolumnSidebarcontainerInterface091(); + UiComponentRowcolumnSidebarcontainerInterface092(); + UiComponentRowcolumnSidebarcontainerInterface093(); + UiComponentRowcolumnSidebarcontainerInterface094(); + UiComponentRowcolumnSidebarcontainerInterface095(); + UiComponentRowcolumnSidebarcontainerInterface096(); + UiComponentRowcolumnSidebarcontainerInterface097(); + UiComponentTextCommonTextstyle001(); + UiComponentTextCommonTextstyle002(); + UiComponentTextCommonTextstyle003(); + UiComponentTextCommonTextstyle004(); + UiComponentTextCommonTextstyle005(); + UiComponentTextCommonTextstyle006(); + UiComponentTextCommonTextstyle007(); + UiComponentTextCommonTextstyle008(); + UiComponentTextCommonTextstyle009(); + UiComponentTextCommonTextstyle010(); + UiComponentTextCommonTextstyle011(); + UiComponentTextCommonTextstyle012(); + UiComponentTextCommonTextstyle013(); + UiComponentTextCommonTextstyle014(); + UiComponentTextCommonTextstyle015(); + UiComponentTextCommonTextstyle016(); + UiComponentTextCommonTextstyle017(); + UiComponentTextCommonTextstyle018(); + UiComponentTextCommonTextstyle019(); + UiComponentTextCommonTextstyle020(); + UiComponentTextCommonTextstyle023(); + UiComponentTextCommonTextstyle024(); + UiComponentTextCommonTextstyle025(); + UiComponentTextCommonTextstyle026(); + UiComponentTextCommonTextstyle027(); + UiComponentTextCommonTextstyle028(); + UiComponentTextCommonTextstyle029(); + UiComponentTextCommonTextstyle030(); + UiComponentTextCommonTextstyle031(); + UiComponentTextCommonTextstyle037(); + UiComponentTextCommonTextstyle038(); + UiComponentTextCommonTextstyle039(); + UiComponentTextCommonTextstyle040(); + UiComponentTextCommonTextstyle041(); + UiComponentTextCommonTextstyle042(); + UiComponentTextCommonTextstyle043(); + UiComponentTextCommonTextstyle044(); + UiComponentTextCommonTextstyle045(); + UiComponentTextCommonTextstyle046(); + UiComponentTextCommonTextstyle047(); + UiComponentTextCommonTextstyle048(); + UiComponentTextCommonTextstyle049(); + UiComponentTextCommonTextstyle050(); + UiComponentTextCommonTextstyle051(); + UiComponentTextCommonTextstyle052(); + UiComponentTextCommonTextstyle053(); + UiComponentTextCommonTextstyle054(); + UiComponentTextCommonTextstyle055(); + UiComponentTextCommonTextstyle056(); + UiComponentTextCommonTextstyle057(); + UiComponentTextCommonTextstyle058(); + UiComponentTextCommonTextstyle059(); + UiComponentTextCommonTextstyle060(); + UiComponentTextCommonTextstyle061(); + UiComponentTextCommonTextstyle062(); + UiComponentTextCommonTextstyle063(); + UiComponentTextCommonTextstyle064(); + UiComponentTextCommonTextstyle065(); + UiComponentTextCommonTextstyle066(); + UiComponentTextCommonTextstyle067(); + UiComponentTextCommonTextstyle068(); + UiComponentTextCommonTextstyle069(); + UiComponentTextCommonTextstyle070(); + UiComponentTextCommonTextstyle071(); + UiComponentTextCommonTextstyle072(); + UiComponentTextModifier001(); + UiComponentTextModifier002(); + UiComponentTextModifier003(); + UiComponentTextModifier004(); + UiComponentTextModifier005(); + UiComponentTextModifier006(); + UiComponentTextModifier007(); + UiComponentTextModifier008(); + UiComponentTextModifier009(); + UiComponentTextModifier010(); + UiComponentTextModifier011(); + UiComponentTextModifier012(); + UiComponentTextModifier013(); + UiComponentTextModifier014(); + UiComponentTextModifier015(); + UiComponentTextModifier016(); + UiComponentTextModifier017(); + UiComponentTextModifier018(); + UiComponentTextModifier019(); + UiComponentTextModifier020(); + UiComponentTextModifier021(); + UiComponentTextModifier022(); + UiComponentTextModifier023(); + UiComponentTextModifier024(); + UiComponentTextModifier025(); + UiComponentTextModifier026(); + UiComponentTextModifier027(); + UiComponentTextModifier028(); + UiComponentTextModifier029(); + UiComponentTextModifier030(); + UiComponentTextModifier031(); + UiComponentTextModifier032(); + UiComponentTextModifier033(); + UiComponentTextModifier034(); + UiComponentTextModifier035(); + UiComponentTextModifier036(); + UiComponentTextModifier037(); + UiComponentTextModifier038(); + UiComponentTextModifier039(); + UiComponentTextModifier040(); + UiComponentTextModifier041(); + UiComponentTextModifier042(); + UiComponentTextModifier043(); + UiComponentTextModifier044(); + UiComponentTextModifier045(); + UiComponentTextModifier046(); + UiComponentTextModifier047(); + UiComponentTextModifier048(); + UiComponentTextModifier049(); + UiComponentTextModifier050(); + UiComponentTextModifier051(); + UiComponentTextModifier052(); + UiComponentTextModifier053(); + UiComponentTextModifier054(); + UiComponentTextModifier055(); + UiComponentTextModifier056(); + UiComponentTextModifier057(); + UiComponentTextModifier058(); + UiComponentTextModifier059(); + UiComponentTextModifier060(); + UiComponentTextModifier061(); + UiComponentTextModifier062(); + UiComponentTextModifier063(); + UiComponentTextModifier064(); + UiComponentTextModifier065(); + UiComponentTextModifier066(); + UiComponentTextModifier067(); + UiComponentTextModifier068(); + UiComponentTextModifier069(); + UiComponentTextModifier070(); + UiComponentTextModifier071(); + UiComponentTextModifier072(); + UiComponentTextModifier073(); + UiComponentTextModifier074(); + UiComponentTextModifier075(); + UiComponentTextModifier076(); + UiComponentTextModifier077(); + UiComponentTextModifier078(); + UiComponentTextModifier079(); + UiComponentTextModifier080(); + UiComponentTextModifier081(); + UiComponentTextModifier082(); + UiComponentTextModifier083(); + UiComponentTextModifier084(); + UiComponentTextModifier085(); + UiComponentTextModifier086(); + UiComponentTextModifier087(); + UiComponentTextModifier088(); + UiComponentTextModifier089(); + UiComponentTextModifier090(); + UiComponentTextModifier091(); + UiComponentTextModifier092(); + UiComponentTextModifier093(); + UiComponentTextModifier094(); + UiComponentTextModifier095(); + UiComponentTextModifier096(); } \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle001.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c607c7c05c0b9e7d47dd6815e14e9acd4c23e61e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle001.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0010 + * @tc.name test TextInput + * @tc.desc Set the maxLines value to 5 +*/ +export default function UiComponentTextCommonTextstyle001() { + + describe('UiComponentTextCommonTextstyle001', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0010 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle001") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0010 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle002.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle002.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b916795ac3c12dfdc747ab1d314ce893cf46c524 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle002.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0020 + * @tc.name test TextInput + * @tc.desc Set barState Auto +*/ +export default function UiComponentTextCommonTextstyle002() { + + describe('UiComponentTextCommonTextstyle002', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0020 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle002") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0020 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle003.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle003.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f994f27340f6a63482cf7d11ef1f7f2db2afd73 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle003.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0030 + * @tc.name test TextInput + * @tc.desc Set barState.On +*/ +export default function UiComponentTextCommonTextstyle003() { + + describe('UiComponentTextCommonTextstyle003', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0030 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle003") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0030 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle004.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle004.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bbdf707e8811a6783930ac4fccd43ed03d60da4a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle004.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0040 + * @tc.name test TextInput + * @tc.desc Set barState.Off +*/ +export default function UiComponentTextCommonTextstyle004() { + + describe('UiComponentTextCommonTextstyle004', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0040 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle004") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0040 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle005.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle005.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..86832f315485f3d4cb960f4e9e9677d0963236c6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle005.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0050 + * @tc.name test TextInput + * @tc.desc SelectionMenuHidden set to true +*/ +export default function UiComponentTextCommonTextstyle005() { + + describe('UiComponentTextCommonTextstyle005', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0050 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle005") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0050 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle006.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle006.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1a9bdbdec2883a84a8285137e4811622a6b1d923 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle006.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0060 + * @tc.name test TextInput + * @tc.desc SelectionMenuHidden set to false +*/ +export default function UiComponentTextCommonTextstyle006() { + + describe('UiComponentTextCommonTextstyle006', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0060 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle006") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0060 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle007.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle007.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..206ff56177f427f4a0d583bb6559fc12a9e07b0f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle007.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0070 + * @tc.name test TextInput + * @tc.desc The value of carePosition is set to 3 +*/ +export default function UiComponentTextCommonTextstyle007() { + + describe('UiComponentTextCommonTextstyle007', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0070 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle007") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0070 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle008.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle008.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..099a3db802caef1a72bd4b1b2a053273c5625ca1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle008.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0080 + * @tc.name test TextInput + * @tc.desc Select Background Color to set the color type +*/ +export default function UiComponentTextCommonTextstyle008() { + + describe('UiComponentTextCommonTextstyle008', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0080 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle008") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0080 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle009.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle009.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ccb3a0d1b41ec7aa877e2b4c5d37268bd5552a81 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle009.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0090 + * @tc.name test TextInput + * @tc.desc Select Background Color to set the number type +*/ +export default function UiComponentTextCommonTextstyle009() { + + describe('UiComponentTextCommonTextstyle009', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0090 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle009") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0090 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle010.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle010.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cef716d70b972e08b3b2c2c4c7a54a3cc125691 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle010.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0100 + * @tc.name test TextInput + * @tc.desc Select Background Color to set the string type +*/ +export default function UiComponentTextCommonTextstyle010() { + + describe('UiComponentTextCommonTextstyle010', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0100 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle010") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle011.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle011.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..374b8024defbc0746f6b20147f5ad2ada0495ea1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle011.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0110 + * @tc.name test TextInput + * @tc.desc CareStyle setting string type +*/ +export default function UiComponentTextCommonTextstyle011() { + + describe('UiComponentTextCommonTextstyle011', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0110 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle011") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0110 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle012.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle012.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc32a8235c05c3e17a3ffe97d71edf07924c6e9e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle012.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0120 + * @tc.name test TextInput + * @tc.desc CareStyle setting number type +*/ +export default function UiComponentTextCommonTextstyle012() { + + describe('UiComponentTextCommonTextstyle012', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0120 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle012") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0120 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle013.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle013.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b1b7d419bff45c404a098c26584c519bab76351b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle013.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0130 + * @tc.name test TextInput + * @tc.desc CareStyle setting resource type +*/ +export default function UiComponentTextCommonTextstyle013() { + + describe('UiComponentTextCommonTextstyle013', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0130 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle013") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0130 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle014.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle014.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1a573d054e50e14f776d8eb211bffc43c1de9133 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle014.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0140 + * @tc.name test TextInput + * @tc.desc ShowOutline set to true +*/ +export default function UiComponentTextCommonTextstyle014() { + + describe('UiComponentTextCommonTextstyle014', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0140 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle014") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0140 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle015.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle015.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5db0bf1a4ace1010f52d2fd4d9d7b4941c04ac8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle015.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0150 + * @tc.name test TextInput + * @tc.desc ShowOutline set to false +*/ +export default function UiComponentTextCommonTextstyle015() { + + describe('UiComponentTextCommonTextstyle015', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0150 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle015") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0150 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle016.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle016.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7451c9a17de4a96a4e139c0a859756d0a2a3a962 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle016.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0160 + * @tc.name test TextInput + * @tc.desc ShowOutline set to Error +*/ +export default function UiComponentTextCommonTextstyle016() { + + describe('UiComponentTextCommonTextstyle016', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0160 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle016") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0160 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle017.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle017.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba8d467996050153dad87e2bfc459608ebae7d5f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle017.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0170 + * @tc.name test TextInput + * @tc.desc PasswordIcon setting onIconSrc +*/ +export default function UiComponentTextCommonTextstyle017() { + + describe('UiComponentTextCommonTextstyle017', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0170 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle017") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0170 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle018.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle018.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..95bf266722c653ef0514655e60cded2d1a5c4ddc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle018.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0180 + * @tc.name test TextInput + * @tc.desc PasswordIcon setting offIconSrc +*/ +export default function UiComponentTextCommonTextstyle018() { + + describe('UiComponentTextCommonTextstyle018', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0180 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle018") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0180 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle019.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle019.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..005cdfcef42325220d5df5ae5234fca9e50965b2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle019.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0190 + * @tc.name test TextInput + * @tc.desc Style setting TextInputStyle Default +*/ +export default function UiComponentTextCommonTextstyle019() { + + describe('UiComponentTextCommonTextstyle019', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0190 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle019") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0190 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle020.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle020.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..82d111b99d1800ca60474150c9ce967f8edb3513 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle020.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0200 + * @tc.name test TextInput + * @tc.desc Style setting TextInputStyle Inline +*/ +export default function UiComponentTextCommonTextstyle020() { + + describe('UiComponentTextCommonTextstyle020', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0200 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle020") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0200 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle023.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle023.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0248c7a3490937ede2569452f6dd5d75b28ffba3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle023.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0230 + * @tc.name test TextInput + * @tc.desc InputType is set to Normal +*/ +export default function UiComponentTextCommonTextstyle023() { + + describe('UiComponentTextCommonTextstyle023', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0230 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle023") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0230 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle024.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle024.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd1d79e65f3ddd60581ebc99833c9d5c72b165c0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle024.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0240 + * @tc.name test TextInput + * @tc.desc InputType is set to Password +*/ +export default function UiComponentTextCommonTextstyle024() { + + describe('UiComponentTextCommonTextstyle024', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0240 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle024") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0240 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle025.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle025.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c89bf35648c074cd42ef5e2de26fda643f2f4cd7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle025.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0250 + * @tc.name test TextInput + * @tc.desc InputType is set to Email +*/ +export default function UiComponentTextCommonTextstyle025() { + + describe('UiComponentTextCommonTextstyle025', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0250 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle025") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0250 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle026.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle026.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b86594b8ce4df177ec8d741c22deea493f1931a1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle026.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0260 + * @tc.name test TextInput + * @tc.desc InputType is set to Number +*/ +export default function UiComponentTextCommonTextstyle026() { + + describe('UiComponentTextCommonTextstyle026', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0260 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle026") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0260 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle027.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle027.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2cf586057cbdf696f0cb265401f1ce76df41f2f9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle027.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0270 + * @tc.name test TextInput + * @tc.desc InputType is set to PhoneNumber +*/ +export default function UiComponentTextCommonTextstyle027() { + + describe('UiComponentTextCommonTextstyle027', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0270 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle027") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0270 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle028.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle028.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b09da2fcb0af494257be1f8fa49116df03116f3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle028.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0280 + * @tc.name test TextInput + * @tc.desc InputType is set to USER_NAM +*/ +export default function UiComponentTextCommonTextstyle028() { + + describe('UiComponentTextCommonTextstyle028', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0280 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle028") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0280 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle029.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle029.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3466fcc8faa8d265741f5cd5cae27d45c11a37ff --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle029.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0290 + * @tc.name test TextInput + * @tc.desc InputType is set to NEW_PASSWORD +*/ +export default function UiComponentTextCommonTextstyle029() { + + describe('UiComponentTextCommonTextstyle029', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0290 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle029") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0290 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle030.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle030.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e3a343b2df2ab5e9ae51ef6d31ce966232cdad18 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle030.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0300 + * @tc.name test TextInput + * @tc.desc InputType is set to NUMBER_PASSWORD +*/ +export default function UiComponentTextCommonTextstyle030() { + + describe('UiComponentTextCommonTextstyle030', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0300 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle030") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0300 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle031.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle031.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1ed011c3557d9ae21e50d824e04ab576835b329 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle031.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0310 + * @tc.name test TextInput + * @tc.desc InputType is set to SCREEN_LOCK_PASSWORD +*/ +export default function UiComponentTextCommonTextstyle031() { + + describe('UiComponentTextCommonTextstyle031', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0310 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle031") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0310 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle037.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle037.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..10a1a2dd395e9283cd5403c1e23ab26e74c6137c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle037.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0370 + * @tc.name test TextInput + * @tc.desc PlaceholderFont Set font style +*/ +export default function UiComponentTextCommonTextstyle037() { + + describe('UiComponentTextCommonTextstyle037', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0370 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle037") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0370 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle038.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle038.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5aa9b04eba356be72b9aebecf7828871f3f67428 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle038.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0380 + * @tc.name test TextInput + * @tc.desc PlaceholderFont Set color style +*/ +export default function UiComponentTextCommonTextstyle038() { + + describe('UiComponentTextCommonTextstyle038', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0380 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle038") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0380 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle039.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle039.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6dd2b228566ba39afee0c082b364a21b28f5339f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle039.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0390 + * @tc.name test TextInput + * @tc.desc PlaceholderFont Set number style +*/ +export default function UiComponentTextCommonTextstyle039() { + + describe('UiComponentTextCommonTextstyle039', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0390 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle039") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0390 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle040.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle040.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5589bd2e82271cc750ecaedae0cfc66855a6216 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle040.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0400 + * @tc.name test TextInput + * @tc.desc PlaceholderFont Set string style +*/ +export default function UiComponentTextCommonTextstyle040() { + + describe('UiComponentTextCommonTextstyle040', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0400 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle040") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0400 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle041.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle041.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..dbc120d3dc26e116113f909d919d1073238518b0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle041.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0410 + * @tc.name test TextInput + * @tc.desc PlaceholderFont Set Resource style +*/ +export default function UiComponentTextCommonTextstyle041() { + + describe('UiComponentTextCommonTextstyle041', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0410 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle041") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0410 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle042.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle042.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6d26409ca40c588f41ef784641186248955ff29 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle042.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0420 + * @tc.name test TextInput + * @tc.desc caretColor Set color style +*/ +export default function UiComponentTextCommonTextstyle042() { + + describe('UiComponentTextCommonTextstyle042', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0420 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle042") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0420 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle043.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle043.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ffd08954b9c08c14d1bcd8fffcd7364efa1bcf37 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle043.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0430 + * @tc.name test TextInput + * @tc.desc caretColor Set number style +*/ +export default function UiComponentTextCommonTextstyle043() { + + describe('UiComponentTextCommonTextstyle043', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0430 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle043") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0430 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle044.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle044.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1b486e292be6f2d23c0bc48a17c4bf99ae2e381 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle044.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0440 + * @tc.name test TextInput + * @tc.desc caretColor Set string style +*/ +export default function UiComponentTextCommonTextstyle044() { + + describe('UiComponentTextCommonTextstyle044', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0440 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle044") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0440 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle045.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle045.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9527dff3dead45bef7755c434c014a1f976f6994 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle045.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0450 + * @tc.name test TextInput + * @tc.desc caretColor Set Resource style +*/ +export default function UiComponentTextCommonTextstyle045() { + + describe('UiComponentTextCommonTextstyle045', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0450 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle045") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0450 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle046.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle046.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..368e32abb9d1013c94d2057ff3a5d72d65b779cf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle046.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0460 + * @tc.name test TextInput + * @tc.desc maxLength Set 10 +*/ +export default function UiComponentTextCommonTextstyle046() { + + describe('UiComponentTextCommonTextstyle046', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0460 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle046") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0460 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle047.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle047.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0926e64b62be981cf67134fff45f84a369dc032c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle047.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0470 + * @tc.name test TextInput + * @tc.desc fontColor Set color style +*/ +export default function UiComponentTextCommonTextstyle047() { + + describe('UiComponentTextCommonTextstyle047', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0470 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle047") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0470 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle048.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle048.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e6142beb130e835cbafa18b2aad9b81e738f4b9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle048.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0480 + * @tc.name test TextInput + * @tc.desc fontColor Set number style +*/ +export default function UiComponentTextCommonTextstyle048() { + + describe('UiComponentTextCommonTextstyle048', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0480 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle048") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0480 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle049.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle049.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7766ee8c92ff73bac34b57e14c8a7045bec6aed --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle049.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0490 + * @tc.name test TextInput + * @tc.desc fontColor Set string style +*/ +export default function UiComponentTextCommonTextstyle049() { + + describe('UiComponentTextCommonTextstyle049', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0490 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle049") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0490 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle050.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle050.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..517ed595d750e5459607726c0bef4ab85dd2c0ae --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle050.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0500 + * @tc.name test TextInput + * @tc.desc fontColor Set Resource style +*/ +export default function UiComponentTextCommonTextstyle050() { + + describe('UiComponentTextCommonTextstyle050', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0500 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle050") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0500 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle051.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle051.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfad34787b534f236f0b46cbc0888a627a2ed0cb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle051.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0510 + * @tc.name test TextInput + * @tc.desc fontSize Set number style +*/ +export default function UiComponentTextCommonTextstyle051() { + + describe('UiComponentTextCommonTextstyle051', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0510 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle051") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0510 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle052.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle052.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c43be1511fdbb1cc9961caad8c19f70ea709d885 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle052.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0520 + * @tc.name test TextInput + * @tc.desc fontSize Set string style +*/ +export default function UiComponentTextCommonTextstyle052() { + + describe('UiComponentTextCommonTextstyle052', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0520 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle052") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0520 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle053.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle053.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..80b0d1afab7d590a5a721f7ff611e80d6dbd31e7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle053.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0530 + * @tc.name test TextInput + * @tc.desc fontSize Set Resource style +*/ +export default function UiComponentTextCommonTextstyle053() { + + describe('UiComponentTextCommonTextstyle053', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0530 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle053") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0530 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle054.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle054.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..37ab4a14c05c0b6c1009e7b110cf8f234cea342e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle054.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0540 + * @tc.name test TextInput + * @tc.desc fontStyle Set normal style +*/ +export default function UiComponentTextCommonTextstyle054() { + + describe('UiComponentTextCommonTextstyle054', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0540 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle054") + await Utils.sleep(10000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0540 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle055.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle055.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d69180cdc065a9f61cd2d00eabf5fb3ad1a4dfb4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle055.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0550 + * @tc.name test TextInput + * @tc.desc fontStyle Set Italic style +*/ +export default function UiComponentTextCommonTextstyle055() { + + describe('UiComponentTextCommonTextstyle055', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0550 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle055") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0550 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle056.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle056.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..85d2db5444c0bb3f57fbf7052a9a74e670936e03 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle056.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0560 + * @tc.name test TextInput + * @tc.desc fontWeight Set Normal style +*/ +export default function UiComponentTextCommonTextstyle056() { + + describe('UiComponentTextCommonTextstyle056', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0560 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle056") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0560 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle057.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle057.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8bdcd13ee8b5f95ec0589d77b090732d60fae80e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle057.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0570 + * @tc.name test TextInput + * @tc.desc fontWeight Set Lighter style +*/ +export default function UiComponentTextCommonTextstyle057() { + + describe('UiComponentTextCommonTextstyle057', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0570 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle057") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0570 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle058.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle058.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..25a52937c58a04da376d7c0d4b48de3bce7bcad4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle058.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0580 + * @tc.name test TextInput + * @tc.desc fontWeight Set Regular style +*/ +export default function UiComponentTextCommonTextstyle058() { + + describe('UiComponentTextCommonTextstyle058', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0580 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle058") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0580 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle059.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle059.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..79618a898ebd24ffe7ccfdbcbdc5b8843b1bf73a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle059.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0590 + * @tc.name test TextInput + * @tc.desc fontWeight Set Medium style +*/ +export default function UiComponentTextCommonTextstyle059() { + + describe('UiComponentTextCommonTextstyle059', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0590 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle059") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0590 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle060.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle060.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..19a6dcc52b1df43ced7adf5e6ab20fa9dff8e66a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle060.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0600 + * @tc.name test TextInput + * @tc.desc fontWeight Set Bold style +*/ +export default function UiComponentTextCommonTextstyle060() { + + describe('UiComponentTextCommonTextstyle060', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0600 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle060") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0600 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle061.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle061.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..47bbce75afa84af9bc859a4f5c1b2100b4de12b7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle061.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0610 + * @tc.name test TextInput + * @tc.desc fontWeight Set Bolder style +*/ +export default function UiComponentTextCommonTextstyle061() { + + describe('UiComponentTextCommonTextstyle061', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0610 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle061") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0610 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle062.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle062.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c384be39eaf60e7e80b4396f5346c4c7e04e024d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle062.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0620 + * @tc.name test TextInput + * @tc.desc FontFamily setting HarmonyOS Sans +*/ +export default function UiComponentTextCommonTextstyle062() { + + describe('UiComponentTextCommonTextstyle062', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0620 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle062") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0620 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle063.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle063.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4769f1111c2d246337b382559c127acf1b7f034 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle063.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0630 + * @tc.name test TextInput + * @tc.desc InputFilter sets the value to [A-Z] +*/ +export default function UiComponentTextCommonTextstyle063() { + + describe('UiComponentTextCommonTextstyle063', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0630 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle063") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0630 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle064.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle064.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..186526eaffc7f1de10db6f8110a6f9a5d3bbc8b1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle064.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0640 + * @tc.name test TextInput + * @tc.desc CopyOption set to None +*/ +export default function UiComponentTextCommonTextstyle064() { + + describe('UiComponentTextCommonTextstyle064', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0640 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle064") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0640 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle065.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle065.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6510801f5606166273b0762e954dd382c66fcdd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle065.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0650 + * @tc.name test TextInput + * @tc.desc CopyOption set to InApp +*/ +export default function UiComponentTextCommonTextstyle065() { + + describe('UiComponentTextCommonTextstyle065', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0650 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle065") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0650 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle066.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle066.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc2de87da44cf27183a0706875f20d2e2a570b32 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle066.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0660 + * @tc.name test TextInput + * @tc.desc CopyOption set to LocalDevice +*/ +export default function UiComponentTextCommonTextstyle066() { + + describe('UiComponentTextCommonTextstyle066', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0660 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle066") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0660 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle067.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle067.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5175ac1adb01ce219be97220b097e65ef1c93571 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle067.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0670 + * @tc.name test TextInput + * @tc.desc CopyOption set to CROSS_DEVICE +*/ +export default function UiComponentTextCommonTextstyle067() { + + describe('UiComponentTextCommonTextstyle067', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0670 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle067") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0670 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle068.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle068.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9bbd1e190ee8b6d8227eb773c0f2f1d60e04bce6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle068.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0680 + * @tc.name test TextInput + * @tc.desc ShowPasswordIcon Set True +*/ +export default function UiComponentTextCommonTextstyle068() { + + describe('UiComponentTextCommonTextstyle068', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0680 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle068") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0680 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle069.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle069.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5d42bd7b7d24d1763bb885025ac89b25d7f6b2e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle069.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0690 + * @tc.name test TextInput + * @tc.desc ShowPasswordIcon Set False +*/ +export default function UiComponentTextCommonTextstyle069() { + + describe('UiComponentTextCommonTextstyle069', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0690 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle069") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0690 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle070.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle070.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8eb2d4b13dc1eb86d270596bbf9ffbbde95f366d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle070.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0700 + * @tc.name test TextInput + * @tc.desc TextAlign setting Start +*/ +export default function UiComponentTextCommonTextstyle070() { + + describe('UiComponentTextCommonTextstyle070', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0700 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle070") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0700 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle071.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle071.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5f6ce09354fca6c623682798db44250779d020cb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle071.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0710 + * @tc.name test TextInput + * @tc.desc TextAlign setting Center +*/ +export default function UiComponentTextCommonTextstyle071() { + + describe('UiComponentTextCommonTextstyle071', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0710 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle071") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0710 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle072.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle072.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..18af43ef5b98cc032abeddabef6a3b9d69ba4007 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UIComponentTextCommonTextStyleTest/UiComponentTextCommonTextstyle072.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0720 + * @tc.name test TextInput + * @tc.desc TextAlign setting End +*/ +export default function UiComponentTextCommonTextstyle072() { + + describe('UiComponentTextCommonTextstyle072', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0720 start.`); + Settings.createWindow("testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle072") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0720 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle001.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..79fbdcbaceb01cb62db2dc7cf253da4991c3b161 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle001.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0010 + * @tc.name test Divider + * @tc.desc Add Diver component. Set vertical. Set vertical to true. Set vertical to false +*/ +export default function UiComponentDividerStyle001() { + + describe('UiComponentDividerStyle001', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0010 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle001") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0010 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle002.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle002.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1bfc573c8c808ee21eb73786870429fe2a9f04a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle002.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0020 + * @tc.name test Divider + * @tc.desc Add Diver component. Set color. Do not set color. Color is default value, null, undefined, color.blue, #0000ff, rgb(0, 0, 255, 0x0000ff, referenced through resource resources, illegal string, background color +*/ +export default function UiComponentDividerStyle002() { + + describe('UiComponentDividerStyle002', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0020 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle002") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0020 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle003.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle003.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..fbae2e460a7229a02ea5d2903941cf2061e867f0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle003.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0030 + * @tc.name test Divider + * @tc.desc Add Diver component. Set strokeWidth. Do not set strokeWidth. StrokeWidth is default value, null, undefined, 5, 0, -5, '5vp', '5px', '5fp', '5lpx', '5abc'. Set strokeWidth(5). height(20). Set strokeWidth(20). height(5) +*/ +export default function UiComponentDividerStyle003() { + + describe('UiComponentDividerStyle003', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0030 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle003") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0030 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle004.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle004.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3adfcc2e388310c123ddeb2f06eed7db3359b5e3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle004.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0040 + * @tc.name test Divider + * @tc.desc Add Diver component. Set lineCap, Butt, Round, Square, Default value +*/ +export default function UiComponentDividerStyle004() { + + describe('UiComponentDividerStyle004', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0040 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle004") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0040 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle005.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle005.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c0e007cb4dcf7db3ba3b4b4cefac0f452097e8e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle005.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0050 + * @tc.name test Divider + * @tc.desc Add Diver component with vertical set to true +*/ +export default function UiComponentDividerStyle005() { + + describe('UiComponentDividerStyle005', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0050 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle005") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0050 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle006.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle006.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..076aae5b968b41c049149a55fc560a8f1924be9e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle006.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0060 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color as null +*/ +export default function UiComponentDividerStyle006() { + + describe('UiComponentDividerStyle006', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0060 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle006") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0060 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle007.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle007.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..facef5b8f52821c332fb8521ff8ed278e49319a5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle007.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0070 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color as undefined +*/ +export default function UiComponentDividerStyle007() { + + describe('UiComponentDividerStyle007', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0070 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle007") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0070 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle008.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle008.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2ba59439db15d01ce5276bbf0b3f0d66758e6df --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle008.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0080 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color into Color Blue +*/ +export default function UiComponentDividerStyle008() { + + describe('UiComponentDividerStyle008', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0080 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle008") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0080 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle009.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle009.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e4a934a97ee5ec59b0487c688e364b523d76348 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle009.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0090 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color as #0000FF +*/ +export default function UiComponentDividerStyle009() { + + describe('UiComponentDividerStyle009', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0090 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle009") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0090 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle010.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle010.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e54b58cb019107485b90dedca5a8d44f59ea560d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle010.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0100 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color to rgb(0,0,255) +*/ +export default function UiComponentDividerStyle010() { + + describe('UiComponentDividerStyle010', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0100 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle010") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle011.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle011.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b2f86b7277e4f305868ae7d689e2e40543194717 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle011.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0110 + * @tc.name test Divider + * @tc.desc Add Diver component, pass color as 0x0000FF +*/ +export default function UiComponentDividerStyle011() { + + describe('UiComponentDividerStyle011', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0110 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle011") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0110 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle012.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle012.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f03a67cb5f04eb26775b8141d47b891d7daa82fe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle012.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0120 + * @tc.name test Divider + * @tc.desc Color is referenced through resource resources +*/ +export default function UiComponentDividerStyle012() { + + describe('UiComponentDividerStyle012', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0120 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle012") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0120 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle013.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle013.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f60f3276b8ea56f3a5688d6f8285bf7b5a635b92 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle013.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0130 + * @tc.name test Divider + * @tc.desc Add Diver component, color passed in illegal string +*/ +export default function UiComponentDividerStyle013() { + + describe('UiComponentDividerStyle013', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0130 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle013") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0130 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle014.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle014.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8bde2530439a123c83874817c6532a965a0c795 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle014.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0140 + * @tc.name test Divider + * @tc.desc Diverter sets color and background color +*/ +export default function UiComponentDividerStyle014() { + + describe('UiComponentDividerStyle014', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0150 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle014") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0140 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle015.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle015.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa3993477b0bd9b2ec7fee5269ec970436fc9061 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle015.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0150 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to null +*/ +export default function UiComponentDividerStyle015() { + + describe('UiComponentDividerStyle015', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0150 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle015") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle015'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0150 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle016.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle016.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..de5c24002a8f217b6caf9b0c9d18db5676c371be --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle016.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0160 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to undefined +*/ +export default function UiComponentDividerStyle016() { + + describe('UiComponentDividerStyle016', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0160 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle016") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle016'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0160 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle017.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle017.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fcf54e233a5ebfe75d7e0e9f14cf4ff8ce45146 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle017.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0170 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to 5 +*/ +export default function UiComponentDividerStyle017() { + + describe('UiComponentDividerStyle017', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0170 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle017") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle017'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + // expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0170 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle018.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle018.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d23f5eeaa4bcab54d026bae076eab3ec1c8bc04b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle018.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0180 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to 0 +*/ +export default function UiComponentDividerStyle018() { + + describe('UiComponentDividerStyle018', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0180 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle018") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle018'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + // expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0180 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle019.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle019.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..05b9833d31fd2234d9a8e5e51b3348fe0a7db4f8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle019.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0190 + * @tc.name test Divider + * @tc.desc Diver sets the strokeWidth to -5 +*/ +export default function UiComponentDividerStyle019() { + + describe('UiComponentDividerStyle019', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0190 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle019") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle019'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + // expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0190 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle020.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle020.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..756321dfd0967772704c008c985b1f012f61620d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle020.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0200 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to "5vp" +*/ +export default function UiComponentDividerStyle020() { + + describe('UiComponentDividerStyle020', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0200 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle020") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle020'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('5.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0200 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle021.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle021.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..129a28e91c7fdc6aa3ad00456f75d98f2d0c23ca --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle021.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0210 + * @tc.name test Divider + * @tc.desc Diver sets the strokeWidth to "5px" +*/ +export default function UiComponentDividerStyle021() { + + describe('UiComponentDividerStyle021', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0210 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle021") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle021'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('5.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0210 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle022.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle022.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f7ef6a1d415188e5c252b52d16b8fd2189bcab7a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle022.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0220 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to "5fp" +*/ +export default function UiComponentDividerStyle022() { + + describe('UiComponentDividerStyle022', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0220 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle022") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle022'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('5.00fp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0220 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle023.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle023.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a529e13a8c7746d69c24b5a18372be51cfde723e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle023.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0230 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to "5lpx" +*/ +export default function UiComponentDividerStyle023() { + + describe('UiComponentDividerStyle023', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0230 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle023") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle023'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('5.00lpx'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0230 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle024.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle024.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..20331a54696f433b0678ce683c242a771a683132 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle024.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0240 + * @tc.name test Divider + * @tc.desc Diver sets strokeWidth to "5abc" +*/ +export default function UiComponentDividerStyle024() { + + describe('UiComponentDividerStyle024', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0240 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle024") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle024'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual('1.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0240 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle025.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle025.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..aeb1c01f7144ef39972f98f0982e04045d35f4a0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle025.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0250 + * @tc.name test Divider + * @tc.desc Diver setting strokeWidth (5). height (20) +*/ +export default function UiComponentDividerStyle025() { + + describe('UiComponentDividerStyle025', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0250 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle025") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle025'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + // expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual(5); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0250 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle026.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle026.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..54ee9316c8cc23abdda1cfc640d553901f85c085 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle026.test.ets @@ -0,0 +1,45 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0260 + * @tc.name test Divider + * @tc.desc The width of the Divider dividing line exceeds the general attribute setting, strokeWidth(20).height(6) +*/ +export default function UiComponentDividerStyle026() { + + describe('UiComponentDividerStyle026', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0260 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle026") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle026'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.strokeWidth is: " + JSON.parse(strJson).$attrs.strokeWidth); + // expect(JSON.parse(strJson).$attrs.strokeWidth).assertEqual(5); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0260 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle027.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle027.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8f2e27203e19c9bf096fd7b6bc6db314f01a80a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle027.test.ets @@ -0,0 +1,42 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0270 + * @tc.name test Divider + * @tc.desc Diver sets lineCap to LineCapStyle Round +*/ +export default function UiComponentDividerStyle027() { + + describe('UiComponentDividerStyle027', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0270 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle027") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle027'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0270 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle028.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle028.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3d081f9ed079d4cf64a28871922c10cd3d6fdf35 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentDividerStyleTest/UiComponentDividerStyle028.test.ets @@ -0,0 +1,42 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0280 + * @tc.name test Divider + * @tc.desc Diver sets lineCap to LineCapStyle Square +*/ +export default function UiComponentDividerStyle028() { + + describe('UiComponentDividerStyle028', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0280 start.`); + Settings.createWindow("testability/pages/UiComponentDividerStyle/UiComponentDividerStyle028") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentDividerStyle028'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_DIVIDER_STYLE_0280 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel001.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0ddb148fe92e9d5e0f7bb9ac0cc98f121fa51cac --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel001.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0010 + * @tc.name test Grid + * @tc.desc Set the columnsTemplate of the grid component to 1 line, set the GridItem to different floating-point numbers for width and height, and check if there are any pixel gaps in the layout +*/ +export default function UiComponentLayoutCommonPixel001() { + + describe('UiComponentLayoutCommonPixel001', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0010 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel001") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0010 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel002.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel002.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..56b438679b2a1995dba8b32d3791cc9487a17afa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel002.test.ets @@ -0,0 +1,42 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0020 + * @tc.name test Grid + * @tc.desc Set the columnsTemplate of the grid component to multiple rows, + set the GridItem to different floating-point numbers for width and height, and check if there are pixel gaps in the layout +*/ +export default function UiComponentLayoutCommonPixel002() { + + describe('UiComponentLayoutCommonPixel002', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0020 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel002") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0020 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel003.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel003.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..20c0830322c6037c7d3fbb62f2f9e7cc0f2494b8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel003.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0030 + * @tc.name test Grid + * @tc.desc The grid component is laid out in reverse along the vertical direction, with columnsTemplate set to multiple columns and GridItem set to width and height as floating point numbers. Check if there are any pixel gaps in the layout +*/ +export default function UiComponentLayoutCommonPixel003() { + + describe('UiComponentLayoutCommonPixel003', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0030 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel003") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0030 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel004.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel004.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5fcb320ddc46527c9cde7dcc3a943940152d5012 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel004.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0040 + * @tc.name test Grid + * @tc.desc Grid components are laid out vertically, with columnsTemplate set to multiple columns and GridItem set to width and height as floating point numbers. Check if there are any pixel gaps in the layout +*/ +export default function UiComponentLayoutCommonPixel004() { + + describe('UiComponentLayoutCommonPixel004', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0040 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel004") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0040 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel005.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel005.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1be0aa69c095b93cec77fed9c094cba758d0880 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel005.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0050 + * @tc.name test Grid + * @tc.desc Grid components are laid out in reverse along the horizontal direction, with rowsTemplate set to multiple rows and GridItem set to a floating point number in width and height +*/ +export default function UiComponentLayoutCommonPixel005() { + + describe('UiComponentLayoutCommonPixel005', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0050 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel005") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0050 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel006.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel006.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff5347f90f4b54b1ffb34e56861671030970c338 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel006.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0060 + * @tc.name test Grid + * @tc.desc Layout horizontally, set the rowsTemplate to multiple rows, and set the GridItem to a floating point number in width and height +*/ +export default function UiComponentLayoutCommonPixel006() { + + describe('UiComponentLayoutCommonPixel006', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0060 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel006") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0060 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel007.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel007.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..71363afb9f50638d0351f6dee57d2cd2a6b1fd5f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel007.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0070 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, delete the GridItem sub component with index=0 +*/ +export default function UiComponentLayoutCommonPixel007() { + + describe('UiComponentLayoutCommonPixel007', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0070 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel007") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0070 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel008.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel008.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1e0c8b85d79ac438a4fafcc904e4c16932da17c4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel008.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0080 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, delete the GridItem sub component with index=2 +*/ +export default function UiComponentLayoutCommonPixel008() { + + describe('UiComponentLayoutCommonPixel008', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0080 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel008") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0080 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel009.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel009.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0393621866a368c8ff7be5c805772777bf11f0fd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel009.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0090 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, delete the GridItem sub component with index=6 +*/ +export default function UiComponentLayoutCommonPixel009() { + + describe('UiComponentLayoutCommonPixel009', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0090 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel009") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0090 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel010.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel010.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa996be41642e01c3209cbc792a83e66966301e7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel010.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0100 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, add a GridItem sub component with floating point values in width and height at index=0 position +*/ +export default function UiComponentLayoutCommonPixel010() { + + describe('UiComponentLayoutCommonPixel010', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0100 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel010") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel011.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel011.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..adc67f2b011da645071260235e09da85ab532506 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel011.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0110 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, add a GridItem sub component with floating point values in width and height at index=2 position +*/ +export default function UiComponentLayoutCommonPixel011() { + + describe('UiComponentLayoutCommonPixel011', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0110 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel011") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0110 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel012.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel012.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9edf52485d19a307e63ab33bae1c0fb1ec65bcb8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel012.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0120 + * @tc.name test Grid + * @tc.desc After adding 7 GridItem sub components with floating point values in width and height, add a GridItem sub component with floating point values in width and height at index=6 position +*/ +export default function UiComponentLayoutCommonPixel012() { + + describe('UiComponentLayoutCommonPixel012', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0120 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel012") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0120 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel024.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel024.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9473e13f6e01b76cc52c73f2c11655692488cea7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel024.test.ets @@ -0,0 +1,47 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0240 + * @tc.name test Grid + * @tc.desc Set the width and height of the grid component to floating-point numbers, and check if the layout width and height are rounded to the nearest whole +*/ +export default function UiComponentLayoutCommonPixel024() { + + describe('UiComponentLayoutCommonPixel024', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0240 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel024") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentLayoutCommonPixel024'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.width is: " + JSON.parse(strJson).$attrs.size.width); + Logger.info('TEST', "JSON.parse(strJson).$attrs.height is: " + JSON.parse(strJson).$attrs.size.height); + expect(JSON.parse(strJson).$attrs.size.width).assertEqual('100.50vp'); + expect(JSON.parse(strJson).$attrs.size.height).assertEqual('100.40vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0240 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel025.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel025.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c19bc499b017d551fba2c0fd9031023ae9c8a88 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel025.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0250 + * @tc.name test Grid + * @tc.desc Grid component, no columnsTemplate set, GridItem set width and height to floating point numbers +*/ +export default function UiComponentLayoutCommonPixel025() { + + describe('UiComponentLayoutCommonPixel025', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0250 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel025") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0250 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel026.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel026.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9aab5e81eaf7799ed6ebdf48728e1900a7e3d3f3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel026.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0260 + * @tc.name test list + * @tc.desc After adding 7 listItem subcomponents with floating point values in width and height, delete the listItem subcomponent with index=0 +*/ +export default function UiComponentLayoutCommonPixel026() { + + describe('UiComponentLayoutCommonPixel026', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0260 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel026") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0260 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel027.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel027.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9b1c89f957b5d325f8202488b3410d75861da4c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel027.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0270 + * @tc.name test list + * @tc.desc After adding 7 listItem subcomponents with floating point values in width and height, delete the listItem subcomponent with index=2 +*/ +export default function UiComponentLayoutCommonPixel027() { + + describe('UiComponentLayoutCommonPixel027', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0270 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel027") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0270 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel028.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel028.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8033090c1287876affb3a3ae98ee9fc20e691058 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel028.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0280 + * @tc.name test list + * @tc.desc After adding 7 listItem subcomponents with floating point values in width and height, delete the listItem subcomponent with index=6 +*/ +export default function UiComponentLayoutCommonPixel028() { + + describe('UiComponentLayoutCommonPixel028', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0280 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel028") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0280 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel029.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel029.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..32908d4ba00ed0609e81bae4f39b3de1012891a0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel029.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0290 + * @tc.name test list + * @tc.desc After adding 7 listItem sub components with floating-point values in width and height, add a listItem sub component with floating-point values in width and height at index=0 position +*/ +export default function UiComponentLayoutCommonPixel029() { + + describe('UiComponentLayoutCommonPixel029', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0290 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel029") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0290 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel030.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel030.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9e280da923c3cd184f0ee512684378216fa76ac3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel030.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0300 + * @tc.name test list + * @tc.desc After adding 7 listItem sub components with floating-point values in width and height, add a listItem sub component with floating-point values in width and height at index=2 position +*/ +export default function UiComponentLayoutCommonPixel030() { + + describe('UiComponentLayoutCommonPixel030', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0300 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel030") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0300 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel031.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel031.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9dfafde33ece7dae7305e906659d2470592b0107 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel031.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0310 + * @tc.name test list + * @tc.desc After adding 7 listItem sub components with floating-point values in width and height, add a listItem sub component with floating-point values in width and height at index=6 position +*/ +export default function UiComponentLayoutCommonPixel031() { + + describe('UiComponentLayoutCommonPixel031', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0310 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel031") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0310 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel042.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel042.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e58b436c161f40036c5a26855a21b016947e8a45 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel042.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0420 + * @tc.name test list + * @tc.desc Set to 1 column, set the listDirection property to slide vertically, and set the width and height of listItem to floating-point numbers +*/ +export default function UiComponentLayoutCommonPixel042() { + + describe('UiComponentLayoutCommonPixel042', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0420 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel042") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0420 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel043.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel043.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..11fd9ce2dcd6d01c72f40e23eadbc5831761a031 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel043.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0430 + * @tc.name test list + * @tc.desc Set to 1 line, set the listDirection property to slide horizontally, and set the width and height of listItem to floating-point numbers +*/ +export default function UiComponentLayoutCommonPixel043() { + + describe('UiComponentLayoutCommonPixel043', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0430 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel043") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0430 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel045.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel045.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ce4b5a76240a48ee4327e9634de899c1505c438 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel045.test.ets @@ -0,0 +1,47 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0450 + * @tc.name test list + * @tc.desc Set the width and height of the list component to floating-point numbers, and check if the layout width and height are rounded to the nearest whole +*/ +export default function UiComponentLayoutCommonPixel045() { + + describe('UiComponentLayoutCommonPixel045', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0450 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel045") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentLayoutCommonPixel045'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.width is: " + JSON.parse(strJson).$attrs.size.width); + Logger.info('TEST', "JSON.parse(strJson).$attrs.height is: " + JSON.parse(strJson).$attrs.size.height); + expect(JSON.parse(strJson).$attrs.size.width).assertEqual('100.50vp'); + expect(JSON.parse(strJson).$attrs.size.height).assertEqual('100.40vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0450 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel046.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel046.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3ce636129eebb8da2b0d50e6706e19b79fcc59be --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel046.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0460 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem subcomponents with floating point values in width and height, delete the ScrollItem subcomponent with index=0 +*/ +export default function UiComponentLayoutCommonPixel046() { + + describe('UiComponentLayoutCommonPixel046', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0460 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel046") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0460 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel047.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel047.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d26da0ff9c406a3a44edf94fc06d94406daea38f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel047.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0470 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem subcomponents with floating point values in width and height, delete the ScrollItem subcomponent with index=2 +*/ +export default function UiComponentLayoutCommonPixel047() { + + describe('UiComponentLayoutCommonPixel047', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0470 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel047") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0470 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel048.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel048.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e857fa1d2ea55deb30740a9caeb1492479f0a6bb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel048.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0480 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem subcomponents with floating point values in width and height, delete the ScrollItem subcomponent with index=6 +*/ +export default function UiComponentLayoutCommonPixel048() { + + describe('UiComponentLayoutCommonPixel048', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0480 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel048") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0480 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel049.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel049.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4228526f3dc4e0d78277072eba4b8143fef5f100 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel049.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0490 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem sub components with floating-point values in width and height, add a ScrollItem sub component with floating-point values in width and height at index=0 position +*/ +export default function UiComponentLayoutCommonPixel049() { + + describe('UiComponentLayoutCommonPixel049', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0490 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel049") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0490 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel050.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel050.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..71764f95699b1b418616ded700d4f9bdddc64531 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel050.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0500 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem subcomponents with floating-point values in width and height, add a ScrollItem subcomponent with floating-point values in width and height at index=2 position +*/ +export default function UiComponentLayoutCommonPixel050() { + + describe('UiComponentLayoutCommonPixel050', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0500 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel050") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0500 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel051.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel051.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c08cc06880df5267357990a189b91e916edab367 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel051.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0510 + * @tc.name test scroll + * @tc.desc After adding 7 ScrollItem sub components with floating-point values in width and height, add a ScrollItem sub component with floating-point values in width and height at index=6 position +*/ +export default function UiComponentLayoutCommonPixel051() { + + describe('UiComponentLayoutCommonPixel051', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0510 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel051") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0510 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel063.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel063.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..13929c0a498cab4b79598d22e271b89822d41378 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel063.test.ets @@ -0,0 +1,47 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0630 + * @tc.name test scroll + * @tc.desc Set the width and height of the Scroll component to floating-point numbers, and check if the layout width and height are rounded to the nearest whole +*/ +export default function UiComponentLayoutCommonPixel063() { + + describe('UiComponentLayoutCommonPixel063', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0630 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel063") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentLayoutCommonPixel063'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.width is: " + JSON.parse(strJson).$attrs.size.width); + Logger.info('TEST', "JSON.parse(strJson).$attrs.height is: " + JSON.parse(strJson).$attrs.size.height); + expect(JSON.parse(strJson).$attrs.size.width).assertEqual('100.50vp'); + expect(JSON.parse(strJson).$attrs.size.height).assertEqual('100.40vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0630 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel066.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel066.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..263e0c22d688bc27eeb32aae12911b52dd38b3ef --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel066.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0660 + * @tc.name test scroll + * @tc.desc Scroll component, set ScrollDirection None, Make the component unable to scroll +*/ +export default function UiComponentLayoutCommonPixel066() { + + describe('UiComponentLayoutCommonPixel066', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0660 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel066") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0660 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel068.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel068.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..416c3262ac390a8954b24101968e0b3c70e93084 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentLayoutCommonPixelTest/UiComponentLayoutCommonPixel068.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0680 + * @tc.name test scroll + * @tc.desc Scroll component, set ScrollDirection None, Make the component unable to scroll +*/ +export default function UiComponentLayoutCommonPixel068() { + + describe('UiComponentLayoutCommonPixel068', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0680 start.`); + Settings.createWindow("testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel068") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_COMMON_PIXEL_0680 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface018.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface018.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..877a2694a5d4a2f884b5c6b921b2349721893970 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface018.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0180 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, set two parameters for icon, and fill in both shown and hidden +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface018() { + + describe('UiComponentRowcolumnSidebarcontainerInterface018', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface018") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0180 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface019.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface019.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..749cdb746a4053a302a828cc4d28779d0d216201 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface019.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0190 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, icon supports relative path referencing of images +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface019() { + + describe('UiComponentRowcolumnSidebarcontainerInterface019', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface019") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0190 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface020.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface020.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..66aa2a40d6e290cf4a9c841f88df167804317103 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface020.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0200 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, icon supports referencing network images +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface020() { + + describe('UiComponentRowcolumnSidebarcontainerInterface020', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0200 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface020") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0200 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface021.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface021.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1d218c02c942ece6f85a307eae4e031ff57434e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface021.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0210 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, icon introduces multiple formats of images +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface021() { + + describe('UiComponentRowcolumnSidebarcontainerInterface021', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0210 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface021") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0210 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface022.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface022.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..42569816fc084b2997af55254be234da1fe427eb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface022.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0220 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property and use $r to reference the image for the icon +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface022() { + + describe('UiComponentRowcolumnSidebarcontainerInterface022', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0220 start.`); + // 调用Settings的createWindow方法创建一个新窗口,加载指定的页面 + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface022") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0220 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface023.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface023.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d32dc6540fd5e534033b09c3d0cc2545313e5c0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface023.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0230 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property and use $rawfile to reference the image for the icon +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface023() { + + describe('UiComponentRowcolumnSidebarcontainerInterface023', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0230 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface023") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0230 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface024.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface024.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1191042e9677ab3695b2bbb3d6c77ab917c9b0e0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface024.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0240 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, use $r to reference multiple formats of images for icons +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface024() { + + describe('UiComponentRowcolumnSidebarcontainerInterface024', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0240 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface024") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0240 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface026.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface026.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..34144eedbb2e426662d1b1d84c42ac12db8d2e96 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface026.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0260 + * @tc.name test SideBarContainer + * @tc.desc Set the ControlButton property, default value for icon +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface026() { + + describe('UiComponentRowcolumnSidebarcontainerInterface026', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0260 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface026") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0260 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface075.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface075.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ab06d5d82b9e93ff2d6aea19e078f3389beafae --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface075.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0750 + * @tc.name test SideBarContainer + * @tc.desc Set divider style, null +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface075() { + + describe('UiComponentRowcolumnSidebarcontainerInterface075', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0750 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface075") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0750 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface076.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface076.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5250919d0fd86838a5151537c48ddea7616e398d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface076.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0760 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the number value is 0 +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface076() { + + describe('UiComponentRowcolumnSidebarcontainerInterface076', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0760 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface076") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface076'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('0.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0760 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface077.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface077.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8dd8017aa8ac1e8f19b664b7ba8c29e3901f2f4d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface077.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0770 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the number value is -10 +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface077() { + + describe('UiComponentRowcolumnSidebarcontainerInterface077', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0770', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0770 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface077") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface077'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('1.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0770 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface078.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface078.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b48465c233c17f6fae56c35e81b8f2a775d3dc6e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface078.test.ets @@ -0,0 +1,40 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0780 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style with a StrokeWidth dividing line width and a number value of 10 +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface078() { + + describe('UiComponentRowcolumnSidebarcontainerInterface078', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0780 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface078") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0780 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface079.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface079.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d5df5fcf6ab95278f7ab42d0407fcca4e9da78f4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface079.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0790 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "0" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface079() { + + describe('UiComponentRowcolumnSidebarcontainerInterface079', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0790 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface079") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface079'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('0.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0790 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface080.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface080.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..44566075382ec66098bf9bc73ded13c35793bb45 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface080.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0800 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "-10" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface080() { + + describe('UiComponentRowcolumnSidebarcontainerInterface080', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0800 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface080") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface080'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('1.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0800 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface081.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface081.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..474cc19d9f2cf0e7906bfd9c2b89d78ca9293468 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface081.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0810 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "10" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface081() { + + describe('UiComponentRowcolumnSidebarcontainerInterface081', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0810 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface081") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface081'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('10.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0810 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface082.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface082.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2db6d30ded454d59365c224a1b5df4422515c21 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface082.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0820 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, stride width of the dividing line, and string value of "10vp" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface082() { + + describe('UiComponentRowcolumnSidebarcontainerInterface082', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0820 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface082") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface082'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('10.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0820 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface083.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface083.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..960c8f747e1e066d93a145521a6cce577643d241 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface083.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0830 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "10fp" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface083() { + + describe('UiComponentRowcolumnSidebarcontainerInterface083', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0830 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface083") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface083'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('10.00fp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0830 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface084.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface084.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2779ceb590d7d2e08816100b0569f8a466da8a37 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface084.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0840 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "10lpx" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface084() { + + describe('UiComponentRowcolumnSidebarcontainerInterface084', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0840 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface084") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface084'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('10.00lpx'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0840 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface085.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface085.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6d45b9a52e234f092b0c2ea1a0c7fdac2076b71 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface085.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0850 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, stride width of the dividing line, and string value of "10px" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface085() { + + describe('UiComponentRowcolumnSidebarcontainerInterface085', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0850', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0850 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface085") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface085'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('10.00px'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0850 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface086.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface086.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9d8b1d7e95b22e7c40f3f33cf45c1672f04c0c3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface086.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0860 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "sdfsdf" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface086() { + + describe('UiComponentRowcolumnSidebarcontainerInterface086', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0860', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0860 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface086") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface086'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('1.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0860 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface087.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface087.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..72e700083b1cf04f772f48ee5f71271e43bfb47e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface087.test.ets @@ -0,0 +1,44 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0870 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the width of the dividing line is strokeWidth, and the string value is "100dd" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface087() { + + describe('UiComponentRowcolumnSidebarcontainerInterface087', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0870', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0870 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface087") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface087'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + expect(JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth).assertEqual('1.00vp'); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0870 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface088.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface088.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6309ded16db670b8426f1b9c713f6c2e953c3c8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface088.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880 + * @tc.name test SideBarContainer + * @tc.desc Split line width strokeWidth, Resource type, create a new JSON file of type string in the base ->element directory +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface088() { + + describe('UiComponentRowcolumnSidebarcontainerInterface088', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface088") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface088'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface089.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface089.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ab32117b6d8cc4af9fe7281a02bb717a4c5d5f4d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface089.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0890 + * @tc.name test SideBarContainer + * @tc.desc Split line width strokeWidth, Resource type, create a JSON file of type other than string or float in the base ->element directory +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface089() { + + describe('UiComponentRowcolumnSidebarcontainerInterface089', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0890', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0890 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface089") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface089'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0890 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface090.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface090.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..196ec770b937b26a790a95b50d0e1a95afa3d434 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface090.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0900 + * @tc.name test SideBarContainer + * @tc.desc Split line width strokeWidth, Resource type, create a JSON file of type float in the base ->element directory +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface090() { + + describe('UiComponentRowcolumnSidebarcontainerInterface090', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0900', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0900 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface090") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface090'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0900 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface091.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface091.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..20b2727958e1e8344df416514084e471d0fa09d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface091.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0910 + * @tc.name test SideBarContainer + * @tc.desc Line width of the dividing line strokeWidth, Resource type, $rawfile reference +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface091() { + + describe('UiComponentRowcolumnSidebarcontainerInterface091', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0910', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0910 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface091") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface091'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0910 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface092.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface092.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6db282271dc2bebdcdaf4fb06991f6cdaf1584c1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface092.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0920 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, split line color, and set the value Color Blue +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface092() { + + describe('UiComponentRowcolumnSidebarcontainerInterface092', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0920', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0920 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface092") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface092'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0920 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface093.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface093.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..15e6015cc7d0165d4d4664fd65cbcd4387f6c467 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface093.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0930 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, the color of the dividing line, and set the value to "# fc0303" +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface093() { + + describe('UiComponentRowcolumnSidebarcontainerInterface093', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0930 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface093") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface093'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0930 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface094.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface094.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..56aa7c876417ed56145afe64dd7297a030127b14 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface094.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0940 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, dividing line color, and set the value 0xff0000 +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface094() { + + describe('UiComponentRowcolumnSidebarcontainerInterface094', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0940 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface094") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface094'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0940 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface095.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface095.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..193c05ede5672f9053938385129ec723493aefc8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface095.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0950 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, dividing line color, and set the value rgb (2, 184, 17) +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface095() { + + describe('UiComponentRowcolumnSidebarcontainerInterface095', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0950', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0950 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface095") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface095'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0950 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface096.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface096.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e16408f6c8fd9ffcb1a8d5558062b58339c3319 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface096.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0960 + * @tc.name test SideBarContainer + * @tc.desc Set the divider style, split line color, and set the value resource reference app.color Pink +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface096() { + + describe('UiComponentRowcolumnSidebarcontainerInterface096', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0960 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface096") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface096'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.strokeWidth is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).strokeWidth); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0960 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface097.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface097.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a54d127f8ecc349da3a50027dac3b579110a5d9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentRowcolumnSidebarcontainerInterfaceTest/UiComponentRowcolumnSidebarcontainerInterface097.test.ets @@ -0,0 +1,43 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0970 + * @tc.name test SideBarContainer + * @tc.desc Set divider style, dividing line color, optional, default value # 000000 plus 3% transparency +*/ +export default function UiComponentRowcolumnSidebarcontainerInterface097() { + + describe('UiComponentRowcolumnSidebarcontainerInterface097', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0970', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0970 start.`); + Settings.createWindow("testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface097") + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(1000) + let strJson = getInspectorByKey('UiComponentRowcolumnSidebarcontainerInterface097'); + Logger.info('TEST', "JSON.parse(strJson) is: " + JSON.stringify(JSON.parse(strJson))); + Logger.info('TEST', "JSON.parse(strJson).$attrs.divider.color is: " + JSON.parse(JSON.parse(strJson).$attrs.divider).color); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0970 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier001.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier001.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d49b61a218588789105a8a81bf9618ff012e124c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier001.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0010 + * @tc.name test HyperlinkModifier + * @tc.desc Set color +*/ +export default function UiComponentTextModifier001() { + + describe('UiComponentTextModifier001', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0010 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier001") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0010 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier002.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier002.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a672a589a76ee2d9536dfc9e5b9ec1f427e0b4b9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier002.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0020 + * @tc.name test ImageSpanModifier + * @tc.desc Set objectFit +*/ +export default function UiComponentTextModifier002() { + + describe('UiComponentTextModifier002', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0020 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier002") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0020 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier003.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier003.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e03b885a52f36e147a7f9e29f9e91aa6b697dcf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier003.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0030 + * @tc.name test ImageSpanModifier + * @tc.desc Set verticalAlign +*/ +export default function UiComponentTextModifier003() { + + describe('UiComponentTextModifier003', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0030 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier003") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0030 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier004.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier004.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..efb7c12fd8a8a4a4ac7fd41b17bdf676fbcd91c2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier004.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0040 + * @tc.name test MarqueeModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier004() { + + describe('UiComponentTextModifier004', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0040 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier004") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0040 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier005.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier005.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3407c5eaad92e6e9527d8ee96939eb0db7c7818a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier005.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0050 + * @tc.name test MarqueeModifier + * @tc.desc Set fontSize +*/ +export default function UiComponentTextModifier005() { + + describe('UiComponentTextModifier005', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0050 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier005") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0050 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier006.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier006.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4d5b8b70b66de7655cfeb89ff42cac12a9e7c38 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier006.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0060 + * @tc.name test MarqueeModifier + * @tc.desc Set allowScale +*/ +export default function UiComponentTextModifier006() { + + describe('UiComponentTextModifier006', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0060 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier006") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0060 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier007.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier007.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a99faf1d0b849cb0aa8255e98b67a69c4453d42 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier007.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0070 + * @tc.name test MarqueeModifier + * @tc.desc Set fontWeight +*/ +export default function UiComponentTextModifier007() { + + describe('UiComponentTextModifier007', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0070 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier007") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0070 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier008.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier008.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..68c98e16f6de88624c0a08a14dd52b11f750fd76 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier008.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0080 + * @tc.name test MarqueeModifier + * @tc.desc Set fontFamily +*/ +export default function UiComponentTextModifier008() { + + describe('UiComponentTextModifier008', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0080 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier008") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0080 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier009.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier009.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..93463fc045236e3600c5765aaf87ffe82c7fe5a0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier009.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0090 + * @tc.name test RichEditorModifier + * @tc.desc Set copyOptions +*/ +export default function UiComponentTextModifier009() { + + describe('UiComponentTextModifier009', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0090 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier009") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0090 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier010.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier010.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d198cb1e7c9a910311588fddf02f35ab366028d1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier010.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0100 + * @tc.name test SearchModifier + * @tc.desc Set selectionMenuHidden +*/ +export default function UiComponentTextModifier010() { + + describe('UiComponentTextModifier010', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0100 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier010") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier011.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier011.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..13549215a66eea105a4cfe86eb9631d00f018dd2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier011.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0110 + * @tc.name test SearchModifier + * @tc.desc Set searchButton +*/ +export default function UiComponentTextModifier011() { + + describe('UiComponentTextModifier011', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0110 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier011") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0110 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier012.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier012.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1090b2e3b27273a83325ae7ede4a6dc13ffa4a4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier012.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0120 + * @tc.name test SearchModifier + * @tc.desc Set caretStyle +*/ +export default function UiComponentTextModifier012() { + + describe('UiComponentTextModifier012', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0120 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier012") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0120 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier013.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier013.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b46252160d6ab86a7aed4edfe9870dc57b90f2f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier013.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0130 + * @tc.name test SearchModifier + * @tc.desc Set cancelButton +*/ +export default function UiComponentTextModifier013() { + + describe('UiComponentTextModifier013', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0130 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier013") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0130 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier014.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier014.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9c44a55c96d43b9163ef29b4cb19aee7e7d3f5a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier014.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0140 + * @tc.name test SearchModifier + * @tc.desc Set searchIcon +*/ +export default function UiComponentTextModifier014() { + + describe('UiComponentTextModifier014', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0140 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier014") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0140 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier015.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier015.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ce21242a29e908c6dc1566c5a02a5a72cd37ebc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier015.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0150 + * @tc.name test SearchModifier + * @tc.desc Set enableKeyboardOnFocus +*/ +export default function UiComponentTextModifier015() { + + describe('UiComponentTextModifier015', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0150 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier015") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0150 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier016.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier016.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1098f2a0bc6f2591b775dba09061dd6206c06080 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier016.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0160 + * @tc.name test SearchModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier016() { + + describe('UiComponentTextModifier016', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0160 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier016") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0160 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier017.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier017.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..97439831264966668d6c0afd431fe3701b441c9a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier017.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0170 + * @tc.name test SearchModifier + * @tc.desc Set placeholderColor +*/ +export default function UiComponentTextModifier017() { + + describe('UiComponentTextModifier017', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0170 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier017") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0170 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier018.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier018.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..edfd740e472b0307f9e89075073808d848b2b0fa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier018.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0180 + * @tc.name test SearchModifier + * @tc.desc Set placeholderFont +*/ +export default function UiComponentTextModifier018() { + + describe('UiComponentTextModifier018', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0180 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier018") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0180 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier019.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier019.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ac8021dc5b8561635c859ee5ec296f4f4126a25 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier019.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0190 + * @tc.name test SearchModifier + * @tc.desc Set textFont +*/ +export default function UiComponentTextModifier019() { + + describe('UiComponentTextModifier019', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0190 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier019") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0190 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier020.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier020.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a60990677701ff5855d06917e0738d616497738a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier020.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0200 + * @tc.name test SearchModifier + * @tc.desc Set copyOption +*/ +export default function UiComponentTextModifier020() { + + describe('UiComponentTextModifier020', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0200 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier020") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0200 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier021.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier021.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0958c7778ccff7567b95d2d1b3c25a3050c5c11a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier021.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0210 + * @tc.name test SearchModifier + * @tc.desc Set textAlign +*/ +export default function UiComponentTextModifier021() { + + describe('UiComponentTextModifier021', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0210 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier021") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0210 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier022.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier022.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b408fa3431cb26414c837e04f72198b054e9d17a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier022.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0220 + * @tc.name test SpanModifier + * @tc.desc Set lineHeight +*/ +export default function UiComponentTextModifier022() { + + describe('UiComponentTextModifier022', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0220 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier022") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0220 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier023.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier023.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..11472915af0d64927a19766dded9c3880b638abc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier023.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0230 + * @tc.name test SpanModifier + * @tc.desc Set textCase +*/ +export default function UiComponentTextModifier023() { + + describe('UiComponentTextModifier023', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier023") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0230 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier024.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier024.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b3fa74bc800cfe5c4cc59e321c0a73aa8b0d19e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier024.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0240 + * @tc.name test SpanModifier + * @tc.desc Set letterSpacing +*/ +export default function UiComponentTextModifier024() { + + describe('UiComponentTextModifier024', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0240 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier024") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0240 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier025.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier025.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a09271e293724cc1c13c56ffeb6905fe1cd87ace --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier025.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0250 + * @tc.name test SpanModifier + * @tc.desc Set decoration +*/ +export default function UiComponentTextModifier025() { + + describe('UiComponentTextModifier025', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0250 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier025") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0250 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier026.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier026.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..728f87660b5457d6b024faa299e89dc541f101d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier026.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0260 + * @tc.name test SpanModifier + * @tc.desc Set fontFamily +*/ +export default function UiComponentTextModifier026() { + + describe('UiComponentTextModifier026', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0260 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier026") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0260 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier027.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier027.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..088e823f5b8c45e7c352d8938d23882cf722781a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier027.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0270 + * @tc.name test SpanModifier + * @tc.desc Set fontWeight +*/ +export default function UiComponentTextModifier027() { + + describe('UiComponentTextModifier027', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0270 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier027") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0270 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier028.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier028.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5dad10601023bbda43001faf50cba490e4997399 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier028.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0280 + * @tc.name test SpanModifier + * @tc.desc Set fontStyle +*/ +export default function UiComponentTextModifier028() { + + describe('UiComponentTextModifier028', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0280 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier028") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0280 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier029.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier029.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..468e938fcd84a638ddbd0f6d73259f7ee86a1b6c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier029.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0290 + * @tc.name test SpanModifier + * @tc.desc Set fontSize +*/ +export default function UiComponentTextModifier029() { + + describe('UiComponentTextModifier029', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0290 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier029") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0290 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier030.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier030.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b46962c5ff45fae36b542d6d8140587dfd55b896 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier030.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0300 + * @tc.name test SpanModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier030() { + + describe('UiComponentTextModifier030', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0300 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier030") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0300 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier031.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier031.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..169c46154c952d8bb7b9925aa383169bb88cd320 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier031.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0310 + * @tc.name test SpanModifier + * @tc.desc Set font +*/ +export default function UiComponentTextModifier031() { + + describe('UiComponentTextModifier031', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0310 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier031") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0310 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier032.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier032.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec698844d32f554f26c01712593d7be1f11c05eb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier032.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0320 + * @tc.name test TextAreaModifier + * @tc.desc Set showCounter +*/ +export default function UiComponentTextModifier032() { + + describe('UiComponentTextModifier032', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0320 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier032") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0320 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier033.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier033.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..82da572de4cc299c9700fa3cbbb231a62179dced --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier033.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0330 + * @tc.name test TextAreaModifier + * @tc.desc Set maxLines and Style +*/ +export default function UiComponentTextModifier033() { + + describe('UiComponentTextModifier033', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0330 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier033") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0330 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier034.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier034.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b483ca512e43403f801843610651798ab39fb7c0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier034.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0340 + * @tc.name test TextAreaModifier + * @tc.desc Set Style +*/ +export default function UiComponentTextModifier034() { + + describe('UiComponentTextModifier034', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier034") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0340 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier035.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier035.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..12b53eb154b451d95a15fdf141815c7d0e876315 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier035.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0350 + * @tc.name test TextAreaModifier + * @tc.desc Set selectionMenuHidden +*/ +export default function UiComponentTextModifier035() { + + describe('UiComponentTextModifier035', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0350 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier035") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0350 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier036.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier036.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..590a0eb87fe7c5e654915802eb146d06116f1b0d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier036.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0360 + * @tc.name test TextAreaModifier + * @tc.desc Set barState +*/ +export default function UiComponentTextModifier036() { + + describe('UiComponentTextModifier036', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0360 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier036") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0360 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier037.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier037.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..55201abe71260252202f9ff953bd658969e23bc3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier037.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0370 + * @tc.name test TextAreaModifier + * @tc.desc Set maxLength +*/ +export default function UiComponentTextModifier037() { + + describe('UiComponentTextModifier037', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0370 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier037") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0370 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier038.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier038.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..66b54c0c2f49acad3bd0888100e83f93b27878a5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier038.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0380 + * @tc.name test TextAreaModifier + * @tc.desc Set enableKeyboardOnFocus +*/ +export default function UiComponentTextModifier038() { + + describe('UiComponentTextModifier038', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0380 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier038") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0380 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier039.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier039.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c67abd5b01730e97e11826f02ecd91cda917d010 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier039.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0390 + * @tc.name test TextAreaModifier + * @tc.desc Set copyOption +*/ +export default function UiComponentTextModifier039() { + + describe('UiComponentTextModifier039', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0390 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier039") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0390 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier040.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier040.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f30a3897e5dbe9a67a2764b7733d8990cd5c6fc5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier040.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0400 + * @tc.name test TextAreaModifier + * @tc.desc Set fontFamily +*/ +export default function UiComponentTextModifier040() { + + describe('UiComponentTextModifier040', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0400 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier040") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0400 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier041.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier041.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a269d4b4d4cd5a971d2870bca4eb5e8e73261ffa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier041.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0410 + * @tc.name test TextAreaModifier + * @tc.desc Set fontWeight +*/ +export default function UiComponentTextModifier041() { + + describe('UiComponentTextModifier041', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0410 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier041") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0410 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier042.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier042.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..035775d5dec7c7bae281987b4deeb19dad5d30e6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier042.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0420 + * @tc.name test TextAreaModifier + * @tc.desc Set fontStyle +*/ +export default function UiComponentTextModifier042() { + + describe('UiComponentTextModifier042', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0420 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier042") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0420 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier043.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier043.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..41dc376569af793dbeea33907a3f7744850c98cf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier043.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0430 + * @tc.name test TextAreaModifier + * @tc.desc Set fontSize +*/ +export default function UiComponentTextModifier043() { + + describe('UiComponentTextModifier043', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0430 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier043") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0430 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier044.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier044.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b64b251b18cadc94b2020f52ae7fbbbad9203f3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier044.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0440 + * @tc.name test TextAreaModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier044() { + + describe('UiComponentTextModifier044', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0440 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier044") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0440 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier045.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier045.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef594f92e3cf1ed88685e381972513a37307779b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier045.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0450 + * @tc.name test TextAreaModifier + * @tc.desc Set caretColor +*/ +export default function UiComponentTextModifier045() { + + describe('UiComponentTextModifier045', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0450 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier045") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0450 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier046.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier046.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..587597314b7edfcceab453e141123bf908c7a4b6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier046.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0460 + * @tc.name test TextAreaModifier + * @tc.desc Set textAlign +*/ +export default function UiComponentTextModifier046() { + + describe('UiComponentTextModifier046', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0460 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier046") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0460 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier047.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier047.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ffe77fcdaacaaf4c9db59779262e5a732fe0039 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier047.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0470 + * @tc.name test TextAreaModifier + * @tc.desc Set placeholderFont +*/ +export default function UiComponentTextModifier047() { + + describe('UiComponentTextModifier047', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier047") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0470 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier048.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier048.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..87cd67eca216b1951ba1fd0f8cdaa091261d71c9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier048.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0480 + * @tc.name test TextAreaModifier + * @tc.desc Set placeholderColor +*/ +export default function UiComponentTextModifier048() { + + describe('UiComponentTextModifier048', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0480 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier048") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0480 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier049.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier049.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f081d201f731d512efc970ebb79786fca61b5598 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier049.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0490 + * @tc.name test TextModifier + * @tc.desc Set draggable +*/ +export default function UiComponentTextModifier049() { + + describe('UiComponentTextModifier049', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0490 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier049") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0490 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier050.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier050.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a0e069a58dadd3f35c1a9e27382144264f8b9926 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier050.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0500 + * @tc.name test TextModifier + * @tc.desc Set wordBreak +*/ +export default function UiComponentTextModifier050() { + + describe('UiComponentTextModifier050', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0500 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier050") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0500 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier051.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier051.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8717ba69502dc5be797eae5a29616971c47bc1b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier051.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0510 + * @tc.name test TextModifier + * @tc.desc Set textIndent +*/ +export default function UiComponentTextModifier051() { + + describe('UiComponentTextModifier051', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0510 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier051") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0510 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier052.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier052.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c0fbc76d9bd8055f01b9ab3b03c263c816b32ca2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier052.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0520 + * @tc.name test TextModifier + * @tc.desc Set heightAdaptivePolicy,maxFontSize,minFontSize,maxlines +*/ +export default function UiComponentTextModifier052() { + + describe('UiComponentTextModifier052', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0520 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier052") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0520 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier053.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier053.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d1d2891164b1e84496e2df93eb0dbadd89796916 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier053.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0530 + * @tc.name test TextModifier + * @tc.desc Set textShadow +*/ +export default function UiComponentTextModifier053() { + + describe('UiComponentTextModifier053', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0530 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier053") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0530 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier054.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier054.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb502bd0868067049f1bd30dac1933bd63ba7f53 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier054.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0540 + * @tc.name test TextModifier + * @tc.desc Set copyOption +*/ +export default function UiComponentTextModifier054() { + + describe('UiComponentTextModifier054', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0540 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier054") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0540 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier055.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier055.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f589a8a6964a1e921ab928004a33223a967f4754 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier055.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0550 + * @tc.name test TextModifier + * @tc.desc Set baselineOffset +*/ +export default function UiComponentTextModifier055() { + + describe('UiComponentTextModifier055', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0550 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier055") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0550 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier056.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier056.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f464c7e0a0daac004896f6e606a34141282ba5d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier056.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0560 + * @tc.name test TextModifier + * @tc.desc Set textCase +*/ +export default function UiComponentTextModifier056() { + + describe('UiComponentTextModifier056', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0560 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier056") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0560 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier057.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier057.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..626ce0e2381d08794bd2264f7e2f7223dfef84ae --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier057.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0570 + * @tc.name test TextModifier + * @tc.desc Set letterSpacing +*/ +export default function UiComponentTextModifier057() { + + describe('UiComponentTextModifier057', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0570 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier057") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0570 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier058.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier058.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..10a77453b9d61a3108f59b1d3112e4bb9854ece7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier058.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0580 + * @tc.name test TextModifier + * @tc.desc Set decoration +*/ +export default function UiComponentTextModifier058() { + + describe('UiComponentTextModifier058', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0580 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier058") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0580 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier059.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier059.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..61925c2e88c4f36fa80a9631c110ed8d386582ca --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier059.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0590 + * @tc.name test TextModifier + * @tc.desc Set maxLines +*/ +export default function UiComponentTextModifier059() { + + describe('UiComponentTextModifier059', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0590 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier059") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0590 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier060.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier060.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2d3dda38568c37d93b3dda5bd7b1ef941e0522e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier060.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0600 + * @tc.name test TextModifier + * @tc.desc Set fontFamily +*/ +export default function UiComponentTextModifier060() { + + describe('UiComponentTextModifier060', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0600 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier060") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0600 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier061.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier061.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d5da5dfe6c5a0d96f06be60afe6bbf97640c8d0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier061.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0610 + * @tc.name test TextModifier + * @tc.desc Set fontWeight +*/ +export default function UiComponentTextModifier061() { + + describe('UiComponentTextModifier061', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0610 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier061") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0610 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier062.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier062.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f88f29ef47625bb98d66cf6ba6f21fed1f6a1e3f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier062.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0620 + * @tc.name test TextModifier + * @tc.desc Set fontStyle +*/ +export default function UiComponentTextModifier062() { + + describe('UiComponentTextModifier062', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0620 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier062") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0620 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier063.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier063.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9afb2e7273ae4738e8837526435e221bf47f765 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier063.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0630 + * @tc.name test TextModifier + * @tc.desc Set fontSize +*/ +export default function UiComponentTextModifier063() { + + describe('UiComponentTextModifier063', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0630 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier063") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0630 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier064.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier064.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..deca7b265fb96f35f6ac5d62a0516cf0fc82f88c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier064.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0640 + * @tc.name test TextModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier064() { + + describe('UiComponentTextModifier064', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0640 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier064") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0640 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier065.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier065.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..be526d26293ccb51cb90692e82d9c5c8eef6bc72 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier065.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0650 + * @tc.name test TextModifier + * @tc.desc Set textAlign +*/ +export default function UiComponentTextModifier065() { + + describe('UiComponentTextModifier065', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0650 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier065") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0650 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier066.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier066.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..cfcff68cfcdaec4de119c12e11ba5e5679b73f30 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier066.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0660 + * @tc.name test TextModifier + * @tc.desc Set lineHeight +*/ +export default function UiComponentTextModifier066() { + + describe('UiComponentTextModifier066', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0660 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier066") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0660 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier067.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier067.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c86c54884fa177986e7e28fdfc3d9c9faaa7947 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier067.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0670 + * @tc.name test TextModifier + * @tc.desc Set textOverflow +*/ +export default function UiComponentTextModifier067() { + + describe('UiComponentTextModifier067', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0670 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier067") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0670 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier068.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier068.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8060144a2904e9c8fe955b928896c96833e02f5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier068.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0680 + * @tc.name test TextModifier + * @tc.desc Set font +*/ +export default function UiComponentTextModifier068() { + + describe('UiComponentTextModifier068', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0680 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier068") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0680 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier069.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier069.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a22724e344005ed63f70c61d7d02242ff86ab6c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier069.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0690 + * @tc.name test TextInputModifier + * @tc.desc Set maxLines +*/ +export default function UiComponentTextModifier069() { + + describe('UiComponentTextModifier069', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0690 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier069") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0690 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier070.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier070.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f03898f75ceaf9468e84b2721bd981f8d0f5f334 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier070.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0700 + * @tc.name test TextInputModifier + * @tc.desc Set showUnderline +*/ +export default function UiComponentTextModifier070() { + + describe('UiComponentTextModifier070', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0700 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier070") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0700 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier071.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier071.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c465964be6b978dc72382b06ca9669d8a078a589 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier071.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0710 + * @tc.name test TextInputModifier + * @tc.desc Set showError +*/ +export default function UiComponentTextModifier071() { + + describe('UiComponentTextModifier071', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0710 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier071") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0710 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier072.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier072.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3b3c428ac18d74b94faf5dd2f3d2c1f9729a2b5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier072.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0720 + * @tc.name test TextInputModifier + * @tc.desc Set passwordIcon +*/ +export default function UiComponentTextModifier072() { + + describe('UiComponentTextModifier072', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0720 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier072") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0720 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier073.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier073.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..674c00e7e38bbdb25cced2130f9d942ea392ec47 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier073.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0730 + * @tc.name test TextInputModifier + * @tc.desc Set style +*/ +export default function UiComponentTextModifier073() { + + describe('UiComponentTextModifier073', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0730', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0730 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier073") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0730 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier074.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier074.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9e7c23f34f8aa9eaf9a722454cf6c79e5bae6f16 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier074.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0740 + * @tc.name test TextInputModifier + * @tc.desc Set selectionMenuHidden +*/ +export default function UiComponentTextModifier074() { + + describe('UiComponentTextModifier074', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0740', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0740 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier074") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0740 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier075.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier075.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f19bcf09277f999df7a3e5fa4568df1b2ad17416 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier075.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0750 + * @tc.name test TextInputModifier + * @tc.desc Set barState +*/ +export default function UiComponentTextModifier075() { + + describe('UiComponentTextModifier075', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0750', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0750 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier075") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0750 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier076.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier076.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f80c77fe24f929162fe040c8e13e5c38d29f16b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier076.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0760 + * @tc.name test TextInputModifier + * @tc.desc Set enableKeyboardOnFocus +*/ +export default function UiComponentTextModifier076() { + + describe('UiComponentTextModifier076', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0760 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier076") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0760 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier077.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier077.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..e007a644661ad5ab912581f9de4e2ba6bba2674a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier077.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0770 + * @tc.name test TextInputModifier + * @tc.desc Set caretStyle +*/ +export default function UiComponentTextModifier077() { + + describe('UiComponentTextModifier077', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0770', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0770 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier077") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0770 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier078.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier078.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc6ba8f5ede65753ab797f71e7b42940b750c8d7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier078.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0780 + * @tc.name test TextInputModifier + * @tc.desc Set selectedBackgroundColor +*/ +export default function UiComponentTextModifier078() { + + describe('UiComponentTextModifier078', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0780 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier078") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0780 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier079.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier079.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..20a370fe5d743f567fe8511764df7bea72dcae3c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier079.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0790 + * @tc.name test TextInputModifier + * @tc.desc Set caretPosition +*/ +export default function UiComponentTextModifier079() { + + describe('UiComponentTextModifier079', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0790', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0790 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier079") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0790 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier080.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier080.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..6959979bd2408294cea21bc9e86637e82aafb0df --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier080.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0800 + * @tc.name test TextInputModifier + * @tc.desc Set caretColor +*/ +export default function UiComponentTextModifier080() { + + describe('UiComponentTextModifier080', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0800', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0800 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier080") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0800 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier081.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier081.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1484e28d7ad612ec3d47634858b1baeab6286918 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier081.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0810 + * @tc.name test TextInputModifier + * @tc.desc Set placeholderFont +*/ +export default function UiComponentTextModifier081() { + + describe('UiComponentTextModifier081', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0810 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier081") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0810 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier082.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier082.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b444eca8a39f8fb3385a66e45ea67fb01e4bd94f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier082.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0820 + * @tc.name test TextInputModifier + * @tc.desc Set placeholderColor +*/ +export default function UiComponentTextModifier082() { + + describe('UiComponentTextModifier082', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0820', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0820 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier082") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0820 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier083.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier083.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..150c0e007450a2c3bec902860163365269377934 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier083.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0830 + * @tc.name test TextInputModifier + * @tc.desc Set type +*/ +export default function UiComponentTextModifier083() { + + describe('UiComponentTextModifier083', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0830', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0830 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier083") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0830 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier084.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier084.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2584fb2f76de3ce17e4b308918533c2537021a0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier084.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0840 + * @tc.name test TextInputModifier + * @tc.desc Set enterKeyType +*/ +export default function UiComponentTextModifier084() { + + describe('UiComponentTextModifier084', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0840', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0840 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier084") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0840 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier085.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier085.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f2c556b12d296f99920ed83fdb040f9ebfec6fa2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier085.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0850 + * @tc.name test TextInputModifier + * @tc.desc Set maxLength +*/ +export default function UiComponentTextModifier085() { + + describe('UiComponentTextModifier085', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0850', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0850 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier085") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0850 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier086.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier086.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b992fc42138494c7b021eb77577518a4a4ab1a9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier086.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0860 + * @tc.name test TextInputModifier + * @tc.desc Set fontFamily +*/ +export default function UiComponentTextModifier086() { + + describe('UiComponentTextModifier086', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0860', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0860 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier086") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0860 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier087.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier087.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..012f95b891e2086817992ecabe777f0f49451a98 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier087.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0870 + * @tc.name test TextInputModifier + * @tc.desc Set fontWeight +*/ +export default function UiComponentTextModifier087() { + + describe('UiComponentTextModifier087', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0870', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0870 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier087") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0870 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier088.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier088.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a7c9a9e14caa6e0c9488dc909dda3e5de0c6b97f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier088.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0880 + * @tc.name test TextInputModifier + * @tc.desc Set fontStyle +*/ +export default function UiComponentTextModifier088() { + + describe('UiComponentTextModifier088', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0880', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0880 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier088") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0880 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier089.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier089.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b5934a5f79268cce9b59dd81693fbc938c23889 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier089.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0890 + * @tc.name test TextInputModifier + * @tc.desc Set fontSize +*/ +export default function UiComponentTextModifier089() { + + describe('UiComponentTextModifier089', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0890', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0890 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier089") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0890 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier090.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier090.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7dc78efa25751345f3d6840191fac59b5b02d900 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier090.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0900 + * @tc.name test TextInputModifier + * @tc.desc Set fontColor +*/ +export default function UiComponentTextModifier090() { + + describe('UiComponentTextModifier090', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0900', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0900 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier090") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0900 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier091.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier091.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..1363c27a9ccf8c41293543b6a5915efc4565a0d3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier091.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0910 + * @tc.name test TextInputModifier + * @tc.desc Set textAlign +*/ +export default function UiComponentTextModifier091() { + + describe('UiComponentTextModifier091', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0910', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0910 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier091") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0910 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier092.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier092.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..59a0b4f16c114c7607075710895856d04e6998ff --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier092.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0920 + * @tc.name test TextInputModifier + * @tc.desc Set copyOption +*/ +export default function UiComponentTextModifier092() { + + describe('UiComponentTextModifier092', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0920', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0920 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier092") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0920 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier093.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier093.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..9eac2e8f4644fbc64e3313a55ddc8a5cf1ae2d3a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier093.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0930 + * @tc.name test TextInputModifier + * @tc.desc Set showPasswordIcon +*/ +export default function UiComponentTextModifier093() { + + describe('UiComponentTextModifier093', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0930 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier093") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0930 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier094.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier094.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..766ca3e3305e25e69111c0bc322a33fa8c4dad88 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier094.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0940 + * @tc.name test TextInputModifier + * @tc.desc Set showPasswordIcon to set multiple TextInput components +*/ +export default function UiComponentTextModifier094() { + + describe('UiComponentTextModifier094', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0940 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier094") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0940 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier095.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier095.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f5a75dfda2dc4467ee6a5007569fbd77007fee8d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier095.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0950 + * @tc.name test TextInputModifier + * @tc.desc Multiple TextInputModifiers, set showPasswordIcon and copyOption separately +*/ +export default function UiComponentTextModifier095() { + + describe('UiComponentTextModifier095', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0950', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0950 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier095") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0950 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier096.test.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier096.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..ceb98b44e9482038acf1a8f8d597e829782269ba --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/test/UiComponentTextModifierTest/UiComponentTextModifier096.test.ets @@ -0,0 +1,41 @@ +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' + +/* + * @tc.number SUB_ACE_UI_COMPONENT_TEXT_COMMON_TEXTSTYLE_0960 + * @tc.name test TextInputModifier + * @tc.desc Set multiple TextInputModifiers, respectively setting showPasswordIcon and copyOption +*/ +export default function UiComponentTextModifier096() { + + describe('UiComponentTextModifier096', () => { + 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(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0960 start.`); + Settings.createWindow("testability/pages/UiComponentTextModifier/UiComponentTextModifier096") + await Utils.sleep(13000) + windowSnap.snapShot() + await Utils.sleep(1000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_TEXT_MODIFIER_0960 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle001.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle001.ets new file mode 100644 index 0000000000000000000000000000000000000000..6934435f8ba46a47b675dcb04d1028aca560e67c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle001.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 UiComponentTextCommonTextstyle001 { + @State text: string = `一\n二\n三\n四\n五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(60) + .height(100) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle002.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle002.ets new file mode 100644 index 0000000000000000000000000000000000000000..b19d129d43c8d11c19a244524f2dc1d96041c285 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle002.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 UiComponentTextCommonTextstyle002 { + @State text: string = `一\n二\n三\n四\n五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(60) + .height(100) + .maxLines(3) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Auto) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle003.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle003.ets new file mode 100644 index 0000000000000000000000000000000000000000..60c09787dcf09c19260bf7b8b8bc34afefaece77 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle003.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 UiComponentTextCommonTextstyle003 { + @State text: string = `一\n二\n三\n四\n五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(60) + .height(100) + .maxLines(3) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.On) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle004.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle004.ets new file mode 100644 index 0000000000000000000000000000000000000000..33a38facbbf007d6d7323718883e59bd9ff2a1ed --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle004.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 UiComponentTextCommonTextstyle004 { + @State text: string = `一\n二\n三\n四\n五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(60) + .height(100) + .maxLines(3) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle005.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle005.ets new file mode 100644 index 0000000000000000000000000000000000000000..92599f9a366b44b593f583d163e7c21376e2c41a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle005.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 UiComponentTextCommonTextstyle005 { + @State text: string = `111一\n222二\n333三\n444四\n555五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(100) + .height(100) + .maxLines(3) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(true) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle006.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle006.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1432d08da5d0df6aa18b24f93ead186e518ef13 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle006.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 UiComponentTextCommonTextstyle006 { + @State text: string = `111一\n222二\n333三\n444四\n555五` + controller: TextAreaController = new TextAreaController() + + build() { + Row() { + Column() { + TextInput({ text: this.text, controller: this.controller }) + .width(100) + .height(100) + .maxLines(3) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle007.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle007.ets new file mode 100644 index 0000000000000000000000000000000000000000..5caa75de7ac2557c9bfc33a537bd85fa933bfd8b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle007.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 UiComponentTextCommonTextstyle007 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + @State num: number = 0 + + build() { + Row() { + Column() { + TextInput({ placeholder: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .barState(BarState.Off) + .selectionMenuHidden(false) + .caretPosition(this.num) + + Button('Set caretPosition 3', { type: ButtonType.Capsule, stateEffect: true }) + .backgroundColor(0x317aff) + .width(300) + .onClick(()=>{ + this.num =3 + }) + + Text(this.num.toString()).fontSize(20) + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle008.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle008.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f0da28165b190939c326eef342dfa2be8ce7325 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle008.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 UiComponentTextCommonTextstyle008 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .selectedBackgroundColor(Color.Blue) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle009.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle009.ets new file mode 100644 index 0000000000000000000000000000000000000000..52904e55a569d40f4c656779418598134257a15d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle009.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 UiComponentTextCommonTextstyle009 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .selectedBackgroundColor(0xffffff) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle010.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle010.ets new file mode 100644 index 0000000000000000000000000000000000000000..d20322f460a559cd0779a71602db97aa704233bc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle010.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 UiComponentTextCommonTextstyle010 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .selectedBackgroundColor('#ff0000') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle011.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle011.ets new file mode 100644 index 0000000000000000000000000000000000000000..3953662199a9bbf305a4cdf57e46247757955fb0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle011.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 UiComponentTextCommonTextstyle011 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .caretStyle({ + width: '10px', + color: '#9E2927' + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle012.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle012.ets new file mode 100644 index 0000000000000000000000000000000000000000..ddfae9e7c2b0e79536233e5c4736795f0eac11e3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle012.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 UiComponentTextCommonTextstyle012 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .caretStyle({ + width: "10vp", + color: '#9E2927' + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle013.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle013.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd87ea55d3713cbf20b0739711f713e15216a7ad --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle013.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 UiComponentTextCommonTextstyle013 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .caretStyle({ + // width: $rawfile('width_10'), + color: '#9E2927' + }) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle014.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle014.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a13644b9d756296a19de9c40d088becc0f75188 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle014.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 UiComponentTextCommonTextstyle014 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .showUnderline(true) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle015.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle015.ets new file mode 100644 index 0000000000000000000000000000000000000000..73dfed52513c4dfe39b2e180a416916c9f1555ce --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle015.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 UiComponentTextCommonTextstyle015 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .showUnderline(false) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle016.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle016.ets new file mode 100644 index 0000000000000000000000000000000000000000..71c789b847c6c4e199eb915497e5a04dea8d65ad --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle016.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 UiComponentTextCommonTextstyle016 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ placeholder: 'underline style' }) + .showUnderline(true) + .width(380) + .height(60) + .showError('Error') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle017.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle017.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5feb21730845cb7e442ffb1f999b18967d39280 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle017.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 UiComponentTextCommonTextstyle017 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Password) + .maxLength(9) + .showPasswordIcon(true) + .passwordIcon( + { + onIconSrc: $r('app.media.icon') + } + ) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle018.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle018.ets new file mode 100644 index 0000000000000000000000000000000000000000..89d04a7f2c8fdfdd3caa36e4dd78029b2663bf56 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle018.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 UiComponentTextCommonTextstyle018 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Password) + .maxLength(9) + .showPasswordIcon(true) + .passwordIcon( + { + offIconSrc: $r('app.media.icon') + } + ) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle019.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle019.ets new file mode 100644 index 0000000000000000000000000000000000000000..00112db875f9afb2de666a966386f785fcc5f695 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle019.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 UiComponentTextCommonTextstyle019 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Default) + .barState(BarState.Off) + .selectionMenuHidden(false) + .selectedBackgroundColor(Color.Blue) + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle020.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle020.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f300c33b15d2ee771dab4d52e6b760ae26b838e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle020.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 UiComponentTextCommonTextstyle020 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .width(400) + .height(50) + .maxLines(5) + .margin(20) + .borderRadius(0) + .style(TextInputStyle.Inline) + .barState(BarState.Off) + .selectionMenuHidden(false) + .selectedBackgroundColor(Color.Blue) + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle023.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle023.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b5fabd7b5a256186a4da90cf51b0e2ad555238c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle023.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 UiComponentTextCommonTextstyle023 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Normal) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle024.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle024.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e167c79fe40c6867d120d4ddf1ad328dfe3cec5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle024.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 UiComponentTextCommonTextstyle024 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Password) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle025.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle025.ets new file mode 100644 index 0000000000000000000000000000000000000000..a9aae3f6a1d801838c58e2438fb801d80c08f1aa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle025.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 UiComponentTextCommonTextstyle025 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Email) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle026.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle026.ets new file mode 100644 index 0000000000000000000000000000000000000000..d375ab81c93ac88d0e4d095ff3c5c0e09481b29f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle026.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 UiComponentTextCommonTextstyle026 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.Number) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle027.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle027.ets new file mode 100644 index 0000000000000000000000000000000000000000..8415bea851e10eb9d7e7ca9b44e1a8c4294a1aba --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle027.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 UiComponentTextCommonTextstyle027 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.PhoneNumber) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle028.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle028.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8f42fa82baf4888abbc9f1ffc84c0f0f529f42f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle028.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 UiComponentTextCommonTextstyle028 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.USER_NAME) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle029.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle029.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2222ed30ea3abdfa04aeb76dd2523de198fa48c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle029.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 UiComponentTextCommonTextstyle029 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.NEW_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle030.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle030.ets new file mode 100644 index 0000000000000000000000000000000000000000..56dc9be8d396a6ac2f3644e83ada60df8c9288fe --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle030.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 UiComponentTextCommonTextstyle030 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.NUMBER_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle031.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle031.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d571a2aa8649b88f16e50ce0aa1bf91b9f73890 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle031.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 UiComponentTextCommonTextstyle031 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle037.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle037.ets new file mode 100644 index 0000000000000000000000000000000000000000..6fdbdb3897d47439cdef5b3d737d09b12fcd93e2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle037.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 UiComponentTextCommonTextstyle037 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .placeholderFont({ size: 20, weight: FontWeight.Bolder, family: 'Arial, HarmonyOS Sans', style: FontStyle.Italic }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle038.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle038.ets new file mode 100644 index 0000000000000000000000000000000000000000..273396d0c38a982dc0ad0c3483363c26b30d40de --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle038.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 UiComponentTextCommonTextstyle038 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .placeholderColor(Color.Blue) + .placeholderFont({ size: 20, weight: FontWeight.Bolder, family: 'Arial, HarmonyOS Sans', style: FontStyle.Italic }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle039.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle039.ets new file mode 100644 index 0000000000000000000000000000000000000000..014fb0906099be93ffc3c37a69cd68fa88daa591 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle039.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 UiComponentTextCommonTextstyle039 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .placeholderColor(0xffffff) + .placeholderFont({ size: 20, weight: FontWeight.Bolder, family: 'Arial, HarmonyOS Sans', style: FontStyle.Italic }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle040.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle040.ets new file mode 100644 index 0000000000000000000000000000000000000000..31b159fc6f39949a5234844cc108150b2cff836d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle040.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 UiComponentTextCommonTextstyle040 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .placeholderColor('rgb(255, 100, 255)') + .placeholderFont({ size: 20, weight: FontWeight.Bolder, family: 'Arial, HarmonyOS Sans', style: FontStyle.Italic }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle041.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle041.ets new file mode 100644 index 0000000000000000000000000000000000000000..b629c8438cd0debc1deb57404930c4e0eec0e804 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle041.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 UiComponentTextCommonTextstyle041 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .placeholderColor($r('app.string.color_yellow')) + .placeholderFont({ size: 20, weight: FontWeight.Bolder, family: 'Arial, HarmonyOS Sans', style: FontStyle.Italic }) + .width('300') + .height(40) + .margin(20) + .type(InputType.SCREEN_LOCK_PASSWORD) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle042.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle042.ets new file mode 100644 index 0000000000000000000000000000000000000000..077a11e0201bcc926afbda7a8d3c0306df2bad93 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle042.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 UiComponentTextCommonTextstyle042 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .caretColor(Color. Blue) + .width('300') + .height(40) + .margin(20) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle043.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle043.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a3acde94f9112f1329ad498040e4044cedd4495 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle043.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 UiComponentTextCommonTextstyle043 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .caretColor(0xffffff) + .width('300') + .height(40) + .margin(20) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle044.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle044.ets new file mode 100644 index 0000000000000000000000000000000000000000..b92a7f9ad5568bce4d1f5d08c8031164429cf3f3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle044.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 UiComponentTextCommonTextstyle044 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .caretColor('rgb(255, 100, 255)') + .width('300') + .height(40) + .margin(20) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle045.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle045.ets new file mode 100644 index 0000000000000000000000000000000000000000..49d7b29f764f4cd7a79ce9299d24067c9151e93b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle045.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 UiComponentTextCommonTextstyle045 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .caretColor($r('app.string.color_yellow')) + .width('300') + .height(40) + .margin(20) + .maxLength(9) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle046.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle046.ets new file mode 100644 index 0000000000000000000000000000000000000000..f1b235be541c5fbbef6007dd3529e29d81f01027 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle046.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 UiComponentTextCommonTextstyle046 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle047.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle047.ets new file mode 100644 index 0000000000000000000000000000000000000000..96668fac1d2927097758043f18a60fe2f0090cda --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle047.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 UiComponentTextCommonTextstyle047 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontColor(Color.Blue) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle048.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle048.ets new file mode 100644 index 0000000000000000000000000000000000000000..ea4227ce6b9cd52c719c146f28a3e84f5cdc3b3a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle048.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 UiComponentTextCommonTextstyle048 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontColor(0xffffff) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle049.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle049.ets new file mode 100644 index 0000000000000000000000000000000000000000..0b26fabd872db7329bbdfeb70bfda524139d2dfb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle049.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 UiComponentTextCommonTextstyle049 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontColor('rgb(255, 100, 255)') + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle050.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle050.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5ebb34252cbf16f68e7f976b8ab1b472223d409 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle050.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 UiComponentTextCommonTextstyle050 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontColor($r('app.string.color_yellow')) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle051.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle051.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a2b544cb7b5f16200590a213abe8012ba68928f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle051.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 UiComponentTextCommonTextstyle051 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontSize(20) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle052.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle052.ets new file mode 100644 index 0000000000000000000000000000000000000000..5c318084bcde03062876559edc3accc713e3a83a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle052.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 UiComponentTextCommonTextstyle052 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontSize('11px') + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle053.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle053.ets new file mode 100644 index 0000000000000000000000000000000000000000..8064b248205426f047bc7d95ddec1f7be3479bf1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle053.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 UiComponentTextCommonTextstyle053 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontSize($r('app.string.size_30')) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle054.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle054.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f6dcefc082ea78966ecc9356c0751303715fe4c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle054.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 UiComponentTextCommonTextstyle054 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontStyle(FontStyle.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle055.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle055.ets new file mode 100644 index 0000000000000000000000000000000000000000..80fbc2e6bfa35bf9f34bef6fe5e8777ed800d428 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle055.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 UiComponentTextCommonTextstyle055 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontStyle(FontStyle.Italic) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle056.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle056.ets new file mode 100644 index 0000000000000000000000000000000000000000..b1f5867534fdece43309de13f94c31418078e214 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle056.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 UiComponentTextCommonTextstyle056 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle057.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle057.ets new file mode 100644 index 0000000000000000000000000000000000000000..c724b88679f580584494f3be15c4cc315fc367a3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle057.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 UiComponentTextCommonTextstyle057 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Lighter) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle058.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle058.ets new file mode 100644 index 0000000000000000000000000000000000000000..39c2ae77b3f7968e9f2a8359a4a3c454566f5911 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle058.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 UiComponentTextCommonTextstyle058 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Regular) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle059.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle059.ets new file mode 100644 index 0000000000000000000000000000000000000000..26cc54e642714b06839fd207b5a0c3826b14be2a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle059.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 UiComponentTextCommonTextstyle059 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Medium) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle060.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle060.ets new file mode 100644 index 0000000000000000000000000000000000000000..43d6a9f9229767b544d871fca696b69ad453a91a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle060.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 UiComponentTextCommonTextstyle060 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Bold) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle061.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle061.ets new file mode 100644 index 0000000000000000000000000000000000000000..293ab435446428ebd9c8d7171a1e07c6f4d0217c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle061.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 UiComponentTextCommonTextstyle061 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Bolder) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle062.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle062.ets new file mode 100644 index 0000000000000000000000000000000000000000..cef66df5178ab53451586f24791e2b70310eed04 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle062.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 UiComponentTextCommonTextstyle062 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontFamily('Arial, HarmonyOS Sans') + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle063.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle063.ets new file mode 100644 index 0000000000000000000000000000000000000000..6e5be5378ef9ba875fea234a1ea81847ce3318c2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle063.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 UiComponentTextCommonTextstyle063 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .inputFilter('[A-Z]', (value: string) => { console.info("testtest" + value) }) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle064.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle064.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ec7423e783826478074db5ea2810d76c446a37f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle064.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 UiComponentTextCommonTextstyle064 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .copyOption(CopyOptions.None) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle065.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle065.ets new file mode 100644 index 0000000000000000000000000000000000000000..d11e81dc1ed0f8fefa504612b05f7826a22ae10d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle065.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 UiComponentTextCommonTextstyle065 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .copyOption(CopyOptions.InApp) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle066.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle066.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dc6f320ed94cee0d4be9f13339b315f002fee46 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle066.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 UiComponentTextCommonTextstyle066 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .copyOption(CopyOptions.LocalDevice) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle067.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle067.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d53318e369851361971f1dde9516611a09e33c8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle067.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 UiComponentTextCommonTextstyle067 { + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .copyOption(CopyOptions.CROSS_DEVICE) + .fontWeight(FontWeight.Normal) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle068.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle068.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d744a31ffd264fdff9c493eb01b15749259049b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle068.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 UiComponentTextCommonTextstyle068 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Normal) + .showPasswordIcon(true) + .type(InputType.Password) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle069.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle069.ets new file mode 100644 index 0000000000000000000000000000000000000000..8185e5c7647b050f455b0ed89c7f3332500c9792 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle069.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 UiComponentTextCommonTextstyle069 { + build() { + Row() { + Column() { + TextInput({ placeholder: 'input your password...' }) + .fontWeight(FontWeight.Normal) + .showPasswordIcon(false) + .type(InputType.Password) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle070.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle070.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9885057b2f51c2ae8bc3708f3d71d49b0b8d55a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle070.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 UiComponentTextCommonTextstyle070 { + @State text: string = `第一行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontWeight(FontWeight.Normal) + .textAlign(TextAlign.Start) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle071.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle071.ets new file mode 100644 index 0000000000000000000000000000000000000000..05561789fc4aebf8ab30360520df1ff611c9a09d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle071.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 UiComponentTextCommonTextstyle071 { + @State text: string = `第一行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontWeight(FontWeight.Normal) + .textAlign(TextAlign.Center) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle072.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle072.ets new file mode 100644 index 0000000000000000000000000000000000000000..de1eaa3ad2ea2e7e312ef90eb21a355478e9a66c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentTextCommonTextStyle/UiComponentTextCommonTextstyle072.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 UiComponentTextCommonTextstyle072 { + @State text: string = `第一行` + + build() { + Row() { + Column() { + TextInput({ text: this.text }) + .fontWeight(FontWeight.Normal) + .textAlign(TextAlign.End) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle001.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle001.ets new file mode 100644 index 0000000000000000000000000000000000000000..f45b027e68b1d12205c91b704b09491a1f05a8de --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle001.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 UiComponentDividerStyle001 { + build() { + Row() { + Column() { + Divider() + .height(22) + .margin({ left: 8, right: 8 }) + .opacity(0.6) + .vertical(true) + .color('#0000ff') + .key('UiComponentDividerStyle001_001') + Divider() + .vertical(false) + .color('#182431') + .strokeWidth(8) + .key('UiComponentDividerStyle001_002') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle002.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle002.ets new file mode 100644 index 0000000000000000000000000000000000000000..bef9254a8e7ec9df84745998361805fbc7a2418e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle002.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 UiComponentDividerStyle002 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(4) + .key('UiComponentDividerStyle002_001') + Text('2') + Divider() + .strokeWidth(4) + .color('#33182431') + .key('UiComponentDividerStyle002_002') + Text('3') + Divider() + .strokeWidth(4) + .color(null) + .key('UiComponentDividerStyle002_003') + Text('4') + Divider() + .strokeWidth(4) + .color(undefined) + .key('UiComponentDividerStyle002_004') + Text('5') + Divider() + .strokeWidth(4) + .color(Color.Blue) + .key('UiComponentDividerStyle002_005') + Text('6') + Divider() + .strokeWidth(4) + .color('#0000ff') + .key('UiComponentDividerStyle002_006') + Text('7') + Divider() + .strokeWidth(4) + .color('rgb(0, 0, 255)') + .key('UiComponentDividerStyle002_007') + Text('8') + Divider() + .strokeWidth(4) + .color(0x0000ff) + .key('UiComponentDividerStyle002_008') + Text('9') + Divider() + .strokeWidth(4) + .color($r('app.color.blue')) + .key('UiComponentDividerStyle002_009') + Text('10') + Divider() + .strokeWidth(4) + .color('@@') + .key('UiComponentDividerStyle002_010') + Text('11') + Divider() + .strokeWidth(4) + .color($r('app.color.start_window_background')) + .key('UiComponentDividerStyle002_011') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle003.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle003.ets new file mode 100644 index 0000000000000000000000000000000000000000..7878a770177a86c60305ded52ef4255cfc4b805e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle003.ets @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct UiComponentDividerStyle003 { + build() { + Row() { + Column() { + Text('1') + Divider() + .key('UiComponentDividerStyle003_001') + Text('2') + Divider() + .strokeWidth(1) + .key('UiComponentDividerStyle003_002') + Text('3') + Divider() + .strokeWidth(null) + .key('UiComponentDividerStyle003_003') + Text('4') + Divider() + .strokeWidth(undefined) + .key('UiComponentDividerStyle003_004') + Text('5') + Divider() + .strokeWidth(5) + .key('UiComponentDividerStyle003_005') + Text('6') + Divider() + .strokeWidth(0) + .key('UiComponentDividerStyle003_006') + Text('7') + Divider() + .strokeWidth(-5) + .key('UiComponentDividerStyle003_007') + Text('8') + Divider() + .strokeWidth('5vp') + .key('UiComponentDividerStyle003_008') + Text('9') + Divider() + .strokeWidth('5px') + .key('UiComponentDividerStyle003_009') + Text('10') + Divider() + .strokeWidth('5fp') + .key('UiComponentDividerStyle003_010') + Text('11') + Divider() + .strokeWidth('5lpx') + .key('UiComponentDividerStyle003_011') + Text('12') + Divider() + .strokeWidth('5abc') + .key('UiComponentDividerStyle003_012') + Text('13') + Divider() + .strokeWidth(5).height(20) + .key('UiComponentDividerStyle003_013') + Text('14') + Divider() + .strokeWidth(20).height(5) + .key('UiComponentDividerStyle003_014') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle004.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle004.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b3b562d0ca051e767bf212a7c4dc40c06a3092f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle004.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 UiComponentDividerStyle004 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(8) + .width(100) + .lineCap(LineCapStyle.Butt) + .key('UiComponentDividerStyle004_001') + Text('2') + Divider() + .strokeWidth(8) + .width(100) + .lineCap(LineCapStyle.Round) + .key('UiComponentDividerStyle004_002') + Text('3') + Divider() + .strokeWidth(8) + .width(100) + .lineCap(LineCapStyle.Square) + .key('UiComponentDividerStyle004_003') + Text('4') + Divider() + .strokeWidth(8) + .width(100) + .lineCap(LineCapStyle.Butt) + .key('UiComponentDividerStyle004_004') + + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle005.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle005.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7240fedfbac867d9bab69b341e95592294c7652 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle005.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 UiComponentDividerStyle005 { + build() { + Row() { + Column() { + Divider() + .vertical(true) + .strokeWidth(8) + .height(100) + .lineCap(LineCapStyle.Butt) + .key('UiComponentDividerStyle005_001') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle006.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle006.ets new file mode 100644 index 0000000000000000000000000000000000000000..27c0ad26f12ee76f6294410295ba863bf011805a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle006.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 UiComponentDividerStyle006 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color(null) + .key('UiComponentDividerStyle006') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle007.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle007.ets new file mode 100644 index 0000000000000000000000000000000000000000..419d405fba2eba47d5b1fde568bd214785697817 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle007.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 UiComponentDividerStyle007 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color(undefined) + .key('UiComponentDividerStyle007') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle008.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle008.ets new file mode 100644 index 0000000000000000000000000000000000000000..c38a714df43fbdf8aab64f691b604c906c30d5d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle008.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 UiComponentDividerStyle008 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color(Color.Blue) + .key('UiComponentDividerStyle008') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle009.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle009.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee14c13ebddf08af0e49edc9b3b0b206e0bf42d1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle009.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 UiComponentDividerStyle009 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color("#0000FF") + .key('UiComponentDividerStyle009') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle010.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle010.ets new file mode 100644 index 0000000000000000000000000000000000000000..807d3b5bc075ec246bbdbe5ac56e40ce14665890 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle010.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 UiComponentDividerStyle010 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color("rgb(0,0,255)") + .key('UiComponentDividerStyle010') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle011.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle011.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd9759c6d2043888bbcf77a839b41a4daa336c9e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle011.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 UiComponentDividerStyle011 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color(0x0000FF) + .key('UiComponentDividerStyle011') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle012.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle012.ets new file mode 100644 index 0000000000000000000000000000000000000000..54f58dd6e8371e5b3044ceb840efe902eff7cf65 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle012.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 UiComponentDividerStyle012 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color($r('app.color.blue')) + .key('UiComponentDividerStyle012') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle013.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle013.ets new file mode 100644 index 0000000000000000000000000000000000000000..9557dfbd0fd9fa1609e38d726247ecc969b35bfa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle013.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 UiComponentDividerStyle013 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color('@@') + .key('UiComponentDividerStyle013') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle014.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle014.ets new file mode 100644 index 0000000000000000000000000000000000000000..c9c0cb2ff46609aff977915cd7651330855f122c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle014.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 UiComponentDividerStyle014 { + build() { + Row() { + Column() { + Divider() + .strokeWidth(8) + .width(100) + .color('#0000ff') + .backgroundColor('#ff0000') + .key('UiComponentDividerStyle014') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle015.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle015.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9c304172d120cbf7ebd220421cc04607c13be40 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle015.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 UiComponentDividerStyle015 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(null) + .width(100) + .key('UiComponentDividerStyle015') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle016.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle016.ets new file mode 100644 index 0000000000000000000000000000000000000000..3eb0cd900f87a6c40cf4f96701426459f7de4cd2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle016.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 UiComponentDividerStyle016 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(undefined) + .width(100) + .key('UiComponentDividerStyle016') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle017.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle017.ets new file mode 100644 index 0000000000000000000000000000000000000000..96fcbb60fe5afed11c4e71913965a2f148ab38a3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle017.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 UiComponentDividerStyle017 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(5) + .width(100) + .key('UiComponentDividerStyle017') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle018.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle018.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8f69ab6a76f53758838f597c3b5c4d317f3921f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle018.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 UiComponentDividerStyle018 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(0) + .width(100) + .key('UiComponentDividerStyle018') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle019.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle019.ets new file mode 100644 index 0000000000000000000000000000000000000000..0750de3ce77f6f2719bc9881e804a163a10c24d2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle019.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 UiComponentDividerStyle019 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(-5) + .width(100) + .key('UiComponentDividerStyle019') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle020.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle020.ets new file mode 100644 index 0000000000000000000000000000000000000000..54c007492b3a88783a564d3b538bf8de402fd058 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle020.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 UiComponentDividerStyle020 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth('5vp') + .width(100) + .key('UiComponentDividerStyle020') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle021.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle021.ets new file mode 100644 index 0000000000000000000000000000000000000000..d2531d5acadbfd40821b3ebd08bffa116fc16d36 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle021.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 UiComponentDividerStyle021 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth('5px') + .width(100) + .key('UiComponentDividerStyle021') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle022.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle022.ets new file mode 100644 index 0000000000000000000000000000000000000000..f779bd3b7837d9e71a6a989d462afb9aed86bea2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle022.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 UiComponentDividerStyle022 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth('5fp') + .width(100) + .key('UiComponentDividerStyle022') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle023.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle023.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcad616a3344d636aea9124297c0936b7abed6e6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle023.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 UiComponentDividerStyle023 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth('5lpx') + .width(100) + .key('UiComponentDividerStyle023') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle024.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle024.ets new file mode 100644 index 0000000000000000000000000000000000000000..e1db5c465af4529d55b710ea27e9cb7450829ab2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle024.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 UiComponentDividerStyle024 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth('5abc') + .width(100) + .key('UiComponentDividerStyle024') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle025.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle025.ets new file mode 100644 index 0000000000000000000000000000000000000000..c50d14f0ff6701d6df9506ddc69f596e72a8d4d1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle025.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 UiComponentDividerStyle025 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(5).height(20) + .width(100) + .key('UiComponentDividerStyle025') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle026.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle026.ets new file mode 100644 index 0000000000000000000000000000000000000000..04e1f6fafe47c470586cc3bacfd0611d377c0ab0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle026.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 UiComponentDividerStyle026 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(20).height(6) + .width(100) + .key('UiComponentDividerStyle026') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle027.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle027.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c7f484705ce90e70c087ea0e08a9c7a0e5567d1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle027.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 UiComponentDividerStyle027 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(10) + .lineCap(LineCapStyle.Round) + .width(100) + .key('UiComponentDividerStyle027') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle028.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle028.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9bb04e521e1f120aea1f7b2abdceb190e8ef739 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentDividerStyle/UiComponentDividerStyle028.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 UiComponentDividerStyle028 { + build() { + Row() { + Column() { + Text('1') + Divider() + .strokeWidth(10) + .lineCap(LineCapStyle.Square) + .width(100) + .key('UiComponentDividerStyle028') + } + .width('100%') + .height('100%') + } + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel001.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel001.ets new file mode 100644 index 0000000000000000000000000000000000000000..eb91a51eaa38ce74ca6fb3217aa56fec509793d0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel001.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. + */ + + +@Entry +@Component +struct UiComponentLayoutCommonPixel001 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[index]) + .height(this.defined_height[index]) + .backgroundColor(this.defined_color[index]) + }) + } + .rowsTemplate('1fr') + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel002.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel002.ets new file mode 100644 index 0000000000000000000000000000000000000000..48cd144577ac502e8929ccdf554aa59c9a88c1dc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel002.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 UiComponentLayoutCommonPixel002 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .backgroundColor(this.defined_color[index]) + }) + } + .columnsTemplate('1fr 1fr') + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel003.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel003.ets new file mode 100644 index 0000000000000000000000000000000000000000..afceea88411b9d2648ccf3ab325813b00dd1179d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel003.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 UiComponentLayoutCommonPixel003 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(80.4) + .height(80.5) + .backgroundColor(this.defined_color[index]) + }) + } + .columnsTemplate('1fr 1fr 1fr 1fr') + .layoutDirection(GridDirection.ColumnReverse) + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel004.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel004.ets new file mode 100644 index 0000000000000000000000000000000000000000..8d171c8db263272a2c6f8b3f19a31c6cc72032b2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel004.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 UiComponentLayoutCommonPixel004 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(80.4) + .height(80.5) + .backgroundColor(this.defined_color[index]) + }) + } + .columnsTemplate('1fr 1fr 1fr 1fr') + .layoutDirection(GridDirection.Column) + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel005.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel005.ets new file mode 100644 index 0000000000000000000000000000000000000000..57c4dbb13eab9edf2989367feacfa779c9358fd1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel005.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 UiComponentLayoutCommonPixel005 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(80.4) + .height(80.5) + .backgroundColor(this.defined_color[index]) + }) + } + .rowsTemplate('1fr 1fr 1fr 1fr') + .layoutDirection(GridDirection.RowReverse) + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel006.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel006.ets new file mode 100644 index 0000000000000000000000000000000000000000..57a091520560390da8c7f9f8f1747a0f5b1ff23e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel006.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 UiComponentLayoutCommonPixel006 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(80.4) + .height(80.5) + .backgroundColor(this.defined_color[index]) + }) + } + .rowsTemplate('1fr 1fr 1fr 1fr') + .layoutDirection(GridDirection.Row) + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel007.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel007.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd6d0ff4dd716a019c3b677a49ee610bf4513aaa --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel007.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 UiComponentLayoutCommonPixel007 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + if(item!=0){ + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + } + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel008.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel008.ets new file mode 100644 index 0000000000000000000000000000000000000000..af08b38036a757ad04a3e8d54e738c2d6a2b2a39 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel008.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 UiComponentLayoutCommonPixel008 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + if(item!=6){ + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + } + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel009.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel009.ets new file mode 100644 index 0000000000000000000000000000000000000000..36fe3227537903da150231ec2143b8d8e3e04bc4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel009.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 UiComponentLayoutCommonPixel009 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + if(item!=6){ + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + } + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel010.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel010.ets new file mode 100644 index 0000000000000000000000000000000000000000..dd459c9276dc2284e65912ea97c548079193a189 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel010.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 UiComponentLayoutCommonPixel010 { + @State Number: number[] = [7, 0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2, 30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4, 80.5] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel011.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel011.ets new file mode 100644 index 0000000000000000000000000000000000000000..cae07435da4b1f61aa7cb326fb503136f7453c8a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel011.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 UiComponentLayoutCommonPixel011 { + @State Number: number[] = [0, 1, 2,7, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2, 30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4, 80.5] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel012.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel012.ets new file mode 100644 index 0000000000000000000000000000000000000000..7c53cd54821fdf4d1d4c5a981b7c47c17a18b06a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel012.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 UiComponentLayoutCommonPixel012 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6,7] + scroller: Scroller = new Scroller() + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2, 30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4, 80.5] + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (item:number) => { + GridItem() { + Text(item.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(this.defined_color[item]) + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width('90%') + .backgroundColor(0xFAEEE0) + .height('90%') + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel024.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel024.ets new file mode 100644 index 0000000000000000000000000000000000000000..2aba6fd17369978c9ee23175c8e106c31101e8ea --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel024.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 UiComponentLayoutCommonPixel024 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .backgroundColor(this.defined_color[index]) + }) + } + .key('UiComponentLayoutCommonPixel024') + .columnsTemplate('1fr 1fr') + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .width(100.5) + .height(100.4) + .backgroundColor(0xFAEEE0) + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel025.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel025.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8fd7a3d7245c1262b93d1654a4d5b1fad3e8423 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel025.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 UiComponentLayoutCommonPixel025 { + @State Number: number[] = [0, 1, 2, 3, 4, 5, 6] + scroller: Scroller = new Scroller() + @State defined_color: Color[] = [Color.Black, Color.Blue, Color.Brown, Color.Gray, Color.Green, Color.Orange,Color.Pink] + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + ForEach(this.Number, (index:number) => { + GridItem() { + Text(index.toString()) + .fontSize(16) + .backgroundColor(0xF9CF93) + .textAlign(TextAlign.Center) + } + .width(80.4) + .height(80.5) + .backgroundColor(this.defined_color[index]) + }) + } + .onScrollIndex((first: number) => { + console.info(first.toString()) + }) + .backgroundColor(0xFAEEE0) + }.width('100%') + .margin({ top: 50 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel026.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel026.ets new file mode 100644 index 0000000000000000000000000000000000000000..d4055a66b4ab2bcf0c5e39e9b9a673b6e4126aec --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel026.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 UiComponentLayoutCommonPixel026 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + if(item!=0){ + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + } + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel027.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel027.ets new file mode 100644 index 0000000000000000000000000000000000000000..59d64b02887d0810c6075c599b3e1b308ad13439 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel027.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 UiComponentLayoutCommonPixel027 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + if(item!=2){ + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + } + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel028.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel028.ets new file mode 100644 index 0000000000000000000000000000000000000000..18d9079c1fe973c06f792906da22e579f1239d4f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel028.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 UiComponentLayoutCommonPixel028 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + if(item!=6){ + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + } + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel029.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel029.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb8a6a55f7c90f75ec5c5546bcbe9a14f9c3e3ee --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel029.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 UiComponentLayoutCommonPixel029 { + private arr: number[] = [7, 0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.5] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel030.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel030.ets new file mode 100644 index 0000000000000000000000000000000000000000..7851c4662216d587c92d8da064c5394d9cc178a6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel030.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 UiComponentLayoutCommonPixel030 { + private arr: number[] = [0, 1, 2, 7, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel031.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel031.ets new file mode 100644 index 0000000000000000000000000000000000000000..c358c7e2437951a560750f0eec68e95514d885ff --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel031.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 UiComponentLayoutCommonPixel031 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6,7] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel042.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel042.ets new file mode 100644 index 0000000000000000000000000000000000000000..623b2cf1f33aade7936b1d367110341d6df30d49 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel042.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 UiComponentLayoutCommonPixel042 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + .listDirection(Axis.Vertical) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel043.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel043.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d845cf1d7b9af49b267a4d5bacfeb9b852b4542 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel043.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 UiComponentLayoutCommonPixel043 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width('90%') + .listDirection(Axis.Horizontal) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel045.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel045.ets new file mode 100644 index 0000000000000000000000000000000000000000..d50753e07a1b4fc8cfe6b998934872ada1184274 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel045.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 UiComponentLayoutCommonPixel045 { + private arr: number[] = [0, 1, 2, 3] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item:number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + .width(this.defined_width[item]) + .height(this.defined_height[item]) + }) + } + .key("UiComponentLayoutCommonPixel045") + .onScrollIndex((firstIndex: number, lastIndex: number) => { + console.info('first' + firstIndex) + console.info('last' + lastIndex) + }) + .width(100.5) + .height(100.4) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel046.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel046.ets new file mode 100644 index 0000000000000000000000000000000000000000..a01a293c9ebec9ca64d65ab84144d52e4db93743 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel046.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 UiComponentLayoutCommonPixel046 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + if(item!=0){ + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + } + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel047.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel047.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c75118f2f3d313ab38c4eea4a6ff6538e87bace --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel047.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 UiComponentLayoutCommonPixel047 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + if(item!=2){ + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + } + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel048.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel048.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8d5fabd6dd8fb86d62c2cc9bfcb0f33212089de --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel048.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 UiComponentLayoutCommonPixel048 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + if(item!=6){ + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + } + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel049.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel049.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b92ec19618040c8a4205a6bf82853c113ea2a7f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel049.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 UiComponentLayoutCommonPixel049 { + scroller: Scroller = new Scroller() + private arr: number[] = [7, 0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel050.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel050.ets new file mode 100644 index 0000000000000000000000000000000000000000..536435420212cb344da1dd175390bf2e3affc1cc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel050.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 UiComponentLayoutCommonPixel050 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2,7, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel051.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel051.ets new file mode 100644 index 0000000000000000000000000000000000000000..f43e7991d7230fee521b86dc1ea54f8f4554060b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel051.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 UiComponentLayoutCommonPixel051 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6,7] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel063.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel063.ets new file mode 100644 index 0000000000000000000000000000000000000000..394621fbd993a552d4676e1d827d9d875eb216c7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel063.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 UiComponentLayoutCommonPixel063 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6,7] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2,30.3] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4,80.5] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .width(100.5) + .height(100.4) + .key("UiComponentLayoutCommonPixel063") + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel066.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel066.ets new file mode 100644 index 0000000000000000000000000000000000000000..a5f8d3f89cce54b452e15d172a67f323987c2388 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel066.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 UiComponentLayoutCommonPixel066 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .scrollable(ScrollDirection.None) + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel068.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel068.ets new file mode 100644 index 0000000000000000000000000000000000000000..264e488cea170579b2c8d6dcb59a84d4a0853451 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel068.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 UiComponentLayoutCommonPixel068 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6] + @State defined_width: number[] = [100.3, 30.2, 30.4, 30.8, 30.8, 30.2, 30.2] + @State defined_height: number[] = [80.4, 80.5, 80.4, 80.5, 80.4, 80.5, 80.4] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item:number) => { + Text(item.toString()) + .width(this.defined_width[item]) + .height(this.defined_height[item]) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }) + }.width('100%') + } + .edgeEffect(EdgeEffect.None) + .onScroll((xOffset: number, yOffset: number) => { + console.info(xOffset + ' ' + yOffset) + }) + .onScrollEdge((side: Edge) => { + console.info('To the edge') + }) + .scrollable(ScrollDirection.Vertical) + .onScrollEnd(() => { + console.info('Scroll Stop') + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface018.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface018.ets new file mode 100644 index 0000000000000000000000000000000000000000..288534f0eaef00661129ec74f71e1aaebdc47914 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface018.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 UiComponentRowcolumnSidebarcontainerInterface018 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: $r('app.media.icon'), + shown: $r('app.media.icon'), + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface019.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface019.ets new file mode 100644 index 0000000000000000000000000000000000000000..19866f8894498e04ecdeb68e24d438a3ccb3b75a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface019.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 UiComponentRowcolumnSidebarcontainerInterface019 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: 'cat.jpg', + shown: 'cat.jpg', + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface020.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface020.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e6f71ab238a0f4429adcc739e7c7de4960e8db3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface020.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 UiComponentRowcolumnSidebarcontainerInterface020 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image('https://img1.baidu.com/it/u=3954245725,1121943782&fm=253&fmt=auto&app=120&f=JPEG?w=640&h=400').width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: 'https://img1.baidu.com/it/u=3954245725,1121943782&fm=253&fmt=auto&app=120&f=JPEG?w=640&h=400', + shown: 'https://img1.baidu.com/it/u=3954245725,1121943782&fm=253&fmt=auto&app=120&f=JPEG?w=640&h=400', + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface021.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface021.ets new file mode 100644 index 0000000000000000000000000000000000000000..f21c391756b2ad49473afb66038829b80b6aa068 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface021.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 UiComponentRowcolumnSidebarcontainerInterface021 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: $r('app.media.icon'), + shown: '2.png', + // shown: '3.bmp', + // shown: '4.svg', + // shown: '5.gif', + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface022.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface022.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d94b6cd4b8fa92650bc43a5b17f234e5eac5982 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface022.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 UiComponentRowcolumnSidebarcontainerInterface022 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: $r('app.media.icon'), + shown: $r('app.media.icon'), + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface023.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface023.ets new file mode 100644 index 0000000000000000000000000000000000000000..b68e8d1e8d5e213adfcddc02524bc4a830841e44 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface023.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 UiComponentRowcolumnSidebarcontainerInterface023 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: $rawfile('cat.jpg'), + shown: $rawfile('cat.jpg'), + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface024.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface024.ets new file mode 100644 index 0000000000000000000000000000000000000000..2337529d7dc73988debefb51a282e9840615241e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface024.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 UiComponentRowcolumnSidebarcontainerInterface024 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: $r('app.media.icon'), + shown: '2.png', + // shown: '3.bmp', + // shown: '4.svg', + // shown: '5.gif', + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface026.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface026.ets new file mode 100644 index 0000000000000000000000000000000000000000..55dda0f9ff41c84913a00b8b2cf8030a94ca6288 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface026.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 UiComponentRowcolumnSidebarcontainerInterface026 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: '@@', + shown: '@@', + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface075.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface075.ets new file mode 100644 index 0000000000000000000000000000000000000000..0506cd35ea8e6def585342f84e8a8e0210a20b38 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface075.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 UiComponentRowcolumnSidebarcontainerInterface075 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider(null) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface076.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface076.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d6e25c7cfd6d67378077353ad41e789b8dce726 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface076.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface076 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth:0 + }) + .key('UiComponentRowcolumnSidebarcontainerInterface076') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface077.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface077.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f87c642907a0f3018dedef4a27445b16d8abdc9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface077.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface077 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth:-10 + }) + .key('UiComponentRowcolumnSidebarcontainerInterface077') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface078.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface078.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c212ee48a1e9e95f5bda4a167a1afc7caa2675d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface078.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 UiComponentRowcolumnSidebarcontainerInterface078 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth:10 + }) + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface079.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface079.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ee7da835f67454ca1702c5e7cd138ccbdd6238c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface079.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface079 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "0" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface079') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface080.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface080.ets new file mode 100644 index 0000000000000000000000000000000000000000..625855a68fe33a0066cae8712f2ebc3c043c2dc0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface080.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface080 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "-10" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface080') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface081.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface081.ets new file mode 100644 index 0000000000000000000000000000000000000000..76abc19d322d6ee38499ba4b2b5fc77a5072cf71 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface081.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface081 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "10" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface081') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface082.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface082.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a19993be3dc4f359e377fc554f6f25a3123c4d5 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface082.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface082 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "10vp" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface082') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface083.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface083.ets new file mode 100644 index 0000000000000000000000000000000000000000..69926a52c0a1f586b4d65f71acef986cc8020b29 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface083.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface083 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "10fp" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface083') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface084.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface084.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6037fc985430c6ba4e9bdc1c9e3c6ebd4ca3367 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface084.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface084 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "10lpx" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface084') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface085.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface085.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec554fdc1404d9e0c59e6c7f87497ab515e55964 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface085.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface085 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "10px" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface085') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface086.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface086.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd2086e855f254835a2ad98857cf59eb30af538c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface086.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface086 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "sdfsdf" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface086') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface087.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface087.ets new file mode 100644 index 0000000000000000000000000000000000000000..b9b192a09b31d69acac9a24e53c053953aab65ac --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface087.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface087 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: "100dd" + }) + .key('UiComponentRowcolumnSidebarcontainerInterface087') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface088.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface088.ets new file mode 100644 index 0000000000000000000000000000000000000000..423d5b8cd116b71e6db87dc419a882116e90ace3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface088.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface088 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text($r('app.string.SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880')).fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: $r("app.string.SUB_ACE_UI_COMPONENT_ROWCOLUMN_SIDEBARCONTAINER_INTERFACE_0880") + }) + .key('UiComponentRowcolumnSidebarcontainerInterface088') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface089.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface089.ets new file mode 100644 index 0000000000000000000000000000000000000000..a026e3d364edf415b2d42aeb83f8867f066f795f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface089.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface089 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text($r('app.string.boardSize_10')).fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: $r("app.string.boardSize_10") + }) + .key('UiComponentRowcolumnSidebarcontainerInterface089') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface090.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface090.ets new file mode 100644 index 0000000000000000000000000000000000000000..eb1d5c5e50977f94316f5442bda92c4d28ba8fb4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface090.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface090 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text($r('app.float.boardSize_10')).fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: $r("app.float.boardSize_10") + }) + .key('UiComponentRowcolumnSidebarcontainerInterface090') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface091.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface091.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf0045da70037b5a85a6048b52ff060a52ddaf59 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface091.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 UiComponentRowcolumnSidebarcontainerInterface091 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + // Text($rawfile('string/rawfile_string')).fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + // strokeWidth: $rawfile('string.rawfile_string') + strokeWidth: 10 + }) + .key('UiComponentRowcolumnSidebarcontainerInterface091') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface092.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface092.ets new file mode 100644 index 0000000000000000000000000000000000000000..4cbd4e69e924a72a6ed543a29e21c4cf573012df --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface092.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 UiComponentRowcolumnSidebarcontainerInterface092 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + color: Color.Blue + }) + .key('UiComponentRowcolumnSidebarcontainerInterface092') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface093.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface093.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c79f25d9e6b9bfcbd99e40d02ed95fd86f78e82 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface093.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 UiComponentRowcolumnSidebarcontainerInterface093 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + color: '#fc0303' + }) + .key('UiComponentRowcolumnSidebarcontainerInterface093') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface094.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface094.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb2ab29375347c69ab451ebbf6a8bb2f4ab7ee68 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface094.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 UiComponentRowcolumnSidebarcontainerInterface094 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + color: 0xff0000 + }) + .key('UiComponentRowcolumnSidebarcontainerInterface094') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface095.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface095.ets new file mode 100644 index 0000000000000000000000000000000000000000..6f8bba9cc81886d9df48d5a1514a360ec979d9c9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface095.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 UiComponentRowcolumnSidebarcontainerInterface095 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + color: 'rgb(2, 184, 17)' + }) + .key('UiComponentRowcolumnSidebarcontainerInterface095') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface096.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface096.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c7591dfe000dade1dcb42d6eccba3b6f5a13d48 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface096.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 UiComponentRowcolumnSidebarcontainerInterface096 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + color: $r('app.color.Pink') + }) + .key('UiComponentRowcolumnSidebarcontainerInterface096') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface097.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface097.ets new file mode 100644 index 0000000000000000000000000000000000000000..84e2637f546b9174d3c73c6f6c87088b9ffbc30d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface097.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. + */ + + +@Entry +@Component +struct UiComponentRowcolumnSidebarcontainerInterface097 { + selectedIcon: Resource = $r("app.media.icon") + @State arr: number[] = [1, 2, 3] + @State value:boolean = true + + build() { + SideBarContainer(SideBarContainerType.Embed) { + Column() { + ForEach(this.arr, (item:number, index) => { + Column({ space: 5 }) { + Image(this.selectedIcon).width(64).height(64) + Text("Index0" + item) + .fontSize(25) + .fontColor('#0A59F7') + } + }) + }.width('100%') + .justifyContent(FlexAlign.SpaceEvenly) + .backgroundColor('#19000000') + Column() { + Text('测试文本').fontSize(25) + } + .margin({ top: 50, left: 20, right: 30 }) + } + .controlButton({ + icons: { + hidden: this.selectedIcon, + shown: this.selectedIcon, + } + }) + .showSideBar(this.value) + .sideBarWidth(150) + .divider({ + strokeWidth: 10, + }) + .key('UiComponentRowcolumnSidebarcontainerInterface097') + .minSideBarWidth(50) + .maxSideBarWidth(300) + .onChange((value) => { + console.info('status:' + value) + }) + } +} \ No newline at end of file diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier001.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier001.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b456e2a489a0f27231213e8dc45f5fa40c767c7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier001.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. + */ + +import {HyperlinkModifier} from "@ohos.arkui.modifier" + +class MyModifier extends HyperlinkModifier { + applyNormalAttribute(instance: HyperlinkAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.color(Color.Pink) + } + public setGroup1() : void { + this.color(0x008000) + } + public setGroup2() : void { + this.color('rgb(255,0,0)') + } + public setGroup3() : void { + this.color($r('app.color.blue')) + } + public setGroup4() : void { + this.color(-1) + } + public setGroup5() : void { + this.color(null) + } +} + +@Component +struct MyHyperlink { + @Link modifier : HyperlinkModifier + build(){ + Hyperlink('https://www.baidu.com/', 'Dynamic HyperlinkModifier') { + } + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier001 { + @State myModifier: HyperlinkModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认蓝色'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认蓝色'+this.index % this.total + } + this.index ++; + }) + MyHyperlink({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier002.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier002.ets new file mode 100644 index 0000000000000000000000000000000000000000..a92745e7c97ff13881b0f9f657daa9f22220883f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier002.ets @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {ImageSpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends ImageSpanModifier { + applyNormalAttribute(instance: ImageSpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.objectFit(ImageFit.Contain) + } + public setGroup1() : void { + this.objectFit(ImageFit.Cover) + } + public setGroup2() : void { + this.objectFit(ImageFit.Auto) + } + public setGroup3() : void { + this.objectFit(ImageFit.Fill) + } + public setGroup4() : void { + this.objectFit(ImageFit.ScaleDown) + } + public setGroup5() : void { + this.objectFit(ImageFit.None) + } + public setGroup6() : void { + this.objectFit(99) + } + public setGroup7() : void { + this.objectFit(0.5) + } + public setGroup8() : void { + this.objectFit(-99) + } + public setGroup9() : void { + this.objectFit(-0.5) + } + public setGroup10() : void { + this.objectFit(undefined) + } +} + +@Component +struct MyImageSpan { + @Link modifier : ImageSpanModifier + build(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier002 { + @State myModifier: ImageSpanModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 11; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Contain'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Cover'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Auto'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'Fill'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'ScaleDown'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'None'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = '99+'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = '0.5+'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = '-99+'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = '-0.5+'+this.index % this.total + } + if(this.index % this.total == 10){ + (this.myModifier as MyModifier).setGroup10() + console.log("Modifier","setGroup10") + this.text = 'undefined+'+this.index % this.total + } + this.index ++; + }) + Text() { + MyImageSpan({modifier:this.myModifier}) + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }).fontSize(25) + } + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier003.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier003.ets new file mode 100644 index 0000000000000000000000000000000000000000..c275d226dfa25074842132190f18a1aeeadf7152 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier003.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. + */ + +import {ImageSpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends ImageSpanModifier { + applyNormalAttribute(instance: ImageSpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.verticalAlign(ImageSpanAlignment.BOTTOM) + } + public setGroup1() : void { + this.verticalAlign(ImageSpanAlignment.TOP) + } + public setGroup2() : void { + this.verticalAlign(ImageSpanAlignment.CENTER) + } + public setGroup3() : void { + this.verticalAlign(ImageSpanAlignment.BASELINE) + } + public setGroup4() : void { + this.verticalAlign(undefined) + } +} + +@Component +struct MyImageSpan { + @Link modifier : ImageSpanModifier + build(){ + ImageSpan($r('app.media.icon')) + .width('200px') + .height('200px') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier003 { + @State myModifier: ImageSpanModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 5; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'BOTTOM'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'TOP'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'CENTER'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'BASELINE'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'undefined'+this.index % this.total + } + this.index ++; + }) + Text() { + MyImageSpan({modifier:this.myModifier}) + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }).fontSize(25) + } + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier004.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier004.ets new file mode 100644 index 0000000000000000000000000000000000000000..8a00c1401be2e0dac1966ac89c82f950c9b23e19 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier004.ets @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {MarqueeModifier} from "@ohos.arkui.modifier" + +class MyModifier extends MarqueeModifier { + applyNormalAttribute(instance: MarqueeAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MyMarquee { + @Link modifier : MarqueeModifier + @State start: boolean = true + private fromStart: boolean = true + private step: number = 50 + private loop: number = Number.POSITIVE_INFINITY + private src: string = "Running Marquee starts rolling" + + build(){ + Marquee({ + start: this.start, + step: this.step, + loop: this.loop, + fromStart: this.fromStart, + src: this.src + }) + .width(360) + .height(80) + .fontSize(48) + .fontWeight(700) + .backgroundColor('#FFFFFF') + .margin({ bottom: 40 }) + .onStart(() => { + console.info('Marquee animation complete onStart') + }) + .onBounce(() => { + console.info('Marquee animation complete onBounce') + }) + .onFinish(() => { + console.info('Marquee animation complete onFinish') + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier004 { + @State myModifier: MarqueeModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认蓝色'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认蓝色'+this.index % this.total + } + this.index ++; + }) + MyMarquee({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier005.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier005.ets new file mode 100644 index 0000000000000000000000000000000000000000..acd8c3bbd181a236afb5f8bfaae0d438cf93b993 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier005.ets @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {MarqueeModifier} from "@ohos.arkui.modifier" + +class MyModifier extends MarqueeModifier { + applyNormalAttribute(instance: MarqueeAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontSize(10) + } + public setGroup1() : void { + this.fontSize('20fp') + } + public setGroup2() : void { + this.fontSize('30%') + } + public setGroup3() : void { + this.fontSize(-1) + } + public setGroup4() : void { + this.fontSize('10abc') + } + public setGroup5() : void { + this.fontSize($r('app.string.size_30')) + } +} + +@Component +struct MyMarquee { + @Link modifier : MarqueeModifier + @State start: boolean = true + private fromStart: boolean = true + private step: number = 50 + private loop: number = Number.POSITIVE_INFINITY + private src: string = "Running Marquee starts rolling" + + build(){ + Marquee({ + start: this.start, + step: this.step, + loop: this.loop, + fromStart: this.fromStart, + src: this.src + }) + .width(360) + .height(80) + .fontWeight(700) + .backgroundColor('#FFFFFF') + .margin({ bottom: 40 }) + .onStart(() => { + console.info('Marquee animation complete onStart') + }) + .onBounce(() => { + console.info('Marquee animation complete onBounce') + }) + .onFinish(() => { + console.info('Marquee animation complete onFinish') + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier005 { + @State myModifier: MarqueeModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp,第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%,第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1,第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc,第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '资源引用30,第'+this.index % this.total + } + this.index ++; + }) + MyMarquee({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier006.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier006.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e84580f71c4ba129c2e48f29407167f55fc7f6e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier006.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. + */ + +import {MarqueeModifier} from "@ohos.arkui.modifier" + +class MyModifier extends MarqueeModifier { + applyNormalAttribute(instance: MarqueeAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.allowScale(true) + } + public setGroup1() : void { + this.allowScale(false) + } +} + +@Component +struct MyMarquee { + @Link modifier : MarqueeModifier + @State start: boolean = true + private fromStart: boolean = true + private step: number = 50 + private loop: number = Number.POSITIVE_INFINITY + private src: string = "Running Marquee starts rolling" + + build(){ + Marquee({ + start: this.start, + step: this.step, + loop: this.loop, + fromStart: this.fromStart, + src: this.src + }) + .width(360) + .height(80) + .fontSize(48) + .fontWeight(700) + .backgroundColor('#FFFFFF') + .margin({ bottom: 40 }) + .onStart(() => { + console.info('Marquee animation complete onStart') + }) + .onBounce(() => { + console.info('Marquee animation complete onBounce') + }) + .onFinish(() => { + console.info('Marquee animation complete onFinish') + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier006 { + @State myModifier: MarqueeModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false,第'+this.index % this.total + } + this.index ++; + }) + MyMarquee({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier007.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier007.ets new file mode 100644 index 0000000000000000000000000000000000000000..1c7e9352792f55547497374d24b5f6f0ed9ea5d8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier007.ets @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {MarqueeModifier} from "@ohos.arkui.modifier" + +class MyModifier extends MarqueeModifier { + applyNormalAttribute(instance: MarqueeAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontWeight(100) + } + public setGroup1() : void { + this.fontWeight(700) + } + public setGroup2() : void { + this.fontWeight(FontWeight.Lighter) + } + public setGroup3() : void { + this.fontWeight(FontWeight.Normal) + } + public setGroup4() : void { + this.fontWeight(FontWeight.Regular) + } + public setGroup5() : void { + this.fontWeight(FontWeight.Medium) + } + public setGroup6() : void { + this.fontWeight(FontWeight.Bold) + } + public setGroup7() : void { + this.fontWeight(FontWeight.Bolder) + } +} + +@Component +struct MyMarquee { + @Link modifier : MarqueeModifier + @State start: boolean = true + private fromStart: boolean = true + private step: number = 50 + private loop: number = Number.POSITIVE_INFINITY + private src: string = "Running Marquee starts rolling" + + build(){ + Marquee({ + start: this.start, + step: this.step, + loop: this.loop, + fromStart: this.fromStart, + src: this.src + }) + .width(360) + .height(80) + .fontSize(48) + .backgroundColor('#FFFFFF') + .margin({ bottom: 40 }) + .onStart(() => { + console.info('Marquee animation complete onStart') + }) + .onBounce(() => { + console.info('Marquee animation complete onBounce') + }) + .onFinish(() => { + console.info('Marquee animation complete onFinish') + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier007 { + @State myModifier: MarqueeModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 8; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '100,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '700,第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Lighter,第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'Normal,第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Regular,第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'Medium,第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'Bold,第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'Bolder,第'+this.index % this.total + } + this.index ++; + }) + MyMarquee({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier008.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier008.ets new file mode 100644 index 0000000000000000000000000000000000000000..2bbd263b36f85595a2c3160337b4d401709fd8db --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier008.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. + */ + +import {MarqueeModifier} from "@ohos.arkui.modifier" + +class MyModifier extends MarqueeModifier { + applyNormalAttribute(instance: MarqueeAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontFamily("HarmonyOS Sans") + } + public setGroup1() : void { + this.fontFamily("Arial") + } +} + +@Component +struct MyMarquee { + @Link modifier : MarqueeModifier + @State start: boolean = true + private fromStart: boolean = true + private step: number = 50 + private loop: number = Number.POSITIVE_INFINITY + private src: string = "Running Marquee starts rolling" + + build(){ + Marquee({ + start: this.start, + step: this.step, + loop: this.loop, + fromStart: this.fromStart, + src: this.src + }) + .width(360) + .height(80) + .fontSize(48) + .fontWeight(700) + .backgroundColor('#FFFFFF') + .margin({ bottom: 40 }) + .onStart(() => { + console.info('Marquee animation complete onStart') + }) + .onBounce(() => { + console.info('Marquee animation complete onBounce') + }) + .onFinish(() => { + console.info('Marquee animation complete onFinish') + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier008 { + @State myModifier: MarqueeModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'HarmonyOS Sans,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'registerFont,第'+this.index % this.total + } + this.index ++; + }) + MyMarquee({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier009.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier009.ets new file mode 100644 index 0000000000000000000000000000000000000000..749865f309c43d46ca26cfa38495168056aaa8ee --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier009.ets @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {RichEditorModifier} from "@ohos.arkui.modifier" + +class MyModifier extends RichEditorModifier { + applyNormalAttribute(instance: RichEditorAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOptions(CopyOptions.None) + } + public setGroup1() : void { + this.copyOptions(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOptions(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOptions(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MyRichEditor { + @Link modifier : RichEditorModifier + controller: RichEditorController = new RichEditorController(); + options: RichEditorOptions = { controller: this.controller }; + private start: number = -1; + private end: number = -1; + @State message: string = "[-1, -1]" + @State content: string = "" + build(){ + RichEditor(this.options) + .onReady(() => { + this.controller.addTextSpan("012345", + { + style: + { + fontColor: Color.Orange, + fontSize: 30 + } + }) + this.controller.addSymbolSpan($r("sys.symbol.ohos_trash"), + { + style: + { + fontSize: 30 + } + }) + this.controller.addTextSpan("56789", + { + style: + { + fontColor: Color.Black, + fontSize: 30 + } + }) + }) + .onSelect((value: RichEditorSelection) => { + this.start = value.selection[0]; + this.end = value.selection[1]; + this.message = "[" + this.start + ", " + this.end + "]" + }) + .aboutToIMEInput((value: RichEditorInsertValue) => { + console.log("---------------------- aboutToIMEInput ----------------------") + console.log("insertOffset:" + value.insertOffset) + console.log("insertValue:" + value.insertValue) + return true; + }) + .onIMEInputComplete((value: RichEditorTextSpanResult) => { + console.log("---------------------- onIMEInputComplete ---------------------") + console.log("spanIndex:" + value.spanPosition.spanIndex) + console.log("spanRange:[" + value.spanPosition.spanRange[0] + "," + value.spanPosition.spanRange[1] + "]") + console.log("offsetInSpan:[" + value.offsetInSpan[0] + "," + value.offsetInSpan[1] + "]") + console.log("value:" + value.value) + }) + .aboutToDelete((value: RichEditorDeleteValue) => { + console.log("---------------------- aboutToDelete --------------------------") + console.log("offset:" + value.offset) + console.log("direction:" + value.direction) + console.log("length:" + value.length) + value.richEditorDeleteSpans.forEach(item => { + console.log("---------------------- item --------------------------") + console.log("spanIndex:" + item.spanPosition.spanIndex) + console.log("spanRange:[" + item.spanPosition.spanRange[0] + "," + item.spanPosition.spanRange[1] + "]") + console.log("offsetInSpan:[" + item.offsetInSpan[0] + "," + item.offsetInSpan[1] + "]") + if (typeof(item as RichEditorImageSpanResult)['imageStyle'] != 'undefined') { + console.log("image:" + (item as RichEditorImageSpanResult).valueResourceStr) + } else { + console.log("text:" + (item as RichEditorTextSpanResult).value) + } + }) + return true; + }) + .onDeleteComplete(() => { + console.log("---------------------- onDeleteComplete ------------------------") + }) + .borderWidth(1) + .borderColor(Color.Green) + .width("100%") + .height("30%") + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier009 { + @State myModifier: RichEditorModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'InApp,第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'LocalDevice,第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'CROSS_DEVICE,第'+this.index % this.total + } + this.index ++; + }) + MyRichEditor({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier010.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier010.ets new file mode 100644 index 0000000000000000000000000000000000000000..05b5c6e6cfb2ca23a94c011c3a5490cfa2477345 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier010.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. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.selectionMenuHidden(true) + } + public setGroup1() : void { + this.selectionMenuHidden(false) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton('SEARCH') + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier010 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true,第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false,第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier011.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier011.ets new file mode 100644 index 0000000000000000000000000000000000000000..09d0d2e8221a4e87fb01c1097c388747d6b95ec8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier011.ets @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.searchButton("SEARCH", + { + fontSize: 10, + fontColor: Color.Pink + }) + } + public setGroup1() : void { + this.searchButton("搜索", + { + fontSize: '20fp', + fontColor: 0x008000 + }) + } + public setGroup2() : void { + this.searchButton("SEARCH", + { + fontSize: '30%', + fontColor: "rgb(255,0,0)" + }) + } + public setGroup3() : void { + this.searchButton("搜索", + { + fontSize: -1, + fontColor: $r('app.color.blue') + }) + } + public setGroup4() : void { + this.searchButton("SEARCH", + { + fontSize: '10abc', + fontColor: -1 + }) + } + public setGroup5() : void { + this.searchButton("搜索", + { + fontSize: $r('app.string.size_30'), + fontColor: null + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier011 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier012.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier012.ets new file mode 100644 index 0000000000000000000000000000000000000000..60277403aed93622b60e61512edf78e188704dc2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier012.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.caretStyle({ + width: 10, + color: Color.Pink + }) + } + public setGroup1() : void { + this.caretStyle({ + width: '20fp', + color: 0x008000 + }) + } + public setGroup2() : void { + this.caretStyle({ + width: -1, + color: 'rgb(255,0,0)' + }) + } + public setGroup3() : void { + this.caretStyle({ + width: '20%', + color: $r('app.color.blue') + }) + } + public setGroup4() : void { + this.caretStyle({ + width: '1.5vp', + color: -1 + }) + } + public setGroup5() : void { + this.caretStyle({ + width: '1.5vp', + color: null + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier012 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier013.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier013.ets new file mode 100644 index 0000000000000000000000000000000000000000..2adb6242859f39c72bb87bd0267109b64ec0d6f0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier013.ets @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.cancelButton({ + style:CancelButtonStyle.INPUT, + icon:{ + size: '16vp', + color: '#99ffffff', + src: ' '} + }) + } + public setGroup1() : void { + this.cancelButton({ + style:CancelButtonStyle.CONSTANT, + icon: { + size: '20vp', + color: '#ff0000', + src: ' '} + }) + } + public setGroup2() : void { + this.cancelButton({ + style:CancelButtonStyle.INVISIBLE, + icon: { + size: '20vp', + color: 0xff0000, + src: ' '} + }) + } + public setGroup3() : void { + this.cancelButton({ + style:CancelButtonStyle.INPUT, + icon: { + size: '20vp', + color: 0xff0000, + src: $r('app.media.icon') } + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier013 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier014.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier014.ets new file mode 100644 index 0000000000000000000000000000000000000000..a31c3fc6fe17cb40c9d1f107bb8e52d325b61dca --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier014.ets @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.searchIcon({ + size: '16vp', + color: '#99ffffff', + src: ' ' + }) + } + public setGroup1() : void { + this.searchIcon({ + size: 20, + color: 0xff0000, + src: $r('app.media.icon') + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier014 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier015.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier015.ets new file mode 100644 index 0000000000000000000000000000000000000000..190d109672f84dcb314478e9dfb2c95fcce025a2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier015.ets @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.enableKeyboardOnFocus(true) + } + public setGroup1() : void { + this.enableKeyboardOnFocus(false) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + @State inputValue: string = "" + @Builder CustomKeyboardBuilder() { + Column() { + Button('x').onClick(() => { + this.controller.stopEditing() + }) + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item:number|string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.inputValue += item + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + .customKeyboard(this.CustomKeyboardBuilder()).margin(10).border({ width: 1 }) + } +} + +@Entry +@Component +struct UiComponentTextModifier015 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier016.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier016.ets new file mode 100644 index 0000000000000000000000000000000000000000..3892cc040d116a8caeeefb0dd55d82281cd72b10 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier016.ets @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier016 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier017.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier017.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f70414a62a5ee6e881b74baa684440fb12e903c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier017.ets @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderColor(Color.Pink) + } + public setGroup1() : void { + this.placeholderColor(0x008000) + } + public setGroup2() : void { + this.placeholderColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.placeholderColor($r('app.color.blue')) + } + public setGroup4() : void { + this.placeholderColor(-1) + } + public setGroup5() : void { + this.placeholderColor(null) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + // .backgroundColor('#F5F5F5') + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier017 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier018.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier018.ets new file mode 100644 index 0000000000000000000000000000000000000000..720d99ab89c94e9dac21461b89a7f50da867ec47 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier018.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. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderFont({ + size:10, + weight :100, + family:'HarmonyOS Sans', + style: FontStyle.Italic + }) + } + public setGroup1() : void { + this.placeholderFont({ + size:-1, + weight :900, + family:'HarmonyOS Sans', + style: FontStyle.Normal + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier018 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier019.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier019.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7855d57d52c1a64372ea2219c8915f94fa806bd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier019.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. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textFont({ + size:10, + weight :100, + family:'HarmonyOS Sans', + style: FontStyle.Italic + }) + } + public setGroup1() : void { + this.textFont({ + size:-1, + weight :900, + family:'HarmonyOS Sans', + style: FontStyle.Normal + }) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier019 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier020.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier020.ets new file mode 100644 index 0000000000000000000000000000000000000000..9fcbed6cd659128d941dc790f094304aef3c7d2f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier020.ets @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOption(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOption(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier020 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier021.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier021.ets new file mode 100644 index 0000000000000000000000000000000000000000..749fa52be7a9e66bae19ba99af44e7b604de52fc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier021.ets @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SearchModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SearchModifier { + applyNormalAttribute(instance: SearchAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textAlign(TextAlign.Start) + } + public setGroup1() : void { + this.textAlign(TextAlign.Center) + } + public setGroup2() : void { + this.textAlign(TextAlign.End) + } + public setGroup3() : void { + this.textAlign(TextAlign.JUSTIFY) + } +} + +@Component +struct MySearch { + @Link modifier : SearchModifier + @State changeValue: string = '测试文本' + @State submitValue: string = '' + controller: SearchController = new SearchController() + + build(){ + Search({ value: this.changeValue, placeholder: 'Type to search...', controller: this.controller }) + .searchButton("搜索") + .width('95%') + .height(40) + .backgroundColor('#F5F5F5') + .placeholderColor(Color.Grey) + .placeholderFont({ size: 14, weight: 400 }) + .textFont({ size: 14, weight: 400 }) + .onSubmit((value: string) => { + this.submitValue = value + }) + .onChange((value: string) => { + this.changeValue = value + }) + .margin(20) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier021 { + @State myModifier: SearchModifier = new MyModifier().width(300).height(300).margin(10) + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySearch({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier022.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier022.ets new file mode 100644 index 0000000000000000000000000000000000000000..db7f727d174e923001d98f7a6a3717ce59482157 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier022.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. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.lineHeight(10) + } + public setGroup1() : void { + this.lineHeight('20fp') + } + public setGroup2() : void { + this.lineHeight('30%') + } + public setGroup3() : void { + this.lineHeight(-1) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier022 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier023.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier023.ets new file mode 100644 index 0000000000000000000000000000000000000000..273a191ccd91ad2a03971a209c56d4ea6000d5c8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier023.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. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textCase(TextCase.Normal) + } + public setGroup1() : void { + this.textCase(TextCase.LowerCase) + } + public setGroup2() : void { + this.textCase(TextCase.UpperCase) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier023 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'LowerCase, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'UpperCase, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier024.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier024.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d8217062d3d3776bea231ebe0554e752115db22 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier024.ets @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.letterSpacing(-5) + } + public setGroup1() : void { + this.letterSpacing(0) + } + public setGroup2() : void { + this.letterSpacing(5) + } + public setGroup3() : void { + this.letterSpacing('10fp') + } + public setGroup4() : void { + this.letterSpacing('10abc') + } + public setGroup5() : void { + this.letterSpacing('20%') + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier024 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '-5, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '5, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '10fp, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '20%, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier025.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier025.ets new file mode 100644 index 0000000000000000000000000000000000000000..85b59c983ab6ab6f49e3af01e952c36b22f94cb2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier025.ets @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.decoration({ type: TextDecorationType.Overline, color: Color.Pink }) + } + public setGroup1() : void { + this.decoration({ type: TextDecorationType.LineThrough, color: 0x008000 }) + } + public setGroup2() : void { + this.decoration({ type: TextDecorationType.Underline, color: 'rgb(255,0,0)' }) + } + public setGroup3() : void { + this.decoration({ type: TextDecorationType.None, color: $r('app.color.blue') }) + } + public setGroup4() : void { + this.decoration({ type: TextDecorationType.LineThrough, color: -1 }) + } + public setGroup5() : void { + this.decoration({ type: TextDecorationType.LineThrough, color: null}) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier025 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier026.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier026.ets new file mode 100644 index 0000000000000000000000000000000000000000..60e2c4f707a1f7d6573a5c24147bfeb1c0c74c51 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier026.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontFamily("HarmonyOS Sans") + } + public setGroup1() : void { + this.fontFamily("HarmonyOS Sans") + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier026 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'HarmonyOS Sans, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'null, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier027.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier027.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a95a739def990dcc15da106c350f0901866a463 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier027.ets @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontWeight(100) + } + public setGroup1() : void { + this.fontWeight(700) + } + public setGroup2() : void { + this.fontWeight(0) + } + public setGroup3() : void { + this.fontWeight(1000) + } + public setGroup4() : void { + this.fontWeight(FontWeight.Lighter) + } + public setGroup5() : void { + this.fontWeight(FontWeight.Normal) + } + public setGroup6() : void { + this.fontWeight(FontWeight.Regular) + } + public setGroup7() : void { + this.fontWeight(FontWeight.Medium) + } + public setGroup8() : void { + this.fontWeight(FontWeight.Bold) + } + public setGroup9() : void { + this.fontWeight(FontWeight.Bolder) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier027 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 10; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '100, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '700, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '1000, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Lighter, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'Regular, 第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'Medium, 第'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = 'Bold, 第'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = 'Bolder, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier028.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier028.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa7761ff86075073fbf72a693faacf555c9adad0 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier028.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontStyle(FontStyle.Normal) + } + public setGroup1() : void { + this.fontStyle(FontStyle.Italic) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier028 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Italic, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier029.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier029.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac390b44a858e3fb721ba39d780ba8d986c416ad --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier029.ets @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontSize(10) + } + public setGroup1() : void { + this.fontSize('20fp') + } + public setGroup2() : void { + this.fontSize('30%') + } + public setGroup3() : void { + this.fontSize(-1) + } + public setGroup4() : void { + this.fontSize('10abc') + } + public setGroup5() : void { + this.fontSize($r('app.string.size_30')) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier029 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '$r, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier030.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier030.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f13f1ee5f4e6526e2093400feb1abfe1daee968 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier030.ets @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .fontSize(12) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier030 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色 , 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier031.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier031.ets new file mode 100644 index 0000000000000000000000000000000000000000..eafda9c60e04509a75e49578a35227aa040458d3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier031.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. + */ + +import {SpanModifier} from "@ohos.arkui.modifier" + +class MyModifier extends SpanModifier { + applyNormalAttribute(instance: SpanAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.font({size:10, weight :100, family:'HarmonyOS Sans', style: FontStyle.Italic}) + } + public setGroup1() : void { + this.font({size:-1, weight :900, family:'HarmonyOS Sans', style: FontStyle.Normal}) + } +} + +@Component +struct MySpan { + @Link modifier : SpanModifier + + build(){ + Text() { + Span('I am Underline-span') + .decoration({ type: TextDecorationType.Underline, color: Color.Red }) + .attributeModifier(this.modifier as MyModifier) + .width('100%') + } + } +} + +@Entry +@Component +struct UiComponentTextModifier031 { + @State myModifier: SpanModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1 , 第'+this.index % this.total + } + this.index ++; + }) + MySpan({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier032.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier032.ets new file mode 100644 index 0000000000000000000000000000000000000000..fbd3c7f4c4be7e0c5bc11013d5a1eec99cc91627 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier032.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. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showCounter( + true, { thresholdPercentage: 50, highlightBorder: true } + ) + } + public setGroup1() : void { + this.showCounter( + true, { thresholdPercentage: 50, highlightBorder: false } + ) + } + public setGroup2() : void { + this.showCounter( + true, { thresholdPercentage: -10, highlightBorder: true } + ) + } + public setGroup3() : void { + this.showCounter( + false, { thresholdPercentage: 10, highlightBorder: true } + ) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(6) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier032 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1 , 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '款式2, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '款式3 , 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier033.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier033.ets new file mode 100644 index 0000000000000000000000000000000000000000..74d2cc86d7143b645a96bb74fbad01523833513e --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier033.ets @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.maxLines(3) + } + public setGroup1() : void { + this.maxLines(-1) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .style(TextContentStyle.INLINE) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier033 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'maxLines=3, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'maxLines=-1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier034.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier034.ets new file mode 100644 index 0000000000000000000000000000000000000000..f986bea45aeb4e25a3df8a27bb837bd47aa372bb --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier034.ets @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.style(TextContentStyle.INLINE) + } + public setGroup1() : void { + this.style(TextContentStyle.DEFAULT) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(50) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier034 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Inline, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Default , 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier035.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier035.ets new file mode 100644 index 0000000000000000000000000000000000000000..19f304d528459bf503f4ef85f4435cdff8df08f1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier035.ets @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.selectionMenuHidden(true) + } + public setGroup1() : void { + this.selectionMenuHidden(false) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier035 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier036.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier036.ets new file mode 100644 index 0000000000000000000000000000000000000000..59e2ae04cf65a776f87ea9ba7516969bd14477d4 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier036.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. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.barState(BarState.Off) + } + public setGroup1() : void { + this.barState(BarState.On) + } + public setGroup2() : void { + this.barState(BarState.Auto) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(20) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .maxLength(4) + .showCounter(true) + .style(TextContentStyle.INLINE) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier036 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Off, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'On, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Auto, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier037.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier037.ets new file mode 100644 index 0000000000000000000000000000000000000000..5eb5e444e61ce2dac0869953bdca73d87233288b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier037.ets @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.maxLength(10) + } + public setGroup1() : void { + this.maxLength(-1) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = `第一行\n第二行\n第三行\n第四行\n第五行` + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + placeholder: 'input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(100) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .showCounter(true) + .style(TextContentStyle.INLINE) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier037 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '-1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier038.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier038.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba5b08a0234878d1117fd48f5d25b2685de0ef10 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier038.ets @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.enableKeyboardOnFocus(true) + } + public setGroup1() : void { + this.enableKeyboardOnFocus(false) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier038 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier039.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier039.ets new file mode 100644 index 0000000000000000000000000000000000000000..2498320413497f6a709b561b2bb07e45d565c1b8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier039.ets @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOption(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOption(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier039 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'InApp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'LocalDevice, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'CROSS_DEVICE, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier040.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier040.ets new file mode 100644 index 0000000000000000000000000000000000000000..50768f2c2e7f59a3f1d69d5a0a3f00132458559f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier040.ets @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontFamily('') + } + public setGroup1() : void { + this.fontFamily('HarmonyOS Sans') + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier040 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'HarmonyOS Sans, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier041.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier041.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c44d29b6b2a7fc7d9777b13526d5b3abcc6e53f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier041.ets @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontWeight(100) + } + public setGroup1() : void { + this.fontWeight(700) + } + public setGroup2() : void { + this.fontWeight(0) + } + public setGroup3() : void { + this.fontWeight(1000) + } + public setGroup4() : void { + this.fontWeight(FontWeight.Lighter) + } + public setGroup5() : void { + this.fontWeight(FontWeight.Normal) + } + public setGroup6() : void { + this.fontWeight(FontWeight.Regular) + } + public setGroup7() : void { + this.fontWeight(FontWeight.Medium) + } + public setGroup8() : void { + this.fontWeight(FontWeight.Bold) + } + public setGroup9() : void { + this.fontWeight(FontWeight.Bolder) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier041 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 10; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '100, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '700, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '1000, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Lighter, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'Regular, 第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'Medium, 第'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = 'Bold, 第'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = 'Bolder, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier042.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier042.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba59a51913e7ad9b47021837efa630f95a88d082 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier042.ets @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontStyle(FontStyle.Normal) + } + public setGroup1() : void { + this.fontStyle(FontStyle.Italic) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier042 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Italic, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier043.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier043.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce1150f0186d494457d3519a7b81ca81a57e850f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier043.ets @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontSize(10) + } + public setGroup1() : void { + this.fontSize('20fp') + } + public setGroup2() : void { + this.fontSize('30%') + } + public setGroup3() : void { + this.fontSize(-1) + } + public setGroup4() : void { + this.fontSize('10abc') + } + public setGroup5() : void { + this.fontSize($r('app.string.size_30')) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .fontColor('#182431') + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier043 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '$r引用, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier044.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier044.ets new file mode 100644 index 0000000000000000000000000000000000000000..0db93213821787bdf3a673f70af50fc23d5d638f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier044.ets @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'The text area can hold an unlimited amount of text. input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier044 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier045.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier045.ets new file mode 100644 index 0000000000000000000000000000000000000000..7009a4d10f7615bbc4028dc382b31d5d84594e0a --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier045.ets @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.caretColor(Color.Pink) + } + public setGroup1() : void { + this.caretColor(0x008000) + } + public setGroup2() : void { + this.caretColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.caretColor($r('app.color.blue')) + } + public setGroup4() : void { + this.caretColor(-1) + } + public setGroup5() : void { + this.caretColor(null) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier045 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier046.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier046.ets new file mode 100644 index 0000000000000000000000000000000000000000..f90a94ac8cedc9c693081e148dafa9619d274ecf --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier046.ets @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textAlign(TextAlign.Start) + } + public setGroup1() : void { + this.textAlign(TextAlign.Center) + } + public setGroup2() : void { + this.textAlign(TextAlign.End) + } + public setGroup3() : void { + this.textAlign(TextAlign.JUSTIFY) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + text: this.text, + placeholder: 'input your word...', + controller: this.controller + }) + .placeholderFont({ size: 16, weight: 400 }) + .width(336) + .height(56) + .margin(20) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier046 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Start, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Center, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'End, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'JUSTIFY, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier047.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier047.ets new file mode 100644 index 0000000000000000000000000000000000000000..b625cd9df65612e37928e0e77fc0d53a507d0788 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier047.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. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderFont({size:10, weight :100, family:'HarmonyOS Sans', style: FontStyle.Italic}) + } + public setGroup1() : void { + this.placeholderFont({size:-1, weight :900, family:'HarmonyOS Sans', style: FontStyle.Normal}) + } + +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + placeholder: 'input your word...', + controller: this.controller + }) + .width(336) + .height(56) + .margin(20) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier047 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier048.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier048.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c2b853f04a9705b08ef36bcc1abe0711009ddd2 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier048.ets @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextAreaModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextAreaModifier { + applyNormalAttribute(instance: TextAreaAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderColor(Color.Pink) + } + public setGroup1() : void { + this.placeholderColor(0x008000) + } + public setGroup2() : void { + this.placeholderColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.placeholderColor($r('app.color.blue')) + } + public setGroup4() : void { + this.placeholderColor(-1) + } + public setGroup5() : void { + this.placeholderColor(null) + } +} + +@Component +struct MyTextArea { + @Link modifier : TextAreaModifier + @State text: string = 'test' + @State counterVisible: boolean = false + @State maxNumber: number = -1 + controller: TextAreaController = new TextAreaController() + + build(){ + TextArea({ + placeholder: 'input your word...', + controller: this.controller + }) + .width(336) + .height(56) + .margin(20) + .showCounter(true) + .backgroundColor('#FFFFFF') + .onChange((value: string) => { + this.text = value + }) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier048 { + @State myModifier: TextAreaModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextArea({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier049.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier049.ets new file mode 100644 index 0000000000000000000000000000000000000000..087f18e34266b5700d25d26eb8f775e833904082 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier049.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.draggable(true) + } + public setGroup1() : void { + this.draggable(false) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'test' + + build(){ + Text('TextAlign set to End.') + .textAlign(TextAlign.End) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .copyOption(CopyOptions.InApp) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier049 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + }.width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier050.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier050.ets new file mode 100644 index 0000000000000000000000000000000000000000..e71e1040f751c6c93e96987bb49476cf112706d7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier050.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.wordBreak(WordBreak.NORMAL) + } + public setGroup1() : void { + this.wordBreak(WordBreak.BREAK_ALL) + } + public setGroup2() : void { + this.wordBreak(WordBreak.BREAK_WORD) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is set wordBreak to WordBreak text content This is set wordBreak to WordBreak text content.' + + build(){ + Text(this.text) + .textAlign(TextAlign.End) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier050 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'NORMAL, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'BREAK_ALL, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'BREAK_WORD, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier051.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier051.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b92cb734a09dece593ea971bfeec46e9bbbfe51 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier051.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textIndent(2) + } + public setGroup1() : void { + this.textIndent('5vp') + } + public setGroup2() : void { + this.textIndent('10%') + } + public setGroup3() : void { + this.textIndent($r('app.string.size_30')) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .textAlign(TextAlign.End) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier051 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '2, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '5vp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '10%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '$r引用, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier052.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier052.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8f4fc90b423ce6e81aa7730e473a1e26c417334 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier052.ets @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.maxFontSize(30) + this.minFontSize(5) + } + public setGroup1() : void { + this.maxFontSize(10) + this.minFontSize(5) + } + public setGroup2() : void { + this.heightAdaptivePolicy(TextHeightAdaptivePolicy.MAX_LINES_FIRST) + } + public setGroup3() : void { + this.heightAdaptivePolicy(TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST) + } + public setGroup4() : void { + this.heightAdaptivePolicy(TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .textAlign(TextAlign.Start) + .fontSize(12) + .border({ width: 1 }) + .maxLines(3) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier052 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 5; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'maxFontSize为30, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'maxFontSize为10, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'maxLines为3, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'MAX_LINES_FIRST, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'MIN_FONT_SIZE_FIRST, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier053.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier053.ets new file mode 100644 index 0000000000000000000000000000000000000000..6aabae0693443b8b5f868ac8c6539209f44190cc --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier053.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textShadow({ radius: 10, color: Color.Black, offsetX: 0, offsetY: 0 }) + } + public setGroup1() : void { + this.textShadow({ radius: 0, color: Color.Black, offsetX: 10, offsetY: 10 }) + } + public setGroup2() : void { + this.textShadow({ radius: -1, color: Color.Black, offsetX: -10, offsetY: -10 }) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier053 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 5vp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '款式2, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier054.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier054.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9b25c14a7872c83a5260302f6c06a9b4ca8326c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier054.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOption(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOption(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier054 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'InApp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'LocalDevice, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'CROSS_DEVICE, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier055.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier055.ets new file mode 100644 index 0000000000000000000000000000000000000000..99af97c8345772f58508c46b3e334b16eb3ac0a6 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier055.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.baselineOffset(0) + } + public setGroup1() : void { + this.baselineOffset(10) + } + public setGroup2() : void { + this.baselineOffset(-10) + } + public setGroup3() : void { + this.baselineOffset('10vp') + } + public setGroup4() : void { + this.baselineOffset('10abc') + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier055 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 5; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '-10, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '10vp, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup3") + this.text = '10abc, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier056.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier056.ets new file mode 100644 index 0000000000000000000000000000000000000000..11290201a607e299089c6cd2cd6d71a1415cb234 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier056.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textCase(TextCase.Normal) + } + public setGroup1() : void { + this.textCase(TextCase.LowerCase) + } + public setGroup2() : void { + this.textCase(TextCase.UpperCase) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier056 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'LowerCase, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'UpperCase, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier057.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier057.ets new file mode 100644 index 0000000000000000000000000000000000000000..7835a21452213dd6aa9b28ae5eb4dd70b9f3de1d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier057.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.letterSpacing(-5) + } + public setGroup1() : void { + this.letterSpacing(0) + } + public setGroup2() : void { + this.letterSpacing(2) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier057 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '-5, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '2, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier058.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier058.ets new file mode 100644 index 0000000000000000000000000000000000000000..5ae54e63defad878765f5143d1869cca3509e386 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier058.ets @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.decoration({ + type: TextDecorationType.Overline, + color: Color.Pink + }) + } + public setGroup1() : void { + this.decoration({ + type: TextDecorationType.LineThrough, + color: 0x008000 + }) + } + public setGroup2() : void { + this.decoration({ + type: TextDecorationType.Underline, + color: 'rgb(255,0,0)' + }) + } + public setGroup3() : void { + this.decoration({ + type: TextDecorationType.None, + color: $r('app.color.blue') + }) + } + public setGroup4() : void { + this.decoration({ + type: TextDecorationType.Underline, + color: -1 + }) + } + public setGroup5() : void { + this.decoration({ + type: TextDecorationType.Underline, + color: null + }) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier058 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier059.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier059.ets new file mode 100644 index 0000000000000000000000000000000000000000..0420943cf4230eb44ba87fdc9d1d220adffd88a9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier059.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.maxLines(-1) + } + public setGroup1() : void { + this.maxLines(0) + } + public setGroup2() : void { + this.maxLines(3) + } + public setGroup3() : void { + this.maxLines(5) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier059 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '3, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '5, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier060.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier060.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a706f7b4612f49964ac0c100179538ec525cea1 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier060.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontFamily('') + } + public setGroup1() : void { + this.fontFamily('HarmonyOS Sans') + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier060 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'null, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'HarmonyOS Sans, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier061.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier061.ets new file mode 100644 index 0000000000000000000000000000000000000000..767cac890e0cd719246fed7932d8264a1149df01 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier061.ets @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontWeight(100) + } + public setGroup1() : void { + this.fontWeight(700) + } + public setGroup2() : void { + this.fontWeight(0) + } + public setGroup3() : void { + this.fontWeight(1000) + } + public setGroup4() : void { + this.fontWeight(FontWeight.Lighter) + } + public setGroup5() : void { + this.fontWeight(FontWeight.Normal) + } + public setGroup6() : void { + this.fontWeight(FontWeight.Regular) + } + public setGroup7() : void { + this.fontWeight(FontWeight.Medium) + } + public setGroup8() : void { + this.fontWeight(FontWeight.Bold) + } + public setGroup9() : void { + this.fontWeight(FontWeight.Bolder) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier061 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 10; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '100, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '700, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '1000, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Lighter, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'Regular, 第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'Medium, 第'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = 'Bold, 第'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = 'Bolder, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier062.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier062.ets new file mode 100644 index 0000000000000000000000000000000000000000..9ae955cc72d86b90b481f7bef7b541e46cc618d7 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier062.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontStyle(FontStyle.Normal) + } + public setGroup1() : void { + this.fontStyle(FontStyle.Italic) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier062 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Italic, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier063.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier063.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8ec7bab5dff1a17fc5833c66d8ce4b6ca503209 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier063.ets @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontSize(10) + } + public setGroup1() : void { + this.fontSize('20fp') + } + public setGroup2() : void { + this.fontSize('30%') + } + public setGroup3() : void { + this.fontSize(-1) + } + public setGroup4() : void { + this.fontSize('10abc') + } + public setGroup5() : void { + this.fontSize($r('app.string.size_30')) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier063 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '$r引用, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier064.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier064.ets new file mode 100644 index 0000000000000000000000000000000000000000..202990dbfea511891763a04ca6a6855b750e88cd --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier064.ets @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier064 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier065.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier065.ets new file mode 100644 index 0000000000000000000000000000000000000000..a3e8e7ad3aeefb4ffec003e034fc8c0297c82fa3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier065.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textAlign(TextAlign.Start) + } + public setGroup1() : void { + this.textAlign(TextAlign.Center) + } + public setGroup2() : void { + this.textAlign(TextAlign.End) + } + public setGroup3() : void { + this.textAlign(TextAlign.JUSTIFY) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier065 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Start, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Center, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'End, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'JUSTIFY, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier066.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier066.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ac3a9463b2b4033552f0771494222034ce81b85 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier066.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.lineHeight(10) + } + public setGroup1() : void { + this.lineHeight(-1) + } + public setGroup2() : void { + this.lineHeight(20) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier066 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '20, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier067.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier067.ets new file mode 100644 index 0000000000000000000000000000000000000000..407b07aabd1f5659ae1ebdbcf4b4ff20a0dce093 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier067.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. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textOverflow({overflow: TextOverflow.None}) + } + public setGroup1() : void { + this.textOverflow({overflow: TextOverflow.Clip}) + } + public setGroup2() : void { + this.textOverflow({overflow: TextOverflow.Ellipsis}) + } + public setGroup3() : void { + this.textOverflow({overflow: TextOverflow.MARQUEE}) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is long text content. This is long text content.This is long text content. This is long text content.This is long text content. This is long text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .maxLines(2) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier067 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Clip, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Ellipsis, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'MARQUEE, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier068.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier068.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9bc9044801fb04588c27156bc0ea45c507dfca3 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier068.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextModifier { + applyNormalAttribute(instance: TextAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.font({size:10, weight :100, family:'HarmonyOS Sans', style: FontStyle.Italic}) + } + public setGroup1() : void { + this.font({size:-1, weight :900, family:'HarmonyOS Sans', style: FontStyle.Normal}) + } +} + +@Component +struct MyText { + @Link modifier : TextModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + Text(this.text) + .fontSize(12) + .border({ width: 1 }) + .padding(10) + .width('100%') + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier068 { + @State myModifier: TextModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyText({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier069.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier069.ets new file mode 100644 index 0000000000000000000000000000000000000000..def76b3e0d774b7a46f953b817e8a52d429c7d16 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier069.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.style(TextInputStyle.Default) + this.maxLines(-1) + } + public setGroup1() : void { + this.style(TextInputStyle.Inline) + this.maxLines(3) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize($r('app.string.size_30')) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier069 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier070.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier070.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d2c33baa1b8757c76491f053de706e3d2a8c137 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier070.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showUnderline(true) + } + public setGroup1() : void { + this.showUnderline(false) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize($r('app.string.size_30')) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier070 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier071.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier071.ets new file mode 100644 index 0000000000000000000000000000000000000000..fc843a23bbcff4e5435f14ca38e2875d2db7e63d --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier071.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showError('Error') + } + public setGroup1() : void { + this.showError() + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize(10) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier071 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Error, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'null, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier072.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier072.ets new file mode 100644 index 0000000000000000000000000000000000000000..91fe85c52431630fad2b0ccce7fc826a58b26233 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier072.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.passwordIcon({onIconSrc:$r('app.media.icon'), offIconSrc:$r('app.media.cat')}) + this.type(InputType.Password) + } + public setGroup1() : void { + this.passwordIcon({onIconSrc:$r('app.media.cat')}) + this.type(InputType.Password) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize(20) + .width('300') + .height(40) + .margin(20) + .maxLength(10) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier072 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier073.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier073.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a59639ec31b70cd45b6be98484ac6a80f883ed8 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier073.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.style(TextContentStyle.DEFAULT) + } + public setGroup1() : void { + this.style(TextContentStyle.INLINE) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is long text content. This is long text content.This is long text content. This is long text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize(20) + .width('100') + .height(40) + .margin(20) + .maxLength(10) + .maxLines(2) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier073 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'DEFAULT, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'INLINE, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier074.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier074.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b7c35bf2005ca6627a1802eabf83262b76a436c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier074.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.selectionMenuHidden(true) + } + public setGroup1() : void { + this.selectionMenuHidden(false) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is long text content. This is long text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .fontSize(20) + .width('100') + .height(40) + .margin(20) + .maxLines(2) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier074 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier075.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier075.ets new file mode 100644 index 0000000000000000000000000000000000000000..f380178abca43d8ed94ee744772d3aaef692fda9 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier075.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.barState(BarState.Off) + } + public setGroup1() : void { + this.barState(BarState.On) + } + public setGroup2() : void { + this.barState(BarState.Auto) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is long text content. This is long text content.' + + build(){ + TextInput({ text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('300') + .height(40) + .margin(20) + .maxLines(3) + .style(TextContentStyle.INLINE) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier075 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'off, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'on, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'auto, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier076.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier076.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8c0e1e8a55f908f2201e984ecc44af42c99e330 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier076.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.enableKeyboardOnFocus(true) + } + public setGroup1() : void { + this.enableKeyboardOnFocus(false) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is long text content. This is long text content.' + + build(){ + TextInput({ text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .style(TextContentStyle.INLINE) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier076 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier077.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier077.ets new file mode 100644 index 0000000000000000000000000000000000000000..1055d28255ba02b558eb0c60dcf52c918c6f3646 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier077.ets @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.caretStyle({ + width: 10 + }) + } + public setGroup1() : void { + this.caretStyle({ + width: '20fp' + }) + } + public setGroup2() : void { + this.caretStyle({ + width: -1 + }) + } + public setGroup3() : void { + this.caretStyle({ + width: '20%' + }) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({ text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLength(10) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier077 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '20%, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier078.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier078.ets new file mode 100644 index 0000000000000000000000000000000000000000..0aab4c554e03c182b632d752d18937d1a270e410 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier078.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.selectedBackgroundColor(Color.Pink) + } + public setGroup1() : void { + this.selectedBackgroundColor(0x008000) + } + public setGroup2() : void { + this.selectedBackgroundColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.selectedBackgroundColor($r('app.color.blue')) + } + public setGroup4() : void { + this.selectedBackgroundColor(-1) + } + public setGroup5() : void { + this.selectedBackgroundColor(null) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier078 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier079.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier079.ets new file mode 100644 index 0000000000000000000000000000000000000000..16d56e8d739ce8a0140a9d435eb74adb587d552c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier079.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.caretPosition(-1) + } + public setGroup1() : void { + this.caretPosition(5) + } + public setGroup2() : void { + this.caretPosition(10) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier079 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '5, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '10, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier080.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier080.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dbd07084232ec3e03c2675643188d24f249082c --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier080.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.caretColor(Color.Pink) + } + public setGroup1() : void { + this.caretColor(0x008000) + } + public setGroup2() : void { + this.caretColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.caretColor($r('app.color.blue')) + } + public setGroup4() : void { + this.caretColor(-1) + } + public setGroup5() : void { + this.caretColor(null) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier080 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier081.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier081.ets new file mode 100644 index 0000000000000000000000000000000000000000..6129f459898cc70b37dfd15407899884f8faef60 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier081.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderFont({size:10, weight :100, family:'HarmonyOS Sans', style: FontStyle.Italic}) + } + public setGroup1() : void { + this.placeholderFont({size:-1, weight :900, family:'HarmonyOS Sans', style: FontStyle.Normal}) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier081 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '款式0, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '款式1, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier082.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier082.ets new file mode 100644 index 0000000000000000000000000000000000000000..474176dabd9e727810a87f3779b158da1798cd3b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier082.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.placeholderColor(Color.Pink) + } + public setGroup1() : void { + this.placeholderColor(0x008000) + } + public setGroup2() : void { + this.placeholderColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.placeholderColor($r('app.color.blue')) + } + public setGroup4() : void { + this.placeholderColor(-1) + } + public setGroup5() : void { + this.placeholderColor(null) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier082 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier083.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier083.ets new file mode 100644 index 0000000000000000000000000000000000000000..14da5536277892b1ca7702454c660fca5eb399ea --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier083.ets @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.type(InputType.Normal) + } + public setGroup1() : void { + this.type(InputType.Password) + } + public setGroup2() : void { + this.type(InputType.Email) + } + public setGroup3() : void { + this.type(InputType.Number) + } + public setGroup4() : void { + this.type(InputType.PhoneNumber) + } + public setGroup5() : void { + this.type(InputType.USER_NAME) + } + public setGroup6() : void { + this.type(InputType.NEW_PASSWORD ) + } + public setGroup7() : void { + this.type(InputType.NUMBER_PASSWORD) + } + public setGroup8() : void { + this.type(InputType.NUMBER_DECIMAL) + } + public setGroup9() : void { + this.type(InputType.SCREEN_LOCK_PASSWORD) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier083 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 10; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Password, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Email, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'Number, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'PhoneNumber, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'USER_NAME, 第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'NEW_PASSWORD, 第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'NUMBER_PASSWORD, 第'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = 'NUMBER_DECIMAL, 第'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = 'SCREEN_LOCK_PASSWORD, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier084.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier084.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d08ef798fd2d7c81df8c5be8fe722c0a178f40b --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier084.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.enterKeyType(EnterKeyType.Go) + } + public setGroup1() : void { + this.enterKeyType(EnterKeyType.Search) + } + public setGroup2() : void { + this.enterKeyType(EnterKeyType.Send) + } + public setGroup3() : void { + this.enterKeyType(EnterKeyType.Next) + } + public setGroup4() : void { + this.enterKeyType(EnterKeyType.Done) + } + public setGroup5() : void { + this.enterKeyType(EnterKeyType.PREVIOUS) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier084 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Go, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Search, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'Send, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'Next, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Done, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'PREVIOUS, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier085.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier085.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2733125a5220fb3f93dca02e7cf7db9988b4d90 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier085.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.maxLength(-1) + } + public setGroup1() : void { + this.maxLength(0) + } + public setGroup2() : void { + this.maxLength(5) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier085 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 3; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '5, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier086.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier086.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad23d5043ebbf2b54d1deb989ced3e4c0962bf86 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier086.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontFamily('') + } + public setGroup1() : void { + this.fontFamily('HarmonyOS Sans') + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier086 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'null, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'HarmonyOS Sans, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier087.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier087.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae380382d50d02d2b4855d51748de3992750128f --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier087.ets @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontWeight(100) + } + public setGroup1() : void { + this.fontWeight(700) + } + public setGroup2() : void { + this.fontWeight(0) + } + public setGroup3() : void { + this.fontWeight(1000) + } + public setGroup4() : void { + this.fontWeight(FontWeight.Lighter) + } + public setGroup5() : void { + this.fontWeight(FontWeight.Normal) + } + public setGroup6() : void { + this.fontWeight(FontWeight.Regular) + } + public setGroup7() : void { + this.fontWeight(FontWeight.Medium) + } + public setGroup8() : void { + this.fontWeight(FontWeight.Bold) + } + public setGroup9() : void { + this.fontWeight(FontWeight.Bolder) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier087 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 10; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '100, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '700, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '0, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '1000, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = 'Lighter, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 6){ + (this.myModifier as MyModifier).setGroup6() + console.log("Modifier","setGroup6") + this.text = 'Regular, 第'+this.index % this.total + } + if(this.index % this.total == 7){ + (this.myModifier as MyModifier).setGroup7() + console.log("Modifier","setGroup7") + this.text = 'Medium, 第'+this.index % this.total + } + if(this.index % this.total == 8){ + (this.myModifier as MyModifier).setGroup8() + console.log("Modifier","setGroup8") + this.text = 'Bold, 第'+this.index % this.total + } + if(this.index % this.total == 9){ + (this.myModifier as MyModifier).setGroup9() + console.log("Modifier","setGroup9") + this.text = 'Bolder, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier088.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier088.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f0004864395da38f4b5ed62781779cf5b4a5522 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier088.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontStyle(FontStyle.Normal) + } + public setGroup1() : void { + this.fontStyle(FontStyle.Italic) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier088 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Normal, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Italic, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier089.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier089.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4f90b1117c637476961a5936664122999eff928 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier089.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontSize(10) + } + public setGroup1() : void { + this.fontSize('20fp') + } + public setGroup2() : void { + this.fontSize('30%') + } + public setGroup3() : void { + this.fontSize(-1) + } + public setGroup4() : void { + this.fontSize('10abc') + } + public setGroup5() : void { + this.fontSize($r('app.string.size_30')) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier089 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '10, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '20fp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '30%, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '-1, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '10abc, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = '$r引用, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier090.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier090.ets new file mode 100644 index 0000000000000000000000000000000000000000..914eae2d7077075f7265b2888cb9b47524cb05be --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier090.ets @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.fontColor(Color.Pink) + } + public setGroup1() : void { + this.fontColor(0x008000) + } + public setGroup2() : void { + this.fontColor('rgb(255,0,0)') + } + public setGroup3() : void { + this.fontColor($r('app.color.blue')) + } + public setGroup4() : void { + this.fontColor(-1) + } + public setGroup5() : void { + this.fontColor(null) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier090 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 6; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = '粉色, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = '绿色, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = '红色, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = '蓝色, 第'+this.index % this.total + } + if(this.index % this.total == 4){ + (this.myModifier as MyModifier).setGroup4() + console.log("Modifier","setGroup4") + this.text = '-1默认色, 第'+this.index % this.total + } + if(this.index % this.total == 5){ + (this.myModifier as MyModifier).setGroup5() + console.log("Modifier","setGroup5") + this.text = 'null默认色, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier091.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier091.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a5ff06cc4e4aded4b1fd6e407a36009ee3aa4da --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier091.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.textAlign(TextAlign.Start) + } + public setGroup1() : void { + this.textAlign(TextAlign.Center) + } + public setGroup2() : void { + this.textAlign(TextAlign.End) + } + public setGroup3() : void { + this.textAlign(TextAlign.JUSTIFY) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier091 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'Start, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'Center, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'End, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'JUSTIFY, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier092.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier092.ets new file mode 100644 index 0000000000000000000000000000000000000000..32a996f673e63760690480e5dcb2ae73975ea729 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier092.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOption(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOption(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier092 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'InApp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'LocalDevice, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'CROSS_DEVICE, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier093.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier093.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe895e9a700f2bcb116f9608d9973200733b1b61 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier093.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showPasswordIcon(true) + } + public setGroup1() : void { + this.showPasswordIcon(false) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({ placeholder: 'input your password...' }) + .type(InputType.Password) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier093 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier094.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier094.ets new file mode 100644 index 0000000000000000000000000000000000000000..0bc4aed91c9efab920daadcb88e7128b608587de --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier094.ets @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showPasswordIcon(true) + } + public setGroup1() : void { + this.showPasswordIcon(false) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({placeholder: 'input your password...' }) + .type(InputType.Password) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier094 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 2; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'true, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'false, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + MyTextInput({modifier:this.myModifier}) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier095.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier095.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d5c3fbecbae4a361454d5b6e8641ec3f01ea749 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier095.ets @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier_show extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.showPasswordIcon(true) + } + public setGroup1() : void { + this.showPasswordIcon(false) + } +} +class MyModifier_copy extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } +} + +@Component +struct MyTextInput_show { + @Link modifier : TextInputModifier + @State text: string = 'This is show text content' + + build(){ + TextInput({placeholder: 'input your password...' }) + .type(InputType.Password) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier_show) + } +} + +@Component +struct MyTextInput_copy { + @Link modifier : TextInputModifier + @State text: string = 'This is copy text content' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier_copy) + } +} + +@Entry +@Component +struct UiComponentTextModifier095 { + @State myModifier_show: TextInputModifier = new MyModifier_show() + @State myModifier_copy: TextInputModifier = new MyModifier_copy() + @State total : number = 2; + @State index_show : number = 0; + @State index_copy : number = 0; + @State text_show : String = 'init'; + @State text_copy : String = 'init'; + + build() { + Column() { + Text((this.text_show).toString()).width(100).height(100) + Button('button_show', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index_show % this.total == 0){ + (this.myModifier_show as MyModifier_show).setGroup0() + console.log("Modifier","setGroup0") + this.text_show = 'show, true, 第'+this.index_show % this.total + } + if(this.index_show % this.total == 1){ + (this.myModifier_show as MyModifier_show).setGroup1() + console.log("Modifier","setGroup1") + this.text_show = 'show, false, 第'+this.index_show % this.total + } + this.index_show ++; + }) + MyTextInput_show({modifier:this.myModifier_show}) + + Text((this.text_copy).toString()).width(100).height(100) + Button('button_copy', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index_copy % this.total == 0){ + (this.myModifier_copy as MyModifier_copy).setGroup0() + console.log("Modifier","setGroup0") + this.text_copy = 'copy, None, 第'+this.index_copy % this.total + } + if(this.index_copy % this.total == 1){ + (this.myModifier_copy as MyModifier_copy).setGroup1() + console.log("Modifier","setGroup1") + this.text_copy = 'copy, Inapp, 第'+this.index_copy % this.total + } + this.index_copy ++; + }) + MyTextInput_copy({modifier:this.myModifier_copy}) + } + .width('100%') + } +} diff --git a/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier096.ets b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier096.ets new file mode 100644 index 0000000000000000000000000000000000000000..b586b9579afb73df71c93ceb884b6b146bd35b02 --- /dev/null +++ b/function/ui_compare/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentTextModifier/UiComponentTextModifier096.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. + */ + +import {TextInputModifier} from "@ohos.arkui.modifier" + +class MyModifier extends TextInputModifier { + applyNormalAttribute(instance: TextInputAttribute) : void{ + super.applyNormalAttribute?.(instance); + } + public setGroup0() : void { + this.copyOption(CopyOptions.None) + } + public setGroup1() : void { + this.copyOption(CopyOptions.InApp) + } + public setGroup2() : void { + this.copyOption(CopyOptions.LocalDevice) + } + public setGroup3() : void { + this.copyOption(CopyOptions.CROSS_DEVICE) + } +} + +@Component +struct MyTextInput { + @Link modifier : TextInputModifier + @State text: string = 'This is text content. This is long text content.' + + build(){ + TextInput({text:this.text, placeholder: 'input your password...' }) + .fontSize(20) + .width('200') + .height(40) + .margin(20) + .maxLines(5) + .attributeModifier(this.modifier as MyModifier) + } +} + +@Entry +@Component +struct UiComponentTextModifier096 { + @State myModifier: TextInputModifier = new MyModifier() + @State total : number = 4; + @State index : number = 0; + @State text : String = 'init'; + + build() { + Column() { + Text((this.text).toString()).width(100).height(100) + Button('button', { type: ButtonType.Capsule, stateEffect: true }) + .margin(10) + .onClick(() => { + console.log("Modifier","onClick") + if(this.index % this.total == 0){ + (this.myModifier as MyModifier).setGroup0() + console.log("Modifier","setGroup0") + this.text = 'None, 第'+this.index % this.total + } + if(this.index % this.total == 1){ + (this.myModifier as MyModifier).setGroup1() + console.log("Modifier","setGroup1") + this.text = 'InApp, 第'+this.index % this.total + } + if(this.index % this.total == 2){ + (this.myModifier as MyModifier).setGroup2() + console.log("Modifier","setGroup2") + this.text = 'LocalDevice, 第'+this.index % this.total + } + if(this.index % this.total == 3){ + (this.myModifier as MyModifier).setGroup3() + console.log("Modifier","setGroup3") + this.text = 'CROSS_DEVICE, 第'+this.index % this.total + } + this.index ++; + }) + MyTextInput({modifier:this.myModifier}) + MyTextInput({modifier:this.myModifier}) + } + .width('100%') + } +} 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 42f75e417f60159d61aa2693e569f54400d13665..e47b00df0363d88f14fe3e36394662e15f79a19b 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 @@ -251,6 +251,258 @@ "testability/pages/UIAttributePositionInterface/UIAttributePositionInterface003", "testability/pages/UIAttributePositionInterface/UIAttributePositionInterface004", "testability/pages/UIAttributePositionInterface/UIAttributePositionInterface005", - "testability/pages/UIAttributePositionInterface/UIAttributePositionInterface006" + "testability/pages/UIAttributePositionInterface/UIAttributePositionInterface006", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle001", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle002", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle003", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle004", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle005", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle006", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle007", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle008", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle009", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle010", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle011", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle012", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle013", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle014", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle015", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle016", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle017", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle018", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle019", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle020", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle021", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle022", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle023", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle024", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle025", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle026", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle027", + "testability/pages/UiComponentDividerStyle/UiComponentDividerStyle028", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel001", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel002", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel003", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel004", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel005", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel006", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel007", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel008", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel009", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel010", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel011", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel012", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel024", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel025", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel026", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel027", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel028", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel029", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel030", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel031", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel042", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel043", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel045", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel046", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel047", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel048", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel049", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel050", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel051", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel063", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel066", + "testability/pages/UiComponentLayoutCommonPixel/UiComponentLayoutCommonPixel068", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface018", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface019", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface020", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface021", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface022", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface023", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface024", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface026", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface075", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface076", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface077", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface078", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface079", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface080", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface081", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface082", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface083", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface084", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface085", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface086", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface087", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface088", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface089", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface090", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface091", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface092", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface093", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface094", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface095", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface096", + "testability/pages/UiComponentRowcolumnSidebarcontainerInterface/UiComponentRowcolumnSidebarcontainerInterface097", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle001", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle002", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle003", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle004", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle005", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle006", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle007", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle008", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle009", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle010", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle011", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle012", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle013", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle014", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle015", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle016", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle017", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle018", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle019", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle020", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle023", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle024", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle025", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle026", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle027", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle028", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle029", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle030", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle031", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle037", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle038", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle039", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle040", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle041", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle042", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle043", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle044", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle045", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle046", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle047", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle048", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle049", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle050", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle051", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle052", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle053", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle054", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle055", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle056", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle057", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle058", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle059", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle060", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle061", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle062", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle063", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle064", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle065", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle066", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle067", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle068", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle069", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle070", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle071", + "testability/pages/UiComponentTextCommonTextstyle/UiComponentTextCommonTextstyle072", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier001", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier002", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier003", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier004", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier005", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier006", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier007", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier008", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier009", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier010", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier011", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier012", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier013", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier014", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier015", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier016", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier017", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier018", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier019", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier020", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier021", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier022", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier023", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier024", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier025", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier026", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier027", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier028", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier029", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier030", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier031", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier032", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier033", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier034", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier035", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier036", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier037", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier038", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier039", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier040", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier041", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier042", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier043", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier044", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier045", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier046", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier047", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier048", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier049", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier050", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier051", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier052", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier053", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier054", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier055", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier056", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier057", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier058", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier059", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier060", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier061", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier062", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier063", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier064", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier065", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier066", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier067", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier068", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier069", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier070", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier071", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier072", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier073", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier074", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier075", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier076", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier077", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier078", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier079", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier080", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier081", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier082", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier083", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier084", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier085", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier086", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier087", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier088", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier089", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier090", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier091", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier092", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier093", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier094", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier095", + "testability/pages/UiComponentTextModifier/UiComponentTextModifier096" ] }