From 3d993d45cd2e7495989fea604d41e86f8cfa006c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Tue, 19 Nov 2024 20:14:28 +0800 Subject: [PATCH] =?UTF-8?q?AlphabetIndexer=E5=90=88=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../ArkUIScrollbarScroll.test.ets | 1305 ++++++++++++++ .../entry/src/ohosTest/ets/test/List.test.ets | 33 + .../UIComponentGridModifier.test.ets | 236 +++ ...ComponentListandgridGridInterface.test.ets | 494 ++++++ .../UIComponentListandgridModifier.test.ets | 195 +++ ...omponentListandgridXommonOnscroll.test.ets | 1172 +++++++++++++ ...IComponentListandgridXommonSmooth.test.ets | 193 +++ ...nentScrollAlphabetindexermodifier.test.ets | 1537 +++++++++++++++++ .../UIComponentScrollScrollExtra.test.ets | 826 +++++++++ .../UIComponentUISupportColor.test.ets | 88 + ...habetindexerAttributeAutocollapse.test.ets | 190 ++ ...omponentListandgridXommonScrollto.test.ets | 388 +++++ .../ArkUIScrollbarScroll100.ets | 72 + .../ArkUIScrollbarScroll130.ets | 39 + .../ArkUIScrollbarScroll140.ets | 39 + .../ArkUIScrollbarScroll150.ets | 53 + .../ArkUIScrollbarScroll160.ets | 50 + .../ArkUIScrollbarScroll170.ets | 50 + .../ArkUIScrollbarScroll190.ets | 64 + .../ArkUIScrollbarScroll200.ets | 70 + .../ArkUIScrollbarScroll230.ets | 52 + .../ArkUIScrollbarScroll240.ets | 52 + .../ArkUIScrollbarScroll250.ets | 53 + .../ArkUIScrollbarScroll260.ets | 71 + .../ArkUIScrollbarScroll270.ets | 71 + .../ArkUIScrollbarScroll280.ets | 68 + .../ArkUIScrollbarScroll290.ets | 48 + .../ArkUIScrollbarScroll30.ets | 53 + .../ArkUIScrollbarScroll300.ets | 48 + .../ArkUIScrollbarScroll320.ets | 61 + .../ArkUIScrollbarScroll330.ets | 67 + .../ArkUIScrollbarScroll360.ets | 52 + .../ArkUIScrollbarScroll370.ets | 52 + .../ArkUIScrollbarScroll380.ets | 53 + .../ArkUIScrollbarScroll390.ets | 47 + .../ArkUIScrollbarScroll40.ets | 39 + .../ArkUIScrollbarScroll400.ets | 48 + .../ArkUIScrollbarScroll420.ets | 60 + .../ArkUIScrollbarScroll430.ets | 66 + .../ArkUIScrollbarScroll460.ets | 56 + .../ArkUIScrollbarScroll470.ets | 56 + .../ArkUIScrollbarScroll480.ets | 57 + .../ArkUIScrollbarScroll490.ets | 52 + .../ArkUIScrollbarScroll50.ets | 39 + .../ArkUIScrollbarScroll500.ets | 52 + .../ArkUIScrollbarScroll520.ets | 64 + .../ArkUIScrollbarScroll530.ets | 70 + .../ArkUIScrollbarScroll560.ets | 56 + .../ArkUIScrollbarScroll570.ets | 56 + .../ArkUIScrollbarScroll580.ets | 56 + .../ArkUIScrollbarScroll590.ets | 51 + .../ArkUIScrollbarScroll60.ets | 49 + .../ArkUIScrollbarScroll600.ets | 51 + .../ArkUIScrollbarScroll620.ets | 61 + .../ArkUIScrollbarScroll630.ets | 67 + .../ArkUIScrollbarScroll660.ets | 96 + .../ArkUIScrollbarScroll670.ets | 96 + .../ArkUIScrollbarScroll70.ets | 49 + .../ArkUIScrollbarScroll700.ets | 94 + .../ArkUIScrollbarScroll710.ets | 101 ++ .../ArkUIScrollbarScroll740.ets | 98 ++ .../ArkUIScrollbarScroll750.ets | 98 ++ .../ArkUIScrollbarScroll770.ets | 94 + .../ArkUIScrollbarScroll780.ets | 99 ++ .../ArkUIScrollbarScroll790.ets | 56 + .../ArkUIScrollbarScroll830.ets | 73 + .../ArkUIScrollbarScroll840.ets | 77 + .../ArkUIScrollbarScroll850.ets | 77 + .../ArkUIScrollbarScroll860.ets | 77 + .../ArkUIScrollbarScroll870.ets | 77 + .../ArkUIScrollbarScroll880.ets | 77 + .../ArkUIScrollbarScroll90.ets | 66 + .../WaterFlowDataSource.ets | 129 ++ .../UIComponentGridModifier0130.ets | 44 + .../UIComponentGridModifier0140.ets | 44 + .../UIComponentGridModifier0150.ets | 44 + .../UIComponentGridModifier0160.ets | 44 + .../UIComponentGridModifier0170.ets | 47 + .../UIComponentGridModifier0180.ets | 46 + .../UIComponentGridModifier0190.ets | 46 + .../UIComponentGridModifier0200.ets | 46 + .../UIComponentGridModifier0230.ets | 45 + .../UIComponentGridModifier0410.ets | 161 ++ .../UIComponentGridModifier0420.ets | 161 ++ .../UIComponentGridModifier0450.ets | 161 ++ .../UIComponentGridModifier0460.ets | 164 ++ .../UIComponentGridModifier0470.ets | 162 ++ ...onentListandgridGridInterface_0100_565.ets | 43 + ...onentListandgridGridInterface_0120_874.ets | 43 + ...onentListandgridGridInterface_0130_440.ets | 43 + ...onentListandgridGridInterface_0190_620.ets | 83 + ...onentListandgridGridInterface_0200_308.ets | 61 + ...onentListandgridGridInterface_0210_300.ets | 79 + ...onentListandgridGridInterface_0230_102.ets | 64 + ...onentListandgridGridInterface_0240_264.ets | 43 + ...onentListandgridGridInterface_0240_486.ets | 64 + ...onentListandgridGridInterface_0250_323.ets | 43 + ...onentListandgridGridInterface_0250_798.ets | 64 + ...onentListandgridGridInterface_0260_891.ets | 64 + ...onentListandgridGridInterface_0270_110.ets | 57 + ...onentListandgridGridInterface_0270_291.ets | 64 + ...onentListandgridGridInterface_0270_967.ets | 43 + ...onentListandgridGridInterface_0280_006.ets | 43 + ...onentListandgridGridInterface_0280_218.ets | 57 + ...onentListandgridGridInterface_0290_722.ets | 57 + ...onentListandgridGridInterface_0300_345.ets | 57 + ...onentListandgridGridInterface_0420_773.ets | 58 + ...onentListandgridGridInterface_0430_891.ets | 58 + ...onentListandgridGridInterface_0440_612.ets | 58 + ...onentListandgridGridInterface_0450_917.ets | 58 + ...onentListandgridGridInterface_0460_322.ets | 58 + ...onentListandgridGridInterface_0470_052.ets | 82 + ...onentListandgridGridInterface_0480_955.ets | 82 + ...onentListandgridGridInterface_0840_624.ets | 195 +++ ...onentListandgridGridInterface_0850_504.ets | 83 + ...ponentListandgridGridInterface_090_321.ets | 43 + .../UIComponentListandgridModifier230.ets | 56 + .../UIComponentListandgridModifier40.ets | 52 + .../UIComponentListandgridModifier470.ets | 50 + .../UIComponentListandgridModifier480.ets | 50 + .../UIComponentListandgridModifier520.ets | 56 + .../UIComponentListandgridModifier760.ets | 56 + .../UIComponentListandgridModifier810.ets | 56 + .../UIComponentListandgridModifier930.ets | 56 + .../UIComponentListandgridModifier980.ets | 56 + ...IComponentListandgridXommonOnscroll100.ets | 62 + ...IComponentListandgridXommonOnscroll110.ets | 61 + ...IComponentListandgridXommonOnscroll120.ets | 61 + ...IComponentListandgridXommonOnscroll130.ets | 61 + ...IComponentListandgridXommonOnscroll140.ets | 61 + ...IComponentListandgridXommonOnscroll150.ets | 61 + ...IComponentListandgridXommonOnscroll160.ets | 102 ++ ...IComponentListandgridXommonOnscroll170.ets | 62 + ...IComponentListandgridXommonOnscroll180.ets | 58 + ...IComponentListandgridXommonOnscroll190.ets | 57 + ...IComponentListandgridXommonOnscroll200.ets | 74 + ...IComponentListandgridXommonOnscroll210.ets | 60 + ...IComponentListandgridXommonOnscroll240.ets | 66 + ...IComponentListandgridXommonOnscroll250.ets | 71 + ...IComponentListandgridXommonOnscroll260.ets | 71 + ...IComponentListandgridXommonOnscroll270.ets | 70 + ...IComponentListandgridXommonOnscroll280.ets | 70 + ...IComponentListandgridXommonOnscroll290.ets | 70 + ...UIComponentListandgridXommonOnscroll30.ets | 53 + ...IComponentListandgridXommonOnscroll300.ets | 70 + ...IComponentListandgridXommonOnscroll310.ets | 70 + ...IComponentListandgridXommonOnscroll330.ets | 61 + ...IComponentListandgridXommonOnscroll340.ets | 65 + ...IComponentListandgridXommonOnscroll350.ets | 61 + ...IComponentListandgridXommonOnscroll360.ets | 55 + ...IComponentListandgridXommonOnscroll380.ets | 58 + ...IComponentListandgridXommonOnscroll390.ets | 60 + ...IComponentListandgridXommonOnscroll400.ets | 60 + ...IComponentListandgridXommonOnscroll410.ets | 63 + ...IComponentListandgridXommonOnscroll420.ets | 61 + ...IComponentListandgridXommonOnscroll430.ets | 61 + ...IComponentListandgridXommonOnscroll450.ets | 57 + ...IComponentListandgridXommonOnscroll460.ets | 55 + ...IComponentListandgridXommonOnscroll470.ets | 83 + ...IComponentListandgridXommonOnscroll500.ets | 91 + ...IComponentListandgridXommonOnscroll510.ets | 89 + ...IComponentListandgridXommonOnscroll520.ets | 91 + ...IComponentListandgridXommonOnscroll530.ets | 90 + ...IComponentListandgridXommonOnscroll540.ets | 90 + ...IComponentListandgridXommonOnscroll550.ets | 90 + ...IComponentListandgridXommonOnscroll560.ets | 88 + ...IComponentListandgridXommonOnscroll570.ets | 88 + ...IComponentListandgridXommonOnscroll590.ets | 86 + ...UIComponentListandgridXommonOnscroll60.ets | 58 + ...IComponentListandgridXommonOnscroll600.ets | 84 + ...UIComponentListandgridXommonOnscroll70.ets | 58 + ...UIComponentListandgridXommonOnscroll80.ets | 57 + ...UIComponentListandgridXommonOnscroll90.ets | 62 + .../WaterFlowDataSource.ets | 129 ++ ...IComponentListandgridXommonScrollto230.ets | 69 + ...IComponentListandgridXommonScrollto370.ets | 82 + ...IComponentListandgridXommonScrollto510.ets | 53 + ...IComponentListandgridXommonScrollto570.ets | 57 + ...IComponentListandgridXommonScrollto580.ets | 57 + ...IComponentListandgridXommonScrollto590.ets | 53 + ...IComponentListandgridXommonScrollto600.ets | 53 + ...IComponentListandgridXommonScrollto610.ets | 55 + ...IComponentListandgridXommonScrollto620.ets | 57 + ...IComponentListandgridXommonScrollto630.ets | 57 + ...IComponentListandgridXommonScrollto640.ets | 81 + ...IComponentListandgridXommonScrollto650.ets | 81 + ...IComponentListandgridXommonScrollto660.ets | 82 + ...IComponentListandgridXommonScrollto670.ets | 82 + ...IComponentListandgridXommonScrollto680.ets | 84 + ...IComponentListandgridXommonScrollto690.ets | 81 + ...IComponentListandgridXommonScrollto700.ets | 81 + ...UIComponentListandgridXommonScrollto90.ets | 51 + .../WaterFlowDataSource.ets | 129 ++ ...UIComponentListandgridXommonSmooth0050.ets | 69 + ...UIComponentListandgridXommonSmooth0060.ets | 68 + ...UIComponentListandgridXommonSmooth0070.ets | 69 + ...UIComponentListandgridXommonSmooth0080.ets | 69 + ...UIComponentListandgridXommonSmooth0110.ets | 68 + ...UIComponentListandgridXommonSmooth0170.ets | 108 ++ ...UIComponentListandgridXommonSmooth0180.ets | 107 ++ ...UIComponentListandgridXommonSmooth0190.ets | 109 ++ ...UIComponentListandgridXommonSmooth0200.ets | 109 ++ .../WaterFlowDataSource.ets | 129 ++ ...mponentScrollAlphabetindexermodifier10.ets | 119 ++ ...ponentScrollAlphabetindexermodifier100.ets | 119 ++ ...onentScrollAlphabetindexermodifier1060.ets | 47 + ...onentScrollAlphabetindexermodifier1070.ets | 47 + ...onentScrollAlphabetindexermodifier1120.ets | 46 + ...onentScrollAlphabetindexermodifier1130.ets | 46 + ...onentScrollAlphabetindexermodifier1140.ets | 47 + ...onentScrollAlphabetindexermodifier1150.ets | 46 + ...onentScrollAlphabetindexermodifier1160.ets | 46 + ...onentScrollAlphabetindexermodifier1550.ets | 44 + ...onentScrollAlphabetindexermodifier1560.ets | 42 + ...onentScrollAlphabetindexermodifier1620.ets | 42 + ...onentScrollAlphabetindexermodifier1630.ets | 41 + ...onentScrollAlphabetindexermodifier1640.ets | 70 + ...onentScrollAlphabetindexermodifier1650.ets | 73 + ...mponentScrollAlphabetindexermodifier20.ets | 121 ++ ...ponentScrollAlphabetindexermodifier290.ets | 119 ++ ...mponentScrollAlphabetindexermodifier30.ets | 121 ++ ...ponentScrollAlphabetindexermodifier300.ets | 119 ++ ...ponentScrollAlphabetindexermodifier310.ets | 119 ++ ...ponentScrollAlphabetindexermodifier320.ets | 119 ++ ...ponentScrollAlphabetindexermodifier330.ets | 119 ++ ...ponentScrollAlphabetindexermodifier340.ets | 118 ++ ...ponentScrollAlphabetindexermodifier350.ets | 118 ++ ...ponentScrollAlphabetindexermodifier360.ets | 118 ++ ...ponentScrollAlphabetindexermodifier370.ets | 118 ++ ...ponentScrollAlphabetindexermodifier380.ets | 118 ++ ...ponentScrollAlphabetindexermodifier390.ets | 119 ++ ...mponentScrollAlphabetindexermodifier40.ets | 121 ++ ...ponentScrollAlphabetindexermodifier400.ets | 119 ++ ...ponentScrollAlphabetindexermodifier410.ets | 119 ++ ...ponentScrollAlphabetindexermodifier420.ets | 119 ++ ...ponentScrollAlphabetindexermodifier430.ets | 119 ++ ...ponentScrollAlphabetindexermodifier440.ets | 119 ++ ...ponentScrollAlphabetindexermodifier450.ets | 119 ++ ...ponentScrollAlphabetindexermodifier460.ets | 119 ++ ...ponentScrollAlphabetindexermodifier470.ets | 119 ++ ...ponentScrollAlphabetindexermodifier480.ets | 119 ++ ...ponentScrollAlphabetindexermodifier490.ets | 119 ++ ...mponentScrollAlphabetindexermodifier50.ets | 121 ++ ...ponentScrollAlphabetindexermodifier500.ets | 119 ++ ...ponentScrollAlphabetindexermodifier510.ets | 119 ++ ...ponentScrollAlphabetindexermodifier520.ets | 118 ++ ...ponentScrollAlphabetindexermodifier530.ets | 118 ++ ...ponentScrollAlphabetindexermodifier540.ets | 118 ++ ...ponentScrollAlphabetindexermodifier550.ets | 118 ++ ...ponentScrollAlphabetindexermodifier560.ets | 118 ++ ...ponentScrollAlphabetindexermodifier570.ets | 118 ++ ...ponentScrollAlphabetindexermodifier580.ets | 118 ++ ...ponentScrollAlphabetindexermodifier590.ets | 118 ++ ...mponentScrollAlphabetindexermodifier60.ets | 119 ++ ...ponentScrollAlphabetindexermodifier600.ets | 118 ++ ...ponentScrollAlphabetindexermodifier610.ets | 118 ++ ...ponentScrollAlphabetindexermodifier620.ets | 118 ++ ...ponentScrollAlphabetindexermodifier680.ets | 73 + ...ponentScrollAlphabetindexermodifier690.ets | 73 + ...mponentScrollAlphabetindexermodifier70.ets | 119 ++ ...ponentScrollAlphabetindexermodifier700.ets | 73 + ...ponentScrollAlphabetindexermodifier710.ets | 73 + ...mponentScrollAlphabetindexermodifier80.ets | 119 ++ ...mponentScrollAlphabetindexermodifier90.ets | 119 ++ ...ponentScrollAlphabetindexermodifier940.ets | 73 + ...ponentScrollAlphabetindexermodifier950.ets | 73 + ...ponentScrollAlphabetindexermodifier960.ets | 73 + .../UIComponentScrollScrollExtra10.ets | 53 + .../UIComponentScrollScrollExtra100.ets | 56 + .../UIComponentScrollScrollExtra110.ets | 56 + .../UIComponentScrollScrollExtra120.ets | 56 + .../UIComponentScrollScrollExtra130.ets | 54 + .../UIComponentScrollScrollExtra140.ets | 54 + .../UIComponentScrollScrollExtra150.ets | 54 + .../UIComponentScrollScrollExtra160.ets | 54 + .../UIComponentScrollScrollExtra170.ets | 54 + .../UIComponentScrollScrollExtra180.ets | 54 + .../UIComponentScrollScrollExtra190.ets | 56 + .../UIComponentScrollScrollExtra20.ets | 85 + .../UIComponentScrollScrollExtra210.ets | 54 + .../UIComponentScrollScrollExtra220.ets | 54 + .../UIComponentScrollScrollExtra230.ets | 66 + .../UIComponentScrollScrollExtra240.ets | 62 + .../UIComponentScrollScrollExtra250.ets | 66 + .../UIComponentScrollScrollExtra260.ets | 67 + .../UIComponentScrollScrollExtra270.ets | 66 + .../UIComponentScrollScrollExtra280.ets | 65 + .../UIComponentScrollScrollExtra290.ets | 62 + .../UIComponentScrollScrollExtra30.ets | 93 + .../UIComponentScrollScrollExtra310.ets | 66 + .../UIComponentScrollScrollExtra320.ets | 66 + .../UIComponentScrollScrollExtra330.ets | 56 + .../UIComponentScrollScrollExtra340.ets | 165 ++ .../UIComponentScrollScrollExtra350.ets | 112 ++ .../UIComponentScrollScrollExtra360.ets | 115 ++ .../UIComponentScrollScrollExtra380.ets | 113 ++ .../UIComponentScrollScrollExtra390.ets | 112 ++ .../UIComponentScrollScrollExtra40.ets | 56 + .../UIComponentScrollScrollExtra400.ets | 110 ++ .../UIComponentScrollScrollExtra410.ets | 110 ++ .../UIComponentScrollScrollExtra430.ets | 110 ++ .../UIComponentScrollScrollExtra440.ets | 110 ++ .../UIComponentScrollScrollExtra50.ets | 59 + .../UIComponentScrollScrollExtra60.ets | 111 ++ .../UIComponentScrollScrollExtra70.ets | 58 + .../UIComponentScrollScrollExtra80.ets | 57 + .../UIComponentScrollScrollExtra90.ets | 57 + .../WaterFlowDataSource.ets | 129 ++ .../UIComponentUisupportColor_0010.ets | 141 ++ .../UIComponentUisupportColor_0020.ets | 141 ++ .../UIComponentUisupportColor_0040.ets | 141 ++ ...AlphabetindexerAttributeAutocollapse20.ets | 80 + ...AlphabetindexerAttributeAutocollapse30.ets | 73 + ...AlphabetindexerAttributeAutocollapse40.ets | 73 + ...AlphabetindexerAttributeAutocollapse50.ets | 73 + .../resources/base/profile/test_pages.json | 308 +++- 316 files changed, 30342 insertions(+), 1 deletion(-) create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets new file mode 100644 index 000000000..a3265728d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test.ets @@ -0,0 +1,1305 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function ArkUIScrollbarScroll() { + + describe('ArkUIScrollbarScroll', () => { + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0030 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0030', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0030 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0030 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0040 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0040', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0040 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0040 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0050 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0050', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0050 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0050 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0130 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0130', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0130 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0130 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0140 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0140', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0140 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0140 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0150 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0150', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0150 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0150 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0230 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0230', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0230 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll230')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0230 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0240 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0240', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0240 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll240')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0240 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0250 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0250', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0250 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll250')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0250 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0360 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0360', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0360 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll360')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0360 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0370 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0370', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0370 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll370')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0370 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0380 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0380', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0380 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll380')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0380 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0460 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0460', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0460 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll460')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0460 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0470 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0470', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0470 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll470')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0470 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0480 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0480', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0480 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll480')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0480 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0560 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0560', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0560 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll560')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0560 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0570 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0570', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0570 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0570 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0580', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0580 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll580')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0580 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0790', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0790 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll790')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0790 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0260 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0260', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0260 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll260')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index3')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0260 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0270 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0270', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0270 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll270')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index3')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0270 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0280 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0280', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0280 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280") + await Utils.sleep(2000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll280')) + await button.click() + await Utils.sleep(500) + let button1: Component = await driver.findComponent(ON.id('index2')) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0280 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0300 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0300', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0300 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll300')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y:center.y},{x: center.x, y: info.bottom},5,20000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0300 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0830 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0830 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0830', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0830 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll830')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0830 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0840 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0840 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0840', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0840 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll840')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0840 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0850 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0850 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0850', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0850 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll850')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0850 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0860 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0860 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0860', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0860 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let Scroll: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll860')); + let info = await Scroll.getBounds(); + let center = await Scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0860 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0870 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0870 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0870', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0870 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll870')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0870 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0880 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0880 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0880', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0880 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll880')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0880 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0500 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0500', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0500 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll500')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0500 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0600 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0600', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0600 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll600')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0600 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0490 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0490 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0490', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0490 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll490')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0490 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0590 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0590', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0590 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll590')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0590 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0290 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0290', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0290 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll290')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0290 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0390 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0390', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0390 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll390')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0390 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0400 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0400', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0400 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll400')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0400 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0060 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0060', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0060 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll60')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0060 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0070 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0070', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0070 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll70')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: center.x, y: info.top},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0070 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0160 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0160', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0160 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll160')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.y,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0160 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0170 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0170', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0170 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll170')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},20,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0170 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0660 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0660 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0660', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0660 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll660')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(center.x, info.top,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0660 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0740 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0740 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0740', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0740 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll740')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},5,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0740 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0670 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0670 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0670', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0670 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll670')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.drag(info.top,center.x,center.x, center.y ); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0670 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0750 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0750 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0750', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0750 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let List: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll750')); + let info = await List.getBounds(); + let center = await List.getBoundsCenter(); + await driver.fling({x: info.top, y: center.y},{x: center.x, y: center.y},20,5000); + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0750 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0320 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0320', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0320 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll320')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0320 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0330 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0330', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0330 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll330_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll330_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0330 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0420 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0420', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0420 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll420')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0420 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0430 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0430', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0430 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll430_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll430_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0430 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0520 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0520', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0520 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll520')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0520 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0530 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0530', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0530 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll530_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll530_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0530 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0620 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0620', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0620 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll620')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0620 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0630 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0630 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0630', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0630 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll630_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll630_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0630 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0090 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0090', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0090 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0090 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0100 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0100', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0100 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll100_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll100_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0100 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0190 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0190', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0190 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll190')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0190 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0200 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0200', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0200 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll200_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll200_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0200 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0700 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0700', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0700 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll700')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0700 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0710 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0710 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0710', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0710 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll710_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll710_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0710 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0770 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0770 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0770', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0770 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll770')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0770 finish.`); + done() + }) + + /** + * @tc.number ARKUI_SCROLLBAR_SCROLL_0780 + * @tc.name ARKUI_SCROLLBAR_SCROLL_0780 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('ARKUI_SCROLLBAR_SCROLL_0780', 0, async (done: Function) => { + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0780 start.`); + Settings.createWindow("testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll780_1')) + let button1: Component = await driver.findComponent(ON.id('ArkUIScrollbarScroll780_2')) + await button.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `ARKUI_SCROLLBAR_SCROLL_0780 finish.`); + done() + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets index 87c82566b..1484098d7 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/List.test.ets @@ -80,6 +80,28 @@ import UIComponentScrollSwiperAcross from './UIComponentScrollSwiperAcrossTest/U import UIComponentScrollSwiperTeace from './UIComponentScrollSwiperTeaceTest/UIComponentScrollSwiperTeace.test'; import UIComponentScrollSwiperDisplaycount from './UIComponentScrollSwiperDisplaycountTest/UIComponentScrollSwiperDisplaycount.test'; import UIComponentScrollSwiperArrowHead from './UIComponentScrollSwiperArrowHeadTest/UIComponentScrollSwiperArrowHead.test'; +import UIComponentListandgridGridInterface + from './UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test' +import UIComponentUisupportColor + from './UIComponentUisupportColorTest/UIComponentUisupportColor.test' +import UIComponentListandgridXommonSmooth + from './UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test' +import UIComponentGridModifier + from './UIComponentGridModifierTest/UIComponentGridModifier.test' +import UIComponentScrollScrollExtra + from './UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test' +import UIComponentScrollAlphabetindexermodifier + from './UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test' +import UIComponentListandgridModifier + from './UIComponentListandgridModifierTest/UIComponentListandgridModifier.test' +import ArkUIScrollbarScroll + from './ArkUIScrollbarScrollTest/ArkUIScrollbarScroll.test' +import UIComponentListandgridXommonScrollto + from './UIComponentListandgridXommonScrolltoTest/UIComponentListandgridXommonScrollto.test' +import UIComponentListandgridXommonOnscroll + from './UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test' +import UiComponentAlphabetindexerAttributeAutocollapse + from './UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test' export default function testsuite() { @@ -137,4 +159,15 @@ export default function testsuite() { UIComponentScrollSwiperTeace(); UIComponentScrollSwiperDisplaycount(); UIComponentScrollSwiperArrowHead(); + UIComponentListandgridGridInterface(); + UIComponentUisupportColor(); + UIComponentListandgridXommonSmooth(); + UIComponentGridModifier(); + UIComponentScrollScrollExtra(); + UIComponentScrollAlphabetindexermodifier(); + UIComponentListandgridModifier(); + ArkUIScrollbarScroll(); + UIComponentListandgridXommonScrollto(); + UIComponentListandgridXommonOnscroll(); + UiComponentAlphabetindexerAttributeAutocollapse(); } \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets new file mode 100644 index 000000000..5c28f4857 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentGridModifierTest/UIComponentGridModifier.test.ets @@ -0,0 +1,236 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentGridModifier() { + + describe('UIComponentGridModifier', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0130"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0130"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0150"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0160"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0170"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0180"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0190"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0200"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0200 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0460"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0470"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0410"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0450"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0450 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 + * @tc.name SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UIComponentGridModifier/UIComponentGridModifier0230"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0230 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets new file mode 100644 index 000000000..5309deda5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridGridInterfaceTest/UIComponentListandgridGridInterface.test.ets @@ -0,0 +1,494 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridGridInterface() { + + describe('UIComponentListandgridGridInterface', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486', 1, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_486 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798', 2, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_798 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891', 3, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0260_891 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291', 4, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_291 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0230_102 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0850_504 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0840_624 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0190_620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0200_308 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0210_300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0470_052 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0480_955 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0300_345 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_218v finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_772 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_772 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0290_722 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0420_773 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0430_891 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0440_612 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0450_917 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0460_322 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0130_440 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0100_565 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_090_321 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0270_967 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0280_006 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0250_323 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0240_264 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_GRID_INTERFACE_0120_874 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets new file mode 100644 index 000000000..beabfac84 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridModifierTest/UIComponentListandgridModifier.test.ets @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridModifier() { + + describe('UIComponentListandgridModifier', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40"); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier230')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480"); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0480 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier520')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier810')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0810 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier760')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0760 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier930')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0930 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridModifier980')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot() + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_MODIFIER_0980 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets new file mode 100644 index 000000000..33258168d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonOnscrollTest/UIComponentListandgridXommonOnscroll.test.ets @@ -0,0 +1,1172 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, } from '@ohos/hypium' +import {PointerMatrix} from '@ohos.UiTest'; + +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridXommonOnscroll() { + + describe('UIComponentListandgridXommonOnscroll', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll330')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y:center.y},{x: center.x, y: info.bottom},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll200')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0200 finish.`); + done(); + + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll340')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll80')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll180')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x: center.x, y:center.y},5,5000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170')); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll170_button')) + await button.click() + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x: info.top, y:center.y},50,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0170_2 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll70')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll60')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll190')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll380')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0380 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll460')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: info.top, y: info.top},{x: center.x, y:center.y},5,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0460 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll450')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0450 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll500')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0500 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll210')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: info.bottom},{x:info.bottom, y:info.top},20,20000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0220 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll30')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x:center.x, y:info.top},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll470')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + await driver.fling({x: center.x, y: center.y},{x:center.x, y:info.top},20,10000); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0480 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll590')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: x , y: info.bottom + }); + pointers.setPoint(0, 1, { + x: x , y: y + }); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0590 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll600')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: x , y: info.top + }); + pointers.setPoint(0, 1, { + x: x , y: y + }); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0600 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll350')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,1000); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0350 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll360')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0360 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll210')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0210 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll30')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll470')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0470 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll240')); + let positionInfo = await scroll.getBoundsCenter() + let info = await scroll.getBounds(); + let x = positionInfo.x + let y = positionInfo.y + let pointers: PointerMatrix = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, {x: x , y: y}); + pointers.setPoint(0, 1, {x: x , y: info.top}); + await driver.injectMultiPointerAction(pointers,600); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0240 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll250')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0250 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll260')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0260 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll270')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0270 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll280')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0280 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll290')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0290 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll300')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0300 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll310')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0310 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll560')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0560 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0570 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll550')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0550 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll510')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0510 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll530')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0530 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll540')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0540 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll520')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0520 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll420')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0420 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll430')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0430 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll410')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0410 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll390')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0390 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll400')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0400 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll110')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll160')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll120')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonOnscroll100')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_0NSCROLL_0100 finish.`); + done() + }) + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets new file mode 100644 index 000000000..bb076aab9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentListandgridXommonSmoothTest/UIComponentListandgridXommonSmooth.test.ets @@ -0,0 +1,193 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridXommonSmooth() { + + describe('UIComponentListandgridXommonSmooth', () => { + +/** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ +it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0050')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0050 finish.`); + done(); +}) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0060')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0060 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0070')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0070 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0080')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0170')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0170 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0180')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0180 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0190')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0190 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonSmooth0200')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SM00TH_0200 finish.`); + done(); + }) + + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets new file mode 100644 index 000000000..4fc2cff1b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollAlphabetindexermodifierTest/UIComponentScrollAlphabetindexermodifier.test.ets @@ -0,0 +1,1537 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function UIComponentScrollAlphabetindexermodifier() { + + describe('UIComponentScrollAlphabetindexermodifier', () => { + 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(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier10')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0010 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier20')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier30')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0030 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier40')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0040 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier50')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0050 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier60')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier70')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier80')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0080 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier90')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier100')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0100 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier290')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier300')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0300 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier310')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier320')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier330')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0330 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier340')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier350')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier360')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier370')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0370 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier380')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier390')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier400')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier410')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier420')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0420 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier430')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0430 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier440')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0440 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier450')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0450 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier460')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0460 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier470')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0470 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier480')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0480 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier490')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0490 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier500')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0500 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier510')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0510 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier520')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier530')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0530 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier540')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0540 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier550')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier560')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier570')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0570 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier580')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0580 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier590')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0590 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier600')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0600 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier610')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0610 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier620')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier680')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0680 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier690')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0690 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier700')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0700 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier710')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0710 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier940')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0940 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier950')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0950 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let Alphabetindexer: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier960')); + let positionInfo = await Alphabetindexer.getBoundsCenter(); + let x = positionInfo.x; + let y = positionInfo.y; + await driver.click(x,y); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_0960 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1060')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1060 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1070')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1120')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1120 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1130')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1140')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1140 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1150')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1150 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1160')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1160 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1550')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1550 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1560')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1560 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620"); + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let scroll: Component = await driver.findComponent(ON.id('UIComponentScrollAlphabetindexermodifier1620')); + let info = await scroll.getBounds(); + let center = await scroll.getBoundsCenter(); + let pointers = PointerMatrix.create(1, 2); + pointers.setPoint(0, 0, { + x: center.x, y: center.y + }); + pointers.setPoint(0, 1, { + x: center.x, y: info.top+10 + }); + await driver.injectMultiPointerAction(pointers, 0); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(1000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1620 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1640 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 start.`); + Settings.createWindow("testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_ALPHABETINDEXERMODIFIER_1650 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets new file mode 100644 index 000000000..d3efb66e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentScrollScrollExtraTest/UIComponentScrollScrollExtra.test.ets @@ -0,0 +1,826 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentScrollScrollExtra() { + + describe('UIComponentScrollScrollExtra', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra10')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0010 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra20')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0020 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0030 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0040 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0050 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra60')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0060 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra70')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0070 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra80')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0080 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra90')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0090 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra100')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0100 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra110')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0110 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra120')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0120 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra130')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0130 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra140')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0140 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra150')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0150 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra160')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0160 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra170')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0170 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra180')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0180 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra190')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0190 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra210')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0210 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra220')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0220 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra230')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra240')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0240 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra250')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra260')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0260 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra270')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0270 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra280')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0280 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra290')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0290 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra310')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0310 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra320')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0330 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra340')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0340 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra350')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0350 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra360')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0360 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra380')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0380 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra390')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0390 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra400')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra410')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0410 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra430')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0430 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 + * @tc.name SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 start.`); + Settings.createWindow("testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentScrollScrollExtra440')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_SCROLL_SCROLL_EXTRA_0440 finish.`); + done(); + }) + + + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets new file mode 100644 index 000000000..80a7ae480 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUISupportColorTest/UIComponentUISupportColor.test.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentUisupportColor() { + + describe('UIComponentUisupportColor', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0010')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0010 finish.`); + done(); + }) + + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0020')); + await button.click(); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0020 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 start.`); + Settings.createWindow("testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040"); + await Utils.sleep(3000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUisupportColor_0040')); + await button.click(); + await Utils.sleep(5000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0040 finish.`); + done(); + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets new file mode 100644 index 000000000..2d74e4b07 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentAlphabetindexerAttributeAutocollapseTest/UiComponentAlphabetindexerAttributeAutocollapse.test.ets @@ -0,0 +1,190 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON ,PointerMatrix} from '@ohos.UiTest' + +export default function UiComponentAlphabetindexerAttributeAutocollapse() { + + describe('UiComponentAlphabetindexerAttributeAutocollapse', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_1 finish.`); + done(); + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20"); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_1 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse50')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0050_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse40')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0040_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse30')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0030_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse20_1')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_2 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 + * @tc.name SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 start.`); + Settings.createWindow("testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20") + await Utils.sleep(3000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('UiComponentAlphabetindexerAttributeAutocollapse20_2')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_ALPHABETINDEXER_ATTRIBUTE_AUTOCOLLAPSE_0020_3 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets new file mode 100644 index 000000000..8121b3ef3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UiComponentListandgridXommonScrolltoTest/UiComponentListandgridXommonScrollto.test.ets @@ -0,0 +1,388 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' +import { Component, Driver, ON } from '@ohos.UiTest' + +export default function UIComponentListandgridXommonScrollto() { + + describe('UIComponentListandgridXommonScrollto', () => { + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto90')); + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0090 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto230')) + await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0230 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto370')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0370 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto510')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0510 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto570')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0570 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto580')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0580 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto590')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0590 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto600')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0600 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto610')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0610 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto620')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0620 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto630')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0630 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto640')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0640 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto650')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0650 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto660')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0660 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto670')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0670 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto680')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0680 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto690')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0690 finish.`); + done() + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 + * @tc.name SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 + * @tc.desc MaxFontSize setting null | undefined Copy of (1) + * @tc.level Level 3 + */ + it('SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 start.`); + Settings.createWindow("testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700") + await Utils.sleep(2000); + let driver: Driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentListandgridXommonScrollto700')) + await button.click() + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_LISTANDGRID_XOMMON_SCROLLTO_0700 finish.`); + done() + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets new file mode 100644 index 000000000..384149f78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100.ets @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll100 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll100_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll100_2') + .onClick(() => { + this.flag = false; + }) + } + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets new file mode 100644 index 000000000..f2b0c1be7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll130 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '1000%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll130') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets new file mode 100644 index 000000000..fa84a72bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll140 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '200%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll140') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets new file mode 100644 index 000000000..1273dd597 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll150 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll150') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets new file mode 100644 index 000000000..0560f8235 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll160 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .id('ArkUIScrollbarScroll160') + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets new file mode 100644 index 000000000..21e283dcf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll170 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll170') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets new file mode 100644 index 000000000..f609a31b3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll190 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Column(){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll190') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .height('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets new file mode 100644 index 000000000..13f932b4d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll200 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Column(){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll200_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll200_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Row }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .height('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets new file mode 100644 index 000000000..614397f3f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll230 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + } + .width('90%') + .initialOffset({xOffset:'0%',yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll230') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets new file mode 100644 index 000000000..a2b63ca17 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll240 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + } + .width('90%') + .initialOffset({xOffset:'0%',yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .margin({bottom:200,right:100}) + .id('ArkUIScrollbarScroll240') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets new file mode 100644 index 000000000..2c01a57bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll250 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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) + } + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0x000000, startMargin: 20, endMargin: 20 }) + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll250') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets new file mode 100644 index 000000000..2c945625c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll260 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + private scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index' + (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.initialOffset({ xOffset: '0%', yOffset: '100%' }) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll260') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets new file mode 100644 index 000000000..bc431c32f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll270 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + private scroller: Scroller = new Scroller() + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + Scroll(this.scroller) { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index' + (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.initialOffset({ xOffset: '0%', yOffset: '100%' }) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll270') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets new file mode 100644 index 000000000..2729c16f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll280 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + @State editFlag: boolean = false + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + if (this.editFlag) { + Button() { + Text("delete").fontSize(16) + }.width('30%').height(40) + .id('index'+ (index)) + .onClick(() => { + if (index != undefined) { + console.info(this.arr[index] + 'Delete') + this.arr.splice(index, 1) + console.info(JSON.stringify(this.arr)) + this.editFlag = false + } + }).stateEffect(true) + } + } + } + }, (item: string) => item) + }.width('90%') + .scrollBar(BarState.Off) + .friction(0.6) + }.width('100%') + + Button('edit list') + .id('ArkUIScrollbarScroll280') + .onClick(() => { + this.editFlag = !this.editFlag + }).margin({ top: 5, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets new file mode 100644 index 000000000..ca1f39b79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll290 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .id('ArkUIScrollbarScroll290') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets new file mode 100644 index 000000000..a86edb6e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll30 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll30') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets new file mode 100644 index 000000000..2c4bf53bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll300 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .id('ArkUIScrollbarScroll300') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets new file mode 100644 index 000000000..d70827df2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll320 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll320') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets new file mode 100644 index 000000000..67b23339d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll330 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll330_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({ top: 30 }) + .id('ArkUIScrollbarScroll330_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets new file mode 100644 index 000000000..a77a2778c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll360 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6,7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:'1000%',yOffset:'0%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + Button('Button') + .margin({bottom:200,right:100}) + .id('ArkUIScrollbarScroll360') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets new file mode 100644 index 000000000..43397e0b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll370 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:'250%',yOffset:0}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll370') + .onClick(() => { + this.arr.push(7, 8, 9, 10); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets new file mode 100644 index 000000000..9de9d2f6c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// xxx.ets +@Entry +@Component +struct ArkUIScrollbarScroll380 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + } + .width('90%') + .initialOffset({xOffset:0,yOffset:'100%'}) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + + Button('Button') + .id('ArkUIScrollbarScroll380') + .onClick(() => { + this.arr.push(7, 8, 9, 10) + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets new file mode 100644 index 000000000..5731f7e7b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll390 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .id('ArkUIScrollbarScroll390') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets new file mode 100644 index 000000000..b42c5802d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll40 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '20%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll40') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets new file mode 100644 index 000000000..b415b9cff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400.ets @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// xxx.ets +@Entry +@Component +struct ArkUIScrollbarScroll400 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .id('ArkUIScrollbarScroll400') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal,state: BarState.On }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets new file mode 100644 index 000000000..e22660691 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll420 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll420') + .onClick(() => { + this.flag = true; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets new file mode 100644 index 000000000..508d4c98e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll430 { + private scroller: Scroller = new Scroller(); + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + @State flag: boolean = false; + + build() { + Column() { + Button('On') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll430_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({ top: 30 }) + .id('ArkUIScrollbarScroll430_2') + .onClick(() => { + this.flag = false; + }) + Stack({ alignContent: Alignment.End }) { + List({ space: 20, initialIndex: 0, scroller: this.scroller }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(100) + .fontSize(16) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(Color.Yellow) + }.backgroundColor(Color.Green) + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Horizontal) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets new file mode 100644 index 000000000..486eed3b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll460 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll460') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets new file mode 100644 index 000000000..eebec487d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll470 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .initialOffset({ xOffset: '0%', yOffset: '30%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll470') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets new file mode 100644 index 000000000..c832eac12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll480 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (day: string) => { + ForEach(this.arr, (day: string) => { + GridItem() { + Text() + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + Button('Button') + .margin({ bottom: 200, right: 100 }) + .id('ArkUIScrollbarScroll480') + .onClick(() => { + this.arr.push(17, 18, 19, 20); + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets new file mode 100644 index 000000000..081ff5eee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll490 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll490') + .height('50%') + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets new file mode 100644 index 000000000..82554dff8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50.ets @@ -0,0 +1,39 @@ +@Entry +@Component +struct ArkUIScrollbarScroll50 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('90%') + .initialOffset({ xOffset: '0%', yOffset: '100%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll50') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets new file mode 100644 index 000000000..bbdb0d43b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll500 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll500') + .height('50%') + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets new file mode 100644 index 000000000..293307b5c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll520 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll520') + .onClick(() => { + this.flag = true; + }) + } + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('50%') + .width('80%') + .columnsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets new file mode 100644 index 000000000..9d7dac718 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll530 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll530_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll530_2') + .onClick(() => { + this.flag = false; + }) + } + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('50%') + .width('80%') + .columnsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets new file mode 100644 index 000000000..dc3045b74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll560 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '100%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll560') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets new file mode 100644 index 000000000..ffce497bc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll570 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '50%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll570') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets new file mode 100644 index 000000000..c06b6afc8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll580 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .height('20%') + .rowsTemplate('1fr 1fr') + .rowsGap(20) + } + .initialOffset({ xOffset: '0%', yOffset: '0%' }) + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + Button('Button') + .margin({ bottom: 20 }) + .id('ArkUIScrollbarScroll580') + .onClick(() => { + this.arr.push(37, 38, 39, 40); + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets new file mode 100644 index 000000000..e4bebb7c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll590 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll590') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets new file mode 100644 index 000000000..1648637dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll60 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll60') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets new file mode 100644 index 000000000..96775b740 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll600 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Grid() { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll600') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + } + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Horizontal) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets new file mode 100644 index 000000000..bb2d11cc2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll620 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9]; + @State flag: boolean = false; + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll620') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll620') + .onClick(() => { + this.flag = true; + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets new file mode 100644 index 000000000..c7ac43d7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll630 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9]; + @State flag: boolean = false; + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text(item + '') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .id('ArkUIScrollbarScroll630') + .height('50%') + .rowsTemplate('1fr 1fr 1fr') + .rowsGap(20) + .scrollBar(BarState.Off) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll630_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll630_2') + .onClick(() => { + this.flag = false; + }) + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets new file mode 100644 index 000000000..87434ecfe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660.ets @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll660 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll660') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets new file mode 100644 index 000000000..fa606ee02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670.ets @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll670 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + .id('ArkUIScrollbarScroll670') + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets new file mode 100644 index 000000000..f011c6c1d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70.ets @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll70 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + .id('ArkUIScrollbarScroll70') + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets new file mode 100644 index 000000000..6857cea5b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll700 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Row({ space: 2 }) { + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .id('ArkUIScrollbarScroll700') + .onClick(() => { + this.flag = true; + }) + } + + + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets new file mode 100644 index 000000000..3eac1c829 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710.ets @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll710 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Row({ space: 2 }) { + + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll710_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll710_2') + .onClick(() => { + this.flag = false; + }) + } + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('80%') + .height('80%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets new file mode 100644 index 000000000..083ca8792 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740.ets @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll740 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll740') + .layoutDirection(FlexDirection.Row) + .rowsTemplate("1fr 1fr 1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets new file mode 100644 index 000000000..d18885cc7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750.ets @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll750 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + // 即将触底时提前增加数据 + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('ArkUIScrollbarScroll750') + .layoutDirection(FlexDirection.Row) + .rowsTemplate("1fr 1fr 1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .scrollBar(BarState.On) + .edgeEffect(EdgeEffect.Spring,{ alwaysEnabled: true }) + } + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets new file mode 100644 index 000000000..aa265e6ff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770.ets @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll770 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Column({ space: 2 }) { + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('90%') + .height('90%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + Button('On') + .id('ArkUIScrollbarScroll770') + .onClick(() => { + this.flag = true; + }) + } + + + + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets new file mode 100644 index 000000000..a8a19394f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780.ets @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct ArkUIScrollbarScroll780 { + @State minSize: number = 80 + @State maxSize: number = 180 + @State fontSize: number = 24 + @State flag: boolean = false + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F] + scroller: Scroller = new Scroller() + dataSource: WaterFlowDataSource = new WaterFlowDataSource() + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + + build() { + Column({ space: 2 }){ + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll780_1') + .onClick(() => { + this.flag = true; + }) + Button('Off') + .margin({top:30}) + .id('ArkUIScrollbarScroll780_2') + .onClick(() => { + this.flag = false; + }) + + WaterFlow({scroller: this.scroller}) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .rowsTemplate("1fr 1fr 1fr") + .layoutDirection(FlexDirection.Row) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('80%') + .height('80%') + .edgeEffect(EdgeEffect.Spring, { alwaysEnabled: true }) + .scrollBar(BarState.Off) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Horizontal, state: BarState.On }) { + if(this.flag == true){ + Text() + .width(100) + .height(20) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets new file mode 100644 index 000000000..2b10f48f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// xxx.ets +@Entry +@Component +struct ArkUIScrollbarScroll790 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + + build() { + Column() { + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + 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) + } + }, (item: string) => item) + }.margin({ right: 15 }) + .listDirection(Axis.Vertical) // 排列方向 + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0x000000, startMargin: 20, endMargin: 20 }) // 每行之间的分界线 + } + .width('90%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical,state: BarState.On }) + Button('Button') + .id('ArkUIScrollbarScroll790') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100 }) + this.arr.unshift(this.arr[0]-1) + }) + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets new file mode 100644 index 000000000..de81b4cbb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll830 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .id('ArkUIScrollbarScroll830') + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets new file mode 100644 index 000000000..4b618eee1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll840 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll840') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets new file mode 100644 index 000000000..d22a20ce9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll850 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll850') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets new file mode 100644 index 000000000..325e88417 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll860 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .id('ArkUIScrollbarScroll860') + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets new file mode 100644 index 000000000..284a5a5b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll870 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll870') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets new file mode 100644 index 000000000..65cb4b405 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880.ets @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll880 { + @State arr: number[] = [] + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column() { + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.id('ArkUIScrollbarScroll880') + .width("100%") + .height("60%") + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + Text("Scroll Area") + .width("100%") + .height("40%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center) + + }.width("100%") + } + .edgeEffect(EdgeEffect.Spring) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.On) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 30; i++) { + this.arr.push(i) + } + } +} + + + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets new file mode 100644 index 000000000..7abcd4217 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct ArkUIScrollbarScroll90 { + private scroller: Scroller = new Scroller() + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]; + @State flag: boolean = false; + build() { + Row() { + Column(){ + + Button('On') + .margin({bottom:20}) + .id('ArkUIScrollbarScroll90') + .onClick(() => { + this.flag = true; + }) + } + Stack({ alignContent: Alignment.End }) { + Scroll(this.scroller) { + Flex({ direction: FlexDirection.Column }) { + ForEach(this.arr, (item: number) => { + Row() { + Text(item.toString()) + .width('80%') + .height(60) + .backgroundColor('#3366CC') + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }, (item:number) => item.toString()) + }.margin({ right: 15 }) + } + .width('80%') + .scrollBar(BarState.Off) + .scrollable(ScrollDirection.Vertical) + } + ScrollBar({ scroller: this.scroller, direction: ScrollBarDirection.Vertical, state: BarState.On }) { + if (this.flag == true) { + Text() + .width(20) + .height(100) + .borderRadius(10) + .backgroundColor('#C0C0C0') + } + } + } + } +} + + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets new file mode 100644 index 000000000..60644b7d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/ArkUIScrollbarScroll/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets new file mode 100644 index 000000000..2cd1e874f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0130.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(50) + .layoutDirection(GridDirection.Row) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets new file mode 100644 index 000000000..2ab201236 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0140.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(30) + .layoutDirection(GridDirection.ColumnReverse) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets new file mode 100644 index 000000000..9bb6c529f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0150.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0140 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(50) + .layoutDirection(GridDirection.RowReverse) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets new file mode 100644 index 000000000..861a619e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0160.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0160 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .cellLength(30) + .layoutDirection(GridDirection.Column) + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets new file mode 100644 index 000000000..9e9555898 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0170.ets @@ -0,0 +1,47 @@ + +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0170 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(5).minCount(3); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets new file mode 100644 index 000000000..ddbbb9d8e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0180.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0180 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(5).minCount(3); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.ColumnReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets new file mode 100644 index 000000000..5c057a747 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0190.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0190 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(3).minCount(5); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets new file mode 100644 index 000000000..132777b9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0200.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0200 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(-1).minCount(-1); + + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red) + }, (day: string) => day) + } + .layoutDirection(GridDirection.RowReverse) + + .attributeModifier(this.modifier) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets new file mode 100644 index 000000000..4c2e52a0b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0230.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +@Entry +@Component +struct UIComponentGridModifier0230 { + @State numbers: string[] = []; + @State modifier: GridModifier = new GridModifier().height(300).columnsGap(10).rowsGap(10).backgroundColor(0xFAEEE0).maxCount(6).minCount(2); + aboutToAppear() { + for (let i = 1; i <= 30; i++) { + this.numbers.push(i + ''); + } + } + build() { + Scroll() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day).fontSize(16).backgroundColor(0xF9CF93) + }.width(40).height(80).borderWidth(2).borderColor(Color.Red).selected(false) + }, (day: string) => day) + }.height(300) + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .multiSelectable(false) + } + .width('90%').margin({ top: 5, left: 5, right: 5 }) + .align(Alignment.Center) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets new file mode 100644 index 000000000..4b48a198a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0410.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(2) + .rowEnd(5) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets new file mode 100644 index 000000000..d62d5fcd7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0420.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(4) + .rowEnd(3) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets new file mode 100644 index 000000000..ace1dc4fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0450.ets @@ -0,0 +1,161 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier() + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day + 'data') + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .columnStart(-2) + .rowEnd(-5) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + .columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets new file mode 100644 index 000000000..51821b839 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0460.ets @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource460 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource2 extends BasicDataSource460 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0460 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 //0代表滚动到grid顶部,1代表中间值,2代表滚动到grid底部。 + @State modifier: GridModifier = new GridModifier().columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + private data: MyDataSource2 = new MyDataSource2(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.columnStart(3) + }, (day: string) => 'day') + } + .attributeModifier(this.modifier) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets new file mode 100644 index 000000000..e26c900df --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentGridModifier/UIComponentGridModifier0470.ets @@ -0,0 +1,162 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier } from '@ohos.arkui.modifier' +class BasicDataSource470 implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource470 extends BasicDataSource470 { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct SUB_ACE_UI_COMPONENT_GRID_MODIFIER_0470 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State modifier: GridModifier = new GridModifier().columnsTemplate('1fr 1fr 2fr') + .rowsTemplate('1fr 1fr 2fr') + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300); + private data: MyDataSource470 = new MyDataSource470(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.columnStart(3) + }, (day: string) => 'day') + }.attributeModifier(this.modifier) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets new file mode 100644 index 000000000..1185f4177 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0100_565 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate("repeat(auto-fit,90px)") + .margin(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets new file mode 100644 index 000000000..842e6ce59 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0120_874 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .constraintSize({ maxWidth: 200 }) + .columnsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets new file mode 100644 index 000000000..9d673c4a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0130_440 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .constraintSize({ maxWidth: 200 }) + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets new file mode 100644 index 000000000..5a171bd6f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0190_620 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.Auto) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index : ' + index.toString() + ",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4 } + }) //只适用于当前示例代码数据源,如果数据源有变化,则需要修改该部分代码,或者删掉此属性 + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart") + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop") + }) + .onReachStart(() => { + this.gridPosition = 0 + console.info("XXX" + "Grid onReachStart") + }) + .onReachEnd(() => { + this.gridPosition = 2 + console.info("XXX" + "Grid onReachEnd") + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets new file mode 100644 index 000000000..fc6985688 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0200_308 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.Off) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets new file mode 100644 index 000000000..38a1a49bb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300.ets @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0210_300 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State numbers1: String[] = ['0', '1']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets new file mode 100644 index 000000000..4c0d21b78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0230_102 { + @State numbers1: String[] = ['0', '1', '2', '3', '4']; + @State numbers2: String[] = ['0', '1','2','3','4','5']; + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1]; + else if(index==1) + return [0, 1, 2, 2]; + else if(index==2) + return [0 ,3 ,3 ,3]; + else if(index==3) + return [3, 0, 3, 3]; + else if(index==4) + return [4, 3, 2, 2]; + else + return [5, 5, 1, 1]; + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(-1) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets new file mode 100644 index 000000000..c64cf2fd8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0240_264 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .rowsTemplate("repeat(auto-fit,90px)") + .padding(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets new file mode 100644 index 000000000..9f45717a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0240_486 { + @State numbers1: String[] = ['0', '1', '2', '3', '4']; + @State numbers2: String[] = ['0', '1','2','3','4','5']; + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1] + else if(index==1) + return [0, 1, 2, 2] + else if(index==2) + return [0 ,3 ,3 ,3] + else if(index==3) + return [3, 0, 3, 3] + else if(index==4) + return [4, 3, 2, 2] + else + return [5, 5, 1, 1] + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(0) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets new file mode 100644 index 000000000..266df2e87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0250_323 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .rowsTemplate("repeat(auto-fit,90px)") + .margin(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets new file mode 100644 index 000000000..57d4d1da5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0250_798 { + @State numbers1: String[] = ['0', '1', '2', '3', '4']; + @State numbers2: String[] = ['0', '1','2','3','4','5']; + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1] + else if(index==1) + return [0, 1, 2, 2] + else if(index==2) + return [0 ,3 ,3 ,3] + else if(index==3) + return [3, 0, 3, 3] + else if(index==4) + return [4, 3, 2, 2] + else + return [5, 5, 1, 1] + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(2) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets new file mode 100644 index 000000000..65043c583 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0260_891 { + @State numbers1: String[] = ['0', '1', '2', '3', '4']; + @State numbers2: String[] = ['0', '1','2','3','4','5']; + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1] + else if(index==1) + return [0, 1, 2, 2] + else if(index==2) + return [0 ,3 ,3 ,3] + else if(index==3) + return [3, 0, 3, 3] + else if(index==4) + return [4, 3, 2, 2] + else + return [5, 5, 1, 1] + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsGap(-1) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets new file mode 100644 index 000000000..a409ef84b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0270_110 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(0) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets new file mode 100644 index 000000000..f7bfabaa4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291.ets @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0270_291 { + @State numbers1: String[] = ['0', '1', '2', '3', '4']; + @State numbers2: String[] = ['0', '1','2','3','4','5']; + + layoutOptions3: GridLayoutOptions = { + regularSize: [1, 1], + onGetRectByIndex: (index: number) => { + if (index == 0) + return [0, 0, 1, 1]; + else if(index==1) + return [0, 1, 2, 2]; + else if(index==2) + return [0 ,3 ,3 ,3]; + else if(index==3) + return [3, 0, 3, 3]; + else if(index==4) + return [4, 3, 2, 2]; + else + return [5, 5, 1, 1]; + } + } + + build() { + Column({ space: 5 }) { + Grid() { + ForEach(this.numbers1, (day: string) => { + ForEach(this.numbers1, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height('100%') + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsTemplate('1fr 1fr 1fr 1fr 1fr') + .rowsGap(0) + .width(300) + .height(300) + + Text('GridLayoutOptions的使用:onGetRectByIndex。').fontColor(0xCCCCCC).fontSize(9).width('90%') + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets new file mode 100644 index 000000000..dabc25bf7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0270_967 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .constraintSize({ maxWidth: 200 }) + .rowsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets new file mode 100644 index 000000000..fd025fc17 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0280_006 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + .constraintSize({ maxWidth: 200 }) + }, (day: string) => day) + }, (day: string) => day) + } + .rowsTemplate("repeat(auto-fit,90px)") + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets new file mode 100644 index 000000000..0640473a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0280_218 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(-5) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets new file mode 100644 index 000000000..04f1f4ff8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0290_722 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(500) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets new file mode 100644 index 000000000..46a9594f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0300_345 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBarWidth(undefined) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets new file mode 100644 index 000000000..0a7323946 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0420_773 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarWidth(0) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets new file mode 100644 index 000000000..46db2564c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0430_891 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarWidth(1) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets new file mode 100644 index 000000000..efb5d0903 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0440_612 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarWidth(-2) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets new file mode 100644 index 000000000..32f627d9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0450_917 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarWidth('20px') + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets new file mode 100644 index 000000000..43d75516a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0460_322 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarWidth('90%') + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets new file mode 100644 index 000000000..732443e30 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0470_052 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller() + @State gridPosition: number = 0 //0代表滚动到grid顶部,1代表中间值,2代表滚动到grid底部。 + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 2fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(0xff0000) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index : ' + index.toString() + ",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4 } + }) //只适用于当前示例代码数据源,如果数据源有变化,则需要修改该部分代码,或者删掉此属性 + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart") + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop") + }) + .onReachStart(() => { + this.gridPosition = 0 + console.info("XXX" + "Grid onReachStart") + }) + .onReachEnd(() => { + this.gridPosition = 2 + console.info("XXX" + "Grid onReachEnd") + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets new file mode 100644 index 000000000..aa854e53f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0480_955 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 2fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor('#FF0000') + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index : ' + index.toString() + ",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => {; + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets new file mode 100644 index 000000000..cb1616f76 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624.ets @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class BasicDataSource implements IDataSource { + private listeners: DataChangeListener[] = []; + private originDataArray: string[] = []; + + public totalCount(): number { + return 0; + } + + public getData(index: number): string { + return this.originDataArray[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + console.info('add listener'); + this.listeners.push(listener); + } + } + + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener); + if (pos >= 0) { + console.info('remove listener'); + this.listeners.splice(pos, 1); + } + } + + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded(); + }) + } + + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index); + }) + } + + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index); + }) + } + + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index); + }) + } + + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to); + }) + } + + notifyDatasetChange(operations: DataOperation[]):void{ + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } +} + +class MyDataSource extends BasicDataSource { + private dataArray: string[] = []; + + public totalCount(): number { + return this.dataArray.length; + } + + public getData(index: number): string { + return this.dataArray[index]; + } + + public addData(index: number, data: string): void { + this.dataArray.splice(index, 0, data); + this.notifyDataAdd(index); + } + + public pushData(data: string): void { + this.dataArray.push(data); + this.notifyDataAdd(this.dataArray.length - 1); + } + + public deleteData(index: number): void { + this.dataArray.splice(index, 1); + this.notifyDataDelete(index); + } + + public changeData(index: number): void { + this.notifyDataChange(index); + } + + operateData():void { + const totalCount = this.dataArray.length; + const batch=5; + for (let i = totalCount; i < totalCount + batch; i++) { + this.dataArray.push(`Hello ${i}`) + } + this.notifyDataReload(); + } +} + + +@Entry +@Component +struct UIComponentListandgridGridInterface_0840_624 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + private data: MyDataSource = new MyDataSource(); + + aboutToAppear() { + for (let i = 0; i <= 29; i++) { + this.data.pushData(`${i}`); + } + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + LazyForEach(this.data, (day: string) => { + LazyForEach(this.data, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => 'day') + }, (day: string) => 'day') + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index : ' + index.toString() + ",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets new file mode 100644 index 000000000..0214c64b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_0850_504 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .onScrollBarUpdate((index: number, offset: number) => { + console.info("XXX" + 'Grid onScrollBarUpdate,index : ' + index.toString() + ",offset" + offset.toString()) + return { totalOffset: (index / 5) * (80 + 10) - offset, totalLength: 80 * 5 + 10 * 4 }; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + .onScrollStart(() => { + console.info("XXX" + "Grid onScrollStart"); + }) + .onScrollStop(() => { + console.info("XXX" + "Grid onScrollStop"); + }) + .onReachStart(() => { + this.gridPosition = 0; + console.info("XXX" + "Grid onReachStart"); + }) + .onReachEnd(() => { + this.gridPosition = 2; + console.info("XXX" + "Grid onReachEnd"); + }) + + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets new file mode 100644 index 000000000..ca82ffc33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321.ets @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridGridInterface_090_321 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate("repeat(auto-fit,90px)") + .padding(20) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets new file mode 100644 index 000000000..8bd665a90 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier230 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State scrollSnapAlign: ScrollSnapAlign = ScrollSnapAlign.START; + @State modifier: ListModifier = new ListModifier().scrollSnapAlign(ScrollSnapAlign.NONE); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier230') + .onClick(() => { + this.modifier = new ListModifier().scrollSnapAlign(this.scrollSnapAlign); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets new file mode 100644 index 000000000..f85a79e1b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40.ets @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListItemModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier40 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListItemModifier = new ListItemModifier().selectable(false); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + .selectable(true) + .attributeModifier(this.modifier) + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .contentStartOffset(10) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets new file mode 100644 index 000000000..b48ed8cec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier470 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListModifier = new ListModifier().cachedCount(-1); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets new file mode 100644 index 000000000..f075bbeaa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480.ets @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier480 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State modifier: ListModifier = new ListModifier().cachedCount(2); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets new file mode 100644 index 000000000..ae5a49744 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier520 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State cachedCount: number = 2; + @State modifier: ListModifier = new ListModifier().cachedCount(1); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier520') + .onClick(() => { + this.modifier = new ListModifier().cachedCount(this.cachedCount); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets new file mode 100644 index 000000000..3c600b85d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier760 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State listDirection : Axis = Axis.Vertical; + @State modifier: ListModifier = new ListModifier().listDirection(Axis.Horizontal); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier760') + .onClick(() => { + this.modifier = new ListModifier().listDirection(this.listDirection); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets new file mode 100644 index 000000000..d8a4ba339 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier810 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State alignListItem: ListItemAlign = ListItemAlign.Start; + @State modifier: ListModifier = new ListModifier().alignListItem(ListItemAlign.Center); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier810') + .onClick(() => { + this.modifier = new ListModifier().alignListItem(this.alignListItem); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets new file mode 100644 index 000000000..1d9ee558a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier930 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State contentEndOffset: number = 0; + @State modifier: ListModifier = new ListModifier().contentEndOffset(10); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier930') + .onClick(() => { + this.modifier = new ListModifier().contentEndOffset(this.contentEndOffset); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets new file mode 100644 index 000000000..ce6392dad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentListandgridModifier980 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State contentStartOffset: number = 0; + @State modifier: ListModifier = new ListModifier().contentStartOffset(10); + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arr, (item: number, index?: number) => { + ListItem() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { + Text('' + item) + .width('100%') + .height(80) + .fontSize(20) + .textAlign(TextAlign.Center) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .flexShrink(1) + } + } + }, (item: string) => item) + }.width('90%') + .height('90%') + .friction(0.6) + .attributeModifier(this.modifier) + Button('edit list') + .id('UIComponentListandgridModifier980') + .onClick(() => { + this.modifier = new ListModifier().contentStartOffset(this.contentStartOffset); + }) + }.width('100%') + + + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets new file mode 100644 index 000000000..f889409b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll100 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll100') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100 }) + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets new file mode 100644 index 000000000..df8ecb9dc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll110 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll110') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, true, ScrollAlign.START); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets new file mode 100644 index 000000000..6f69cb301 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll120 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll120') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, false, ScrollAlign.START); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets new file mode 100644 index 000000000..b7dc8808a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll130 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('scroll 150') + .id('UIComponentListandgridXommonOnscroll130') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets new file mode 100644 index 000000000..6cb1052ad --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll140 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll140') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets new file mode 100644 index 000000000..8faf2b629 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll150 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll150') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.End); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets new file mode 100644 index 000000000..9afb97437 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160.ets @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll160 { + scroller: ListScroller = new ListScroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private timeTable: TimeTable[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({scroller:this.scroller, space: 20 }) { + ForEach(this.timeTable, (item: TimeTable) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }) + } + .width('90%') + .height('80%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll160') + .height('5%') + .onClick(() => { + this.scroller.scrollToItemInGroup(1,1); + }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable { + title: string; + projects: string[]; +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets new file mode 100644 index 000000000..f8e946c44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll170 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State listdirection : Axis = Axis.Vertical; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll170') + .listDirection(this.listdirection) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .width('90%') + .height('50%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll170_button') + .height('5%') + .onClick(() => { + this.listdirection = Axis.Horizontal; + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets new file mode 100644 index 000000000..7e4bc9749 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll180 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll180') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + this.arr.push(10); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + this.arr.push(11); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets new file mode 100644 index 000000000..0738cc8ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll190 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll190') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets new file mode 100644 index 000000000..806949641 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200.ets @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll200 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + layoutOptions1: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 6], + } + + layoutOptions2: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 7], + onGetIrregularSizeByIndex: (index: number) => { + if (index === 0) { + return [1, 5] + } + return [1, index % 6 + 1] + } + } + + build() { + Column({ space: 5 }) { + Grid(this.scroller, this.layoutOptions1) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.selectable(false) + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll200') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .multiSelectable(true) + .scrollBar(BarState.Off) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets new file mode 100644 index 000000000..b97822f13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll210 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll210') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets new file mode 100644 index 000000000..8b7389532 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll240 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll240') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets new file mode 100644 index 000000000..2be1de835 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll250 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll250') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets new file mode 100644 index 000000000..1018e42a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll260 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll260') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets new file mode 100644 index 000000000..97b043253 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll270 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll270') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, true, ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets new file mode 100644 index 000000000..878fb201d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll280 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll280') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(5, false, ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets new file mode 100644 index 000000000..c4c02fa7b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll290 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll290') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets new file mode 100644 index 000000000..5da824bd7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll30 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll30') + .scrollBar(BarState.On) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets new file mode 100644 index 000000000..7662a6dc2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll300 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll300') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets new file mode 100644 index 000000000..d58b7e10a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll310 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll310') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.End); + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets new file mode 100644 index 000000000..f8bff6837 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll330 { + @State numbers: String[] = ['0', '1', '2', '3', '4'] + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll330') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.numbers.push('5') + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.numbers.push('6') + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets new file mode 100644 index 000000000..f1091658e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll340 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .id('UIComponentListandgridXommonOnscroll340') + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets new file mode 100644 index 000000000..3b5887806 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll350 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + Scroll(){ + List({ scroller: this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll350') + .scrollBar(BarState.On) + .friction(0.6) + .divider({strokeWidth: 2,color: 0xFFFFFF,startMargin: 20,endMargin: 20}) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate = scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + } + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets new file mode 100644 index 000000000..ce5dd9879 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll360 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentListandgridXommonOnscroll360') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets new file mode 100644 index 000000000..5b9084299 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// xxx.ets +import { curves } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll380 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentListandgridXommonOnscroll380') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets new file mode 100644 index 000000000..2ec7d4fdd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll390 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll390') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets new file mode 100644 index 000000000..cf9607887 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400.ets @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll400 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll400') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets new file mode 100644 index 000000000..0be699086 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410.ets @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// xxx.ets +import { curves } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll410 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll410') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets new file mode 100644 index 000000000..6873d34c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll420 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll420') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true });; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets new file mode 100644 index 000000000..2d2ccec9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430.ets @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll430 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .enableScrollInteraction(false) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Button('button') + .id('UIComponentListandgridXommonOnscroll430') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.Bottom, { velocity: 700 }); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets new file mode 100644 index 000000000..a06c43e54 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll450 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentListandgridXommonOnscroll450') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.Spring) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + this.arr.push(10); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + this.arr.push(11); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets new file mode 100644 index 000000000..823e87aae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll460 { + scroller: Scroller = new Scroller(); + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentListandgridXommonOnscroll460') + .height("80%") + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .edgeEffect(EdgeEffect.Spring) + . onWillScroll((xOffset: number, yOffset: number, scrollState: ScrollState) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets new file mode 100644 index 000000000..135de3c7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470.ets @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll470 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll470') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets new file mode 100644 index 000000000..528121507 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll500 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll500') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll500_button') + .height('5%') + .onClick(() => { + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets new file mode 100644 index 000000000..23a0577e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510.ets @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll510 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll510') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets new file mode 100644 index 000000000..e39e92e1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll520 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll520') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: false }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets new file mode 100644 index 000000000..86445cef9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530.ets @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll530 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll530') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(10,true,ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets new file mode 100644 index 000000000..04f92f50a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540.ets @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll540 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll540') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(10,false,ScrollAlign.START); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets new file mode 100644 index 000000000..62331361c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550.ets @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll550 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll550') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0,150); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets new file mode 100644 index 000000000..34e2b8cc9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll560 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll560') + .height('5%') + .onClick(() => { + this.scroller.scrollPage({ next: true }) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets new file mode 100644 index 000000000..2d122075d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570.ets @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll570 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Button('Button') + .id('UIComponentListandgridXommonOnscroll570') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.Bottom) + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets new file mode 100644 index 000000000..b3ddb3cf9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590.ets @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll590 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll590') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + this.dataSource.deleteItem(19); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + this.dataSource.deleteItem(18); + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets new file mode 100644 index 000000000..003e48f72 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll60 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll60') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .chainAnimation(true) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets new file mode 100644 index 000000000..bfa983e40 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600.ets @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonOnscroll600 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll600') + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate = scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate).margin({top:50}) + Text('didscrollstate: '+ this.didscrollstate).margin({top:70}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets new file mode 100644 index 000000000..aadd959eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll70 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + @State lan:number = 2; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll70') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .lanes(this.lan) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets new file mode 100644 index 000000000..926999648 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll80 { + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .id('UIComponentListandgridXommonOnscroll80') + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .enableScrollInteraction(false) + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets new file mode 100644 index 000000000..7a683b944 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonOnscroll90 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State willscrollstate:number = 0; + @State didscrollstate:number = 0; + scroller: Scroller = new Scroller(); + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height('80%') + .onWillScroll((scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => { + this.willscrollstate =scrollState; + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + this.didscrollstate =scrollState; + }) + Text('willscrollstate: '+ this.willscrollstate) + Text('didscrollstate: '+ this.didscrollstate) + Button('Button') + .id('UIComponentListandgridXommonOnscroll90') + .height('5%') + .onClick(() => { + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100, animation: { duration: 1000, curve: Curve.Ease, canOverScroll: true } }) + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets new file mode 100644 index 000000000..4e558f9a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonOnscroll/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 20; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets new file mode 100644 index 000000000..077e6064e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto230 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0 ; + @State heigh :number = 300; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(this.heigh) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto230") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets new file mode 100644 index 000000000..a22e9c9f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto370 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State heigh: number = 300; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(this.heigh) + .edgeEffect(EdgeEffect.Spring) + Button('Button') + .id("UIComponentListandgridXommonScrollto370") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets new file mode 100644 index 000000000..670d14f51 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto510 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + @State heigh: number = 300; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height(this.heigh) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + Button('Button') + .id("UIComponentListandgridXommonScrollto510") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets new file mode 100644 index 000000000..837688535 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto570 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("ListItem" + item) + .width("100%") + .height("100%") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.White) + }.width("100%").height(100) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScroll((scrollOffset: number, scrollState: ScrollState) => { + this.arr.push(12); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto570") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets new file mode 100644 index 000000000..097abd471 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto580 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("ListItem" + item) + .width("100%") + .height("100%") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.White) + }.width("100%").height(100) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { + this.arr.push(11); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto580") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets new file mode 100644 index 000000000..8a8d60683 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto590 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.arr.push(10,11)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto590") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets new file mode 100644 index 000000000..83c08ec47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto600 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onReachEnd(() => {this.arr.push(10,11)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto600") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets new file mode 100644 index 000000000..337fda0d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610.ets @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto610 { + scroller: Scroller = new Scroller(); + @State arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .height(300) + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.Spring) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + return { offsetRemain: offset } + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto610") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + .margin({ top: 210, left: 20 }) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets new file mode 100644 index 000000000..f467b5fca --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto620 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("ListItem" + item) + .width("100%") + .height("100%") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.White) + }.width("100%").height(100) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollStart(() => { + this.arr.push(11); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto620") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets new file mode 100644 index 000000000..112f9786c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto630 { + @State listPosition: number = 0; + @State arr: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + private scrollerForScroll: Scroller = new Scroller() + private scrollerForList: Scroller = new Scroller() + + build() { + Flex() { + Scroll(this.scrollerForScroll) { + Column() { + List({ space: 20, scroller: this.scrollerForList }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("ListItem" + item) + .width("100%") + .height("100%") + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.White) + }.width("100%").height(100) + }, (item: string) => item) + } + .width("100%") + .height("50%") + .edgeEffect(EdgeEffect.Spring) + .onScrollStop(() => { + this.arr.push(12); + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto630") + .onClick(() => { + this.scrollerForList.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } + .width("100%").height(300) + }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding(20) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets new file mode 100644 index 000000000..06ca86da3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto640 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScroll((scrollOffset: number, scrollState: ScrollState) => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto640") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets new file mode 100644 index 000000000..1091e9144 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto650 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollIndex((firstIndex: number, lastIndex: number) => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto650") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets new file mode 100644 index 000000000..2ccfbe717 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto660 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto660") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets new file mode 100644 index 000000000..ff251e9d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670.ets @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Index.ets +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto670 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachEnd(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto670") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets new file mode 100644 index 000000000..d4b40d9b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680.ets @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto680 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onReachStart(() => {this.dataSource.deleteItem(20)}) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + return { offsetRemain: offset } + }) + Button('Button') + .id("UIComponentListandgridXommonScrollto680") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets new file mode 100644 index 000000000..2dfbc65f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto690 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollStart(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto690") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets new file mode 100644 index 000000000..0ff49dbde --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700.ets @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonScrollto700 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height(300) + .edgeEffect(EdgeEffect.Spring) + .onScrollStop(() => {this.dataSource.deleteItem(20)}) + Button('Button') + .id("UIComponentListandgridXommonScrollto700") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets new file mode 100644 index 000000000..6f71ac919 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90.ets @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonScrollto90 { + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + scroller: Scroller = new Scroller(); + @State heigh :number = 300; + + build() { + Column() { + List({scroller:this.scroller, 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) + } + }, (item: string) => item) + } + .scrollBar(BarState.On) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .width('90%') + .height(this.heigh) + Button('Button') + .id("UIComponentListandgridXommonScrollto90") + .onClick(() => { + this.scroller.scrollTo(({xOffset:600,yOffset:2000,animation:{duration:1000,curve:Curve.Ease,canOverScroll:true}})); + }) + } + .width('100%') + .height('100%') + .backgroundColor(0xDCDCDC) + .padding({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets new file mode 100644 index 000000000..4e558f9a5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonScrollto/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 20; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets new file mode 100644 index 000000000..59006cf0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonSmooth0050 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr ') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0050') + .onClick(() => { + this.scroller.scrollToIndex(-1, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets new file mode 100644 index 000000000..b4a8562e2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonSmooth0060 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr ') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0060') + .onClick(() => { + this.scroller.scrollToIndex(0, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets new file mode 100644 index 000000000..b45969455 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonSmooth0070 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr ') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0070') + .onClick(() => { + this.scroller.scrollToIndex(13, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets new file mode 100644 index 000000000..4c928ea19 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080.ets @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonSmooth0080 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr ') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0080') + .onClick(() => { + this.scroller.scrollToIndex(30, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets new file mode 100644 index 000000000..5c8cbeb2f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0110.ets @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentListandgridXommonSmooth0110 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + @State gridPosition: number = 0; + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr ') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('100%') + .backgroundColor(0xFAEEE0) + .height(300) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .onClick(() => { + this.scroller.scrollToIndex(24, false); + }) + }.width('100%').margin({ top: 5 }) + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets new file mode 100644 index 000000000..e30c38799 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170.ets @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0170 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0170') + .onClick(() => { + this.scroller.scrollToIndex(-1, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets new file mode 100644 index 000000000..23249add9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180.ets @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0180 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()); + this.itemHeightArray.push(this.getSize()); + } + } + + aboutToAppear() { + this.setItemSizeArray(); + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()); + console.info(last.toString()); + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()); + console.info(scrollState.toString()); + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0180') + .onClick(() => { + this.scroller.scrollToIndex(0, false); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets new file mode 100644 index 000000000..59e4f90b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190.ets @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0190 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()); + this.itemHeightArray.push(this.getSize()); + } + } + + aboutToAppear() { + this.setItemSizeArray(); + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0190') + .onClick(() => { + this.scroller.scrollToIndex(4, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets new file mode 100644 index 000000000..3a6217379 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200.ets @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIComponentListandgridXommonSmooth0200 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State fontSize: number = 24; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()); + this.itemHeightArray.push(this.getSize()); + } + } + + aboutToAppear() { + this.setItemSizeArray(); + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + WaterFlow({ scroller: this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image($r('app.media.icon')) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .onAppear(() => { + if (item + 20 == this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + } + }) + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(10) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('80%') + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + console.info(first.toString()) + console.info(last.toString()) + }) + .onDidScroll((scrollOffset: number, scrollState: ScrollState) => { + console.info(scrollOffset.toString()) + console.info(scrollState.toString()) + }) + Button('next page') + .id('UIComponentListandgridXommonSmooth0200') + .onClick(() => { + this.scroller.scrollToIndex(100, false,); + }) + } + + } + +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets new file mode 100644 index 000000000..60644b7d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentListandgridXommonSmooth/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets new file mode 100644 index 000000000..182fab6ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier10 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢'] + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier10') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets new file mode 100644 index 000000000..9634ecf55 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier100 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier100') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets new file mode 100644 index 000000000..2df652516 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1060 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1060') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.None) + .enablePaging(false) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets new file mode 100644 index 000000000..113268940 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1070 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1070') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0.6) + .edgeEffect(EdgeEffect.None) + .enablePaging(true) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets new file mode 100644 index 000000000..35844f71a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1120 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1120') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(-66) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets new file mode 100644 index 000000000..ccf8c4245 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1130 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1130') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(0) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets new file mode 100644 index 000000000..397282d33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140.ets @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1140 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + + .id('UIComponentScrollAlphabetindexermodifier1140') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(1) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets new file mode 100644 index 000000000..029fcfc65 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1150 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1150') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(100) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets new file mode 100644 index 000000000..b80baef47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160.ets @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1160 { + scroller: Scroller = new Scroller() + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + + build() { + Stack({ alignContent: Alignment.TopStart }) { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(150) + .backgroundColor(0xFFFFFF) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + .margin({ top: 10 }) + }, (item: string) => item) + }.width('100%') + } + .id('UIComponentScrollAlphabetindexermodifier1160') + .scrollable(ScrollDirection.Vertical) + .scrollBar(BarState.On) + .scrollBarColor(Color.Gray) + .scrollBarWidth(10) + .friction(undefined) + .edgeEffect(EdgeEffect.None) + }.width('100%').height('100%').backgroundColor(0xDCDCDC) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets new file mode 100644 index 000000000..f85313e19 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { InputMethodListDialog } from '@ohos.inputMethodList'; + +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1550 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1550') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.CENTER, snapPagination:150}) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets new file mode 100644 index 000000000..dbd763ed3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1560 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1560') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:false }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets new file mode 100644 index 000000000..d8f86bce0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620.ets @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1620 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .id('UIComponentScrollAlphabetindexermodifier1620') + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:true }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets new file mode 100644 index 000000000..c7bc4d53c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1630.ets @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1630 { + scroller: Scroller = new Scroller; + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] + build() { + Scroll(this.scroller) { + Column() { + ForEach(this.arr, (item: number) => { + Text(item.toString()) + .width('90%') + .height(200) + .backgroundColor(0xFFFFFF) + .borderWidth(1) + .borderColor(Color.Black) + .borderRadius(15) + .fontSize(16) + .textAlign(TextAlign.Center) + }, (item: string) => item) + }.width('100%').backgroundColor(0xDCDCDC) + } + .backgroundColor(Color.Yellow) + .height('100%') + .edgeEffect(EdgeEffect.Spring) + .scrollSnap({snapAlign:ScrollSnapAlign.NONE, snapPagination:[30,60,90,120],enableSnapToEnd:true }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets new file mode 100644 index 000000000..ec7fec61d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640.ets @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1640 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier1640') + .autoCollapse(false) + .selectedColor(Color.Yellow) + .selectedColor(Color.Blue) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets new file mode 100644 index 000000000..afc1da000 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AlphabetIndexerModifier, GridModifier, ListModifier } from '@ohos.arkui.modifier'; +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier1650 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + @State modifier1: AlphabetIndexerModifier = new AlphabetIndexerModifier().selectedColor(Color.Yellow); + @State modifier2: AlphabetIndexerModifier = new AlphabetIndexerModifier().itemSize(-2); + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier1650') + .autoCollapse(false) + .selectedColor(Color.Yellow) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(-2) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupItemBackgroundColor(undefined) + .attributeModifier(this.modifier1) + .attributeModifier(this.modifier2) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets new file mode 100644 index 000000000..9fd5d165e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier20 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier20') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"1%") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets new file mode 100644 index 000000000..0f70e2ccf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier290 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier290') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground('app.color.green') + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets new file mode 100644 index 000000000..c1dcdddeb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier30 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier30') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"10fp") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets new file mode 100644 index 000000000..79c178ca9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier300 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier300') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(-123) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets new file mode 100644 index 000000000..43b3d4c6f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier310 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier310') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xaabbcc) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets new file mode 100644 index 000000000..d7cd51265 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier320 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier320') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Yellow) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets new file mode 100644 index 000000000..05386b00a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier330 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier330') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground('rgb(255,100,255)') + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets new file mode 100644 index 000000000..5e92f05e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier340 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier340') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + // .popupColor($r("app.color.green")) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets new file mode 100644 index 000000000..cc49e0226 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier350 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier350') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(-123) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets new file mode 100644 index 000000000..f45f56753 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier360 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier360') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xaabbcc) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets new file mode 100644 index 000000000..2d23cb009 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier370 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier370') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(Color.Yellow) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets new file mode 100644 index 000000000..ce405aad7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier380 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier380') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets new file mode 100644 index 000000000..c8efb8346 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier390 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier390') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:-20,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets new file mode 100644 index 000000000..c43467877 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier40 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier40') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"101px") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return [] ; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets new file mode 100644 index 000000000..d6afed346 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier400 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier400') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:-8,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets new file mode 100644 index 000000000..393b6512e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier410 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier410') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:10,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets new file mode 100644 index 000000000..50732ee12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier420 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier420') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets new file mode 100644 index 000000000..96824166f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier430 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier430') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:10,weight:500,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets new file mode 100644 index 000000000..28ec7232c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier440 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier440') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:20,weight:400,family:'Harmonyos Sans',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets new file mode 100644 index 000000000..5feb8bd43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier450 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier450') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .popupFont({size:20,weight:400,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets new file mode 100644 index 000000000..e9633b09c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier460 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier460') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(Color.Red) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets new file mode 100644 index 000000000..643bb23ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier470 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier470') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xffffff) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets new file mode 100644 index 000000000..2a3f1cdba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier480 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier480') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + // .popupItemBackgroundColor($r("app.color.bule")) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index) + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets new file mode 100644 index 000000000..4994330bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier490 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier490') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor('rgba(255,100,255,0.5)') + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets new file mode 100644 index 000000000..d0c5591ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50.ets @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier50 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .id('A') + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .id('AlphabetIndexerSample'+item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier50') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,"10px") + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets new file mode 100644 index 000000000..786cd84c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier500 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier500') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets new file mode 100644 index 000000000..37e68956c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier510 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier510') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({size:20,weight:500,family:'$r("app.string.button_font_sans")',style: FontStyle.Normal}) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:-20,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets new file mode 100644 index 000000000..7f05a1a8a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier520 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier520') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:-8,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets new file mode 100644 index 000000000..3ffe70371 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier530 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier530') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:10,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets new file mode 100644 index 000000000..3f340df56 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier540 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier540') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets new file mode 100644 index 000000000..994f23052 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier550 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier550') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:10,weight:500,family:"Harmony0S Sans",style:FontStyle.Italic }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets new file mode 100644 index 000000000..1f0d26a7a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier560 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier560') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({size:20,weight:400,family:"Harmony0S Sans",style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets new file mode 100644 index 000000000..dbaedd728 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier570 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier570') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + // .popupItemFont({size:20,weight:500,family:$r("app.string.button_font_sans"),style:FontStyle.Normal }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets new file mode 100644 index 000000000..c3dcbd812 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier580 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier580') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition(undefined) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets new file mode 100644 index 000000000..c09dbe697 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier590 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier590') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:-30, y:-20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets new file mode 100644 index 000000000..e06f8e2a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier60 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier60') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets new file mode 100644 index 000000000..18b9e52c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier600 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier600') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:-30, y:20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets new file mode 100644 index 000000000..faccb713c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier610 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier610') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:30, y:-20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets new file mode 100644 index 000000000..28b3b2be3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620.ets @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier620 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier620') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupPosition({ x:30, y:20 }) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets new file mode 100644 index 000000000..12cb9f03c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier680 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier680') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor('$r("app.color.green“)') + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets new file mode 100644 index 000000000..20f835bb9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier690 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier690') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(-123) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets new file mode 100644 index 000000000..0a09f75bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier70 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier70') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,-10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets new file mode 100644 index 000000000..edbffae9b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier700 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier700') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(0xaabbcc) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets new file mode 100644 index 000000000..de671dc1b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier710 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier710') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupUnselectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets new file mode 100644 index 000000000..5f6f81e60 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier80 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier80') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,0) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets new file mode 100644 index 000000000..862cf2146 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90.ets @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier90 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayL, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier90') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0xff0000) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets new file mode 100644 index 000000000..17ef62d67 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier940 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier940') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(false) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets new file mode 100644 index 000000000..5ad83cfe1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier950 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier950') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets new file mode 100644 index 000000000..8d3443b9c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentScrollAlphabetindexermodifier960 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + private value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z','#']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .id('UIComponentScrollAlphabetindexermodifier960') + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(undefined) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .popupSelectedColor(Color.Yellow) + .popupItemBackgroundColor(undefined) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!') + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + .width('100%') + .height('100%') + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets new file mode 100644 index 000000000..d1cbcd2d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10.ets @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra10 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra10') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets new file mode 100644 index 000000000..8099cf534 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra100 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(Axis.Horizontal) + Button('Button') + .id('UIComponentScrollScrollExtra100') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.arr.unshift(this.arr[0]-1); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets new file mode 100644 index 000000000..6f12019e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra110 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State heightValue: number = 100; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(this.heightValue) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra110') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.heightValue = this.heightValue+10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets new file mode 100644 index 000000000..09540a94f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra120 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State widthtValue: number = 100; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthtValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra120') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.widthtValue = this.widthtValue+10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets new file mode 100644 index 000000000..e010710af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra130 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra130') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets new file mode 100644 index 000000000..94fd6e258 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra140 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra140') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets new file mode 100644 index 000000000..a2021f70f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra150 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra150') + .onClick(() => { + this.scroller.scrollToIndex(-1,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets new file mode 100644 index 000000000..6870663c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra160 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra160') + .onClick(() => { + this.scroller.scrollToIndex(200,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets new file mode 100644 index 000000000..57c707b5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra170 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra170') + .onClick(() => { + this.scroller.scrollToIndex(undefined,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets new file mode 100644 index 000000000..4a8d204d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra180 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra180') + .onClick(() => { + this.scroller.scrollToIndex(null,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets new file mode 100644 index 000000000..9a1b94732 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra190 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State SpaceValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: this.SpaceValue, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra190') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + this.SpaceValue = this.SpaceValue + 10; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets new file mode 100644 index 000000000..e22fd7902 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20.ets @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +class ListandgridListAnimation016_DataSource implements IDataSource { + private list: number[] = []; + + constructor(list: number[]) { + this.list = list; + } + + totalCount(): number { + return this.list.length; + } + + getData(index: number): number { + return this.list[index]; + } + + registerDataChangeListener(listener: DataChangeListener): void { + } + + unregisterDataChangeListener() { + } +} + +@Entry +@Component +struct UIComponentScrollScrollExtra20 { + @State arr: ListandgridListAnimation016_DataSource = new ListandgridListAnimation016_DataSource([]); + @State showList: number[] = []; + private scroller: Scroller = new Scroller(); + private isSmooth: boolean = true; + + aboutToAppear(): void { + let list: number[] = [] + for (let i = 1; i <= 30; i++) { + list.push(i); + } + this.arr = new ListandgridListAnimation016_DataSource(list); + } + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + LazyForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra20') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets new file mode 100644 index 000000000..918df61cf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra210 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra210') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets new file mode 100644 index 000000000..a849794b4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra220 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra220') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(2000) }); + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets new file mode 100644 index 000000000..328dad9dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra230 { + @State numbers: string= ('1fr 1fr 1fr 1fr'); + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate(this.numbers) + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra230') + .onClick(() => { + this.numbers = ('1fr 1fr 1fr'); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets new file mode 100644 index 000000000..0b7b11b92 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra240 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State layoutDirection : GridDirection = GridDirection.Row; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(100) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .layoutDirection(this.layoutDirection) + .maxCount(30) + .minCount(10) + .cellLength(100) + .columnsGap(10) + .rowsGap(10) + + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra240') + .onClick(() => { + this.scroller.scrollToIndex(10,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(5) }); + this.layoutDirection = GridDirection.Column; + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets new file mode 100644 index 000000000..44f4b2577 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100 + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra250') + .onClick(() => { + this.arr.unshift(this.arr[0]-1); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets new file mode 100644 index 000000000..10f593946 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260.ets @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra260 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State heightValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(this.heightValue) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('next page') + .id('UIComponentScrollScrollExtra260') + .onClick(() => { + this.heightValue = this.heightValue + 10; + + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets new file mode 100644 index 000000000..2e30907cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra0270 { + @State numbers: String[] = ['0', '1', '2', '3', '4','5',]; + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State Position: number = 20; + @State widthValue: number = 100; + + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width(this.widthValue) + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('next page') + .id('UIComponentScrollScrollExtra270') + .onClick(() => { + this.widthValue = this.widthValue + 10; + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets new file mode 100644 index 000000000..66126ebd3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280.ets @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra280 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.CENTER); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra280') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.CENTER); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets new file mode 100644 index 000000000..1d545dfe8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290.ets @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra290 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.CENTER); + } + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra290') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets new file mode 100644 index 000000000..4538f95f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30.ets @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra30 { + scroller: Scroller = new Scroller(); + private timeTable: TimeTable[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0xAABBCC) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20,scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) + }) + } + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.On) + Button('Button') + .id('UIComponentScrollScrollExtra30') + .onClick(() => { + this.scroller.scrollToIndex(2,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + + }) + }.width('100%').height('80%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable { + title: string; + projects: string[]; +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets new file mode 100644 index 000000000..c2b2aa821 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra310 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra310') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets new file mode 100644 index 000000000..fd85f6c99 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320.ets @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra320 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra320') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(2000) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets new file mode 100644 index 000000000..3aa98c9ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra330 { + @State numbers: String[] = ['0', '1', '2', '3', '4']; + scroller: Scroller = new Scroller(); + onPageShow(): void { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + } + layoutOptions1: GridLayoutOptions = { + regularSize: [1, 1], + irregularIndexes: [0, 6], + } + + build() { + Column({ space: 5 }) { + Grid(this.scroller, this.layoutOptions1) { + ForEach(this.numbers, (day: string) => { + ForEach(this.numbers, (day: string) => { + GridItem() { + Text(day) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('100%') + .height(80) + .textAlign(TextAlign.Center) + }.selectable(false) + }, (day: string) => day) + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .multiSelectable(true) + .scrollBar(BarState.On) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + }.width('100%').margin({ top: 5 }) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets new file mode 100644 index 000000000..3d77627ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340.ets @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' +@Reusable +@Component +struct ReusableFlowItem { + @State item: number = 0; + + aboutToReuse(params: Record) { + this.item = params.item; + console.info('Reuse item:' + this.item); + }; + + aboutToAppear() { + console.info('new item:' + this.item); + }; + + build() { + Image('res/waterFlowTest(' + this.item % 5 + ').jpg') + .overlay('N' + this.item, { align: Alignment.Top }) + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } +}; + +@Entry +@Component +struct UIComponentScrollScrollExtra340 { + minSize: number = 80; + maxSize: number = 180; + fontSize: number = 24; + colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + dataCount: number = this.dataSource.totalCount(); + private itemHeightArray: number[] = []; + @State sections: WaterFlowSections = new WaterFlowSections(); + sectionMargin: Margin = { top: 10, left: 5, bottom: 10, right: 5 }; + oneColumnSection: SectionOptions = { + itemsCount: 4, + crossCount: 1, + columnsGap: '5vp', + rowsGap: 10, + margin: this.sectionMargin, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + twoColumnSection: SectionOptions = { + itemsCount: 2, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return 100 + } + }; + lastSection: SectionOptions = { + itemsCount: 20, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + }; + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemHeightArray.push(this.getSize()); + } + }; + + aboutToAppear() { + this.setItemSizeArray() + let sectionOptions: SectionOptions[] = [] + let count = 0 + let oneOrTwo = 0 + while (count < this.dataCount) { + if (this.dataCount - count < 20) { + this.lastSection.itemsCount = this.dataCount - count + sectionOptions.push(this.lastSection) + break; + } + if (oneOrTwo++ % 2 == 0) { + sectionOptions.push(this.oneColumnSection) + count += this.oneColumnSection.itemsCount + } else { + sectionOptions.push(this.twoColumnSection) + count += this.twoColumnSection.itemsCount + } + } + this.sections.splice(0, 0, sectionOptions) + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra340') + .height('5%') + .onClick(() => { + let totalCount: number = this.dataSource.totalCount(); + let newSection: SectionOptions = { + itemsCount: totalCount, + crossCount: 2, + onGetItemMainSizeByIndex: (index: number) => { + return this.itemHeightArray[index % 100] + } + }; + let oldLength: number = this.sections.length(); + this.sections.splice(0, oldLength, [newSection]); + this.scroller.scrollToIndex(50,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller: this.scroller, sections: this.sections }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + ReusableFlowItem({ item: item }) + } + .width('100%') + // 以onGetItemMainSizeByIndex为准 + .height(100) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate('1fr 1fr') + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .layoutWeight(1) + .scrollBar(BarState.On) + .onScrollIndex((first: number, last: number) => { + if (last + 20 >= this.dataSource.totalCount()) { + for (let i = 0; i < 100; i++) { + this.dataSource.addLastItem() + } + const sections: Array = this.sections.values(); + let newSection: SectionOptions = sections[this.sections.length() - 1]; + newSection.itemsCount += 100; + this.sections.update(-1, newSection); + } + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets new file mode 100644 index 000000000..416f363b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350.ets @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra350 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colume: string = '1fr 1fr'; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra350') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.colume = '1fr 1fr 1fr'; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate(this.colume) + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets new file mode 100644 index 000000000..2d7bbcccc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360.ets @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra360 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State layoutdirection : FlexDirection = FlexDirection.Row; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate('1fr 1fr ') + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .layoutDirection(this.layoutdirection) + .onReachStart(() => { + console.info('waterFlow reach start') + }) + .onScrollStart(() => { + console.info('waterFlow scroll start') + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop') + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset } + + }) + Row() { + Button('Button') + .height('5%') + .id('UIComponentScrollScrollExtra360') + .onClick(() => { + this.layoutdirection = FlexDirection.Column; + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets new file mode 100644 index 000000000..5107e3962 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380.ets @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra380 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State heightValue: number = 200; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra380') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.heightValue = this.heightValue + 10; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.heightValue) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets new file mode 100644 index 000000000..03bfd564a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390.ets @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra390 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State widthValue: number = 200; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra390') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + this.widthValue = this.widthValue + 10; + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width(this.widthValue) + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets new file mode 100644 index 000000000..e1a933245 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40.ets @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra40 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State widthtValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: this.widthtValue, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + Button('Button') + .id('UIComponentScrollScrollExtra40') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.widthtValue = this.widthtValue + 2; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets new file mode 100644 index 000000000..528245862 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400.ets @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra400 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra400') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,true,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets new file mode 100644 index 000000000..0ebfbd435 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410.ets @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra410 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize) + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra410') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets new file mode 100644 index 000000000..4fabda13e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430.ets @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra430 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra430') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(-5) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start') + }) + .onScrollStart(() => { + console.info('waterFlow scroll start') + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop') + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset } + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets new file mode 100644 index 000000000..af1968a83 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440.ets @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra440 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()) + this.itemHeightArray.push(this.getSize()) + } + } + + aboutToAppear() { + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra440') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(200) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()) + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets new file mode 100644 index 000000000..7b71a1d53 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra50 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + Grid(this.scroller) { + ForEach(this.arr, (item: number) => { + GridItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .columnsTemplate('1fr 1fr 1fr') + .columnsGap(10) + .rowsGap(10) + .friction(0.6) + .enableScrollInteraction(true) + .supportAnimation(false) + .multiSelectable(false) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + + Button('Button') + .id('UIComponentScrollScrollExtra50') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets new file mode 100644 index 000000000..b91ee255e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60.ets @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { WaterFlowDataSource } from './WaterFlowDataSource' +import { LengthMetrics } from '@kit.ArkUI' + +@Entry +@Component +struct UIComponentScrollScrollExtra60 { + @State minSize: number = 80; + @State maxSize: number = 180; + @State colors: number[] = [0xFFC0CB, 0xDA70D6, 0x6B8E23, 0x6A5ACD, 0x00FFFF, 0x00FF7F]; + scroller: Scroller = new Scroller(); + dataSource: WaterFlowDataSource = new WaterFlowDataSource(); + private itemWidthArray: number[] = []; + private itemHeightArray: number[] = []; + + // 计算FlowItem宽/高 + getSize() { + let ret = Math.floor(Math.random() * this.maxSize) + return (ret > this.minSize ? ret : this.minSize); + } + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 100; i++) { + this.itemWidthArray.push(this.getSize()); + this.itemHeightArray.push(this.getSize()); + } + } + + aboutToAppear() { + this.setItemSizeArray(); + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + build() { + Column({ space: 2 }) { + Row() { + Button('splice') + .id('UIComponentScrollScrollExtra60') + .height('5%') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + }) + .margin({ top: 10, left: 20 }) + }.margin({ bottom: 20 }) + + WaterFlow({ scroller:this.scroller }) { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16') + // 存在对应的jpg文件才会显示图片 + Image('res/waterFlowTest(' + item % 5 + ').jpg') + .objectFit(ImageFit.Fill) + .width('100%') + .layoutWeight(1) + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]) + }, (item: string) => item) + } + .columnsTemplate("1fr 1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('90%') + .scrollBar(BarState.On) + .onReachStart(() => { + console.info('waterFlow reach start'); + }) + .onScrollStart(() => { + console.info('waterFlow scroll start'); + }) + .onScrollStop(() => { + console.info('waterFlow scroll stop'); + }) + .onScrollFrameBegin((offset: number, state: ScrollState) => { + console.info('waterFlow scrollFrameBegin offset: ' + offset + ' state: ' + state.toString()); + return { offsetRemain: offset }; + }) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets new file mode 100644 index 000000000..9f07de94b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70.ets @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra70 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State LanestValue: number = 2; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(Axis.Vertical) + .lanes(this.LanestValue) + Button('Button') + .id('UIComponentScrollScrollExtra70') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.LanestValue = this.LanestValue + 1; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets new file mode 100644 index 000000000..a77d58e36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra80 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State listDirection: Axis = Axis.Vertical; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .listDirection(this.listDirection) + Button('Button') + .id('UIComponentScrollScrollExtra80') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.START,{ extraOffset: LengthMetrics.vp(20) }); + this.listDirection = Axis.Horizontal; + }) + + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets new file mode 100644 index 000000000..6cac6ba6e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90.ets @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIComponentScrollScrollExtra90 { + @State arr: number[] = [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; + scroller: Scroller = new Scroller(); + @State SpaceValue: number = 10; + build() { + Column({ space: 5 }) { + Text('scroll').fontColor(0xCCCCCC).fontSize(9).width('90%') + List({ space: 20, scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item ) + .fontSize(16) + .backgroundColor(0xF9CF93) + .width('80%') + .height(100) + .textAlign(TextAlign.Center) + } + }, (day: string) => day) + } + .listDirection(Axis.Vertical) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .scrollBar(BarState.On) + .scrollBarColor(Color.Grey) + .scrollBarWidth(4) + .width('90%') + .backgroundColor(0xFAEEE0) + .height(300) + .offset({x:0,y:this.SpaceValue}) + Button('Button') + .id('UIComponentScrollScrollExtra90') + .onClick(() => { + this.scroller.scrollToIndex(20,false,ScrollAlign.END,{ extraOffset: LengthMetrics.vp(20) }); + this.SpaceValue = this.SpaceValue +10 + + }) + }.width('100%').margin({ top: 5 }).height('80%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets new file mode 100644 index 000000000..60644b7d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentScrollScrollExtra/WaterFlowDataSource.ets @@ -0,0 +1,129 @@ +// WaterFlowDataSource.ets + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 100; i++) { + this.dataArray.push(i) + } + } + + // 获取索引对应的数据 + public getData(index: number): number { + return this.dataArray[index] + } + + // 通知控制器数据重新加载 + notifyDataReload(): void { + this.listeners.forEach(listener => { + listener.onDataReloaded() + }) + } + + // 通知控制器数据增加 + notifyDataAdd(index: number): void { + this.listeners.forEach(listener => { + listener.onDataAdd(index) + }) + } + + // 通知控制器数据变化 + notifyDataChange(index: number): void { + this.listeners.forEach(listener => { + listener.onDataChange(index) + }) + } + + // 通知控制器数据删除 + notifyDataDelete(index: number): void { + this.listeners.forEach(listener => { + listener.onDataDelete(index) + }) + } + + // 通知控制器数据位置变化 + notifyDataMove(from: number, to: number): void { + this.listeners.forEach(listener => { + listener.onDataMove(from, to) + }) + } + + //通知控制器数据批量修改 + notifyDatasetChange(operations: DataOperation[]): void { + this.listeners.forEach(listener => { + listener.onDatasetChange(operations); + }) + } + + // 获取数据总数 + public totalCount(): number { + return this.dataArray.length + } + + // 注册改变数据的控制器 + registerDataChangeListener(listener: DataChangeListener): void { + if (this.listeners.indexOf(listener) < 0) { + this.listeners.push(listener) + } + } + + // 注销改变数据的控制器 + unregisterDataChangeListener(listener: DataChangeListener): void { + const pos = this.listeners.indexOf(listener) + if (pos >= 0) { + this.listeners.splice(pos, 1) + } + } + + // 增加数据 + public add1stItem(): void { + this.dataArray.splice(0, 0, this.dataArray.length) + this.notifyDataAdd(0) + } + + // 在数据尾部增加一个元素 + public addLastItem(): void { + this.dataArray.splice(this.dataArray.length, 0, this.dataArray.length) + this.notifyDataAdd(this.dataArray.length - 1) + } + + // 在指定索引位置增加一个元素 + public addItem(index: number): void { + this.dataArray.splice(index, 0, this.dataArray.length) + this.notifyDataAdd(index) + } + + // 删除第一个元素 + public delete1stItem(): void { + this.dataArray.splice(0, 1) + this.notifyDataDelete(0) + } + + // 删除第二个元素 + public delete2ndItem(): void { + this.dataArray.splice(1, 1) + this.notifyDataDelete(1) + } + + // 删除最后一个元素 + public deleteLastItem(): void { + this.dataArray.splice(-1, 1) + this.notifyDataDelete(this.dataArray.length) + } + + // 在指定索引位置删除一个元素 + public deleteItem(index: number): void { + this.dataArray.splice(index, 1) + this.notifyDataDelete(index) + } + + // 重新加载数据 + public reload(): void { + this.dataArray.splice(1, 1) + this.dataArray.splice(3, 2) + this.notifyDataReload() + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets new file mode 100644 index 000000000..f0e140895 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0010 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.LIGHT; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0010') + .onClick(() => { + this.theme = ThemeColorMode.LIGHT; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets new file mode 100644 index 000000000..ea6b3f2c3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0020 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.LIGHT; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0020') + .onClick(() => { + this.theme = ThemeColorMode.DARK; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets new file mode 100644 index 000000000..79073fa78 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040.ets @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUisupportColor_0040 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayJ: string[] = ['嘉', '贾']; + private value: string[] = ['#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', + 'V', 'W', 'X', 'Y', 'Z']; + @State isNeedAutoCollapse: boolean = false; + @State theme: ThemeColorMode = ThemeColorMode.DARK; + @State indexerHeight: string = '75%'; + + build() { + + Stack({ alignContent: Alignment.Start }) { + Row() { + List({ space: 20, initialIndex: 0 }) { + ForEach(this.arrayA, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayB, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayC, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + + ForEach(this.arrayJ, (item: string) => { + ListItem() { + Text(item) + .width('80%') + .height('5%') + .fontSize(30) + .textAlign(TextAlign.Center) + } + }, (item: string) => item) + } + .width('50%') + .height('100%') + + + Column() { + Column() { + WithTheme({ colorMode: this.theme }) { + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(this.isNeedAutoCollapse) + .height(this.indexerHeight) + .selectedColor(0xFFFFFF) + .popupColor(0xFFFAF0) + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(0xD2B48C) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .popupFont({ size: 30, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Right) + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) + .onSelect((index: number) => { + console.info(this.value[index] + ' Selected!'); + }) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA; + } else if (this.value[index] == 'B') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'J') { + return this.arrayJ; + } else { + return []; + } + }) + .onPopupSelect((index: number) => { + console.info('onPopupSelected:' + index); + }) + } + } + .height('80%') + .justifyContent(FlexAlign.Center) + + Column() { + Button('Button') + .margin('5vp') + .id('UIComponentUisupportColor_0040') + .onClick(() => { + this.theme = ThemeColorMode.DARK; + }) + }.height('20%') + } + .width('50%') + .justifyContent(FlexAlign.Center) + } + + .width('100%') + .height('100%') + + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets new file mode 100644 index 000000000..6c3543c4b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20.ets @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UiComponentAlphabetindexerAttributeAutocollapse20 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(false) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button15') + .id('UiComponentAlphabetindexerAttributeAutocollapse20_1') + .onClick(() => { + this.value = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M','N']; + }) + .margin({left:50}) + + Button('Button13') + .id('UiComponentAlphabetindexerAttributeAutocollapse20_2') + .onClick(() => { + this.value = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L']; + }) + .margin({left:150}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets new file mode 100644 index 000000000..b4067fd8e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UiComponentAlphabetindexerAttributeAutocollapse30 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = ['#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse30') + .onClick(() => { + this.value = ['A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I']; + }) + .margin({left:50}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets new file mode 100644 index 000000000..0fe161d38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UiComponentAlphabetindexerAttributeAutocollapse40 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse40') + .onClick(() => { + this.value = [ '#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + }) + .margin({left:50}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets new file mode 100644 index 000000000..c16ea9c47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50.ets @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UiComponentAlphabetindexerAttributeAutocollapse50 { + private arrayA: string[] = ['安']; + private arrayB: string[] = ['卜', '白', '包', '毕', '丙']; + private arrayC: string[] = ['曹', '成', '陈', '催']; + private arrayL: string[] = ['刘', '李', '楼', '梁', '雷', '吕', '柳', '卢']; + @State value: string[] = [ '#','A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + + build() { + Stack({ alignContent: Alignment.Start }) { + Row() { + + AlphabetIndexer({ arrayValue: this.value, selected: 0 }) + .autoCollapse(false) + .selectedColor(0xFFFFFF) + .popupColor('rgb(255,100,255)') + .selectedBackgroundColor(0xCCCCCC) + .popupBackground(Color.Gray) + .usingPopup(true) + .selectedFont({ size: 16, weight: FontWeight.Bolder }) + .itemSize(28) + .alignStyle(IndexerAlign.Left,10) + .popupItemBorderRadius(24) + .itemBorderRadius(14) + .popupBackgroundBlurStyle(BlurStyle.NONE) + .popupTitleBackground(0xCCCCCC) + .autoCollapse(true) + .popupUnselectedColor(0xff0000) + .popupItemBackgroundColor(undefined) + .onRequestPopupData((index: number) => { + if (this.value[index] == 'A') { + return this.arrayA ; + } else if (this.value[index] == 'N') { + return this.arrayB; + } else if (this.value[index] == 'C') { + return this.arrayC; + } else if (this.value[index] == 'L') { + return this.arrayL; + } else { + return this.arrayB; + } + }) + + } + .width('100%') + .height('100%') + Button('Button') + .id('UiComponentAlphabetindexerAttributeAutocollapse50') + .onClick(() => { + this.value = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M']; + }) + .margin({left:50}) + } + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json index 0bc35630a..ea87189f3 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/profile/test_pages.json @@ -1143,6 +1143,312 @@ "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2060", "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2110", "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2160", - "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2370" + "testability/pages/UIComponentScrollSwiperInterface/UIComponentScrollSwiperInterface2370", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_486", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0230_102", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_798", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0260_891", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_291", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0850_504", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0840_624", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0190_620", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0200_308", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0210_300", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0470_052", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0480_955", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0300_345", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_218", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_110", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0290_722", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0420_773", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0430_891", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0440_612", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0450_917", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0130_440", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0100_565", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_090_321", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0270_967", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0280_006", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0250_323", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0240_264", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0120_874", + "testability/pages/UIComponentListandgridGridInterface/UIComponentListandgridGridInterface_0460_322", + + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0010", + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0020", + "testability/pages/UIComponentUisupportColor/UIComponentUisupportColor_0040", + + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0050", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0060", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0070", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0080", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0170", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0180", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0190", + "testability/pages/UIComponentListandgridXommonSmooth/UIComponentListandgridXommonSmooth0200", + + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0130", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0140", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0150", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0160", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0170", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0180", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0190", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0200", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0230", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0410", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0450", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0460", + "testability/pages/UIComponentGridModifier/UIComponentGridModifier0470", + + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra10", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra20", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra30", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra40", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra60", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra70", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra80", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra90", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra100", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra50", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra110", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra120", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra130", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra140", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra150", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra160", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra170", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra180", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra190", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra210", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra220", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra230", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra240", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra250", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra260", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra270", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra280", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra290", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra310", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra320", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra340", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra350", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra360", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra380", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra390", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra330", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra400", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra410", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra430", + "testability/pages/UIComponentScrollScrollExtra/UIComponentScrollScrollExtra440", + + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier10", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier20", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier30", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier40", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier60", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier70", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier80", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier90", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier100", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier50", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier300", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier310", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier320", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier330", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier290", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier340", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier350", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier360", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier370", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier380", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier390", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier400", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier410", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier420", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier430", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier440", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier450", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier460", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier470", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier480", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier490", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier500", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier510", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier520", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier530", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier540", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier550", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier560", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier570", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier580", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier590", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier600", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier610", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier620", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier680", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier690", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier700", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier710", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier940", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier950", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier960", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1060", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1070", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1120", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1130", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1140", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1150", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1160", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1550", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1560", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1620", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1640", + "testability/pages/UIComponentScrollAlphabetindexermodifier/UIComponentScrollAlphabetindexermodifier1650", + + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier40", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier230", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier470", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier480", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier520", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier760", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier810", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier930", + "testability/pages/UIComponentListandgridModifier/UIComponentListandgridModifier980", + + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll30", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll40", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll50", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll60", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll70", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll90", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll100", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll130", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll140", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll150", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll160", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll170", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll190", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll200", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll230", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll240", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll250", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll260", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll280", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll270", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll290", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll300", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll320", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll330", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll360", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll370", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll380", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll390", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll400", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll420", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll430", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll460", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll470", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll480", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll490", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll500", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll520", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll530", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll560", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll570", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll580", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll590", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll600", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll620", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll630", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll660", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll670", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll710", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll740", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll750", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll700", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll770", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll780", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll790", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll830", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll840", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll850", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll860", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll870", + "testability/pages/ArkUIScrollbarScroll/ArkUIScrollbarScroll880", + + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto90", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto230", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto370", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto510", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto570", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto580", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto590", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto600", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto610", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto620", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto630", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto640", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto650", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto660", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto670", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto680", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto690", + "testability/pages/UIComponentListandgridXommonScrollto/UIComponentListandgridXommonScrollto700", + + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll330", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll200", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll60", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll70", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll80", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll90", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll100", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll110", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll120", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll130", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll140", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll150", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll160", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll170", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll180", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll390", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll190", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll340", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll380", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll400", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll410", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll420", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll450", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll460", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll430", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll520", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll540", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll560", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll500", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll510", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll530", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll570", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll550", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll590", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll600", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll350", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll210", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll30", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll360", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll470", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll240", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll250", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll260", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll270", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll280", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll290", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll300", + "testability/pages/UIComponentListandgridXommonOnscroll/UIComponentListandgridXommonOnscroll310", + + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse20", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse30", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse40", + "testability/pages/UiComponentAlphabetindexerAttributeAutocollapse/UiComponentAlphabetindexerAttributeAutocollapse50" + ] } -- Gitee