From 88b919b83a8d92b382e511247e99aae515daa578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Mon, 30 Dec 2024 10:41:24 +0800 Subject: [PATCH 1/5] add all divider UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../entry/src/ohosTest/ets/test/List.test.ets | 53 + .../UIAttributesPositionSizeFeature.test.ets | 102 + ...ibutesPositionSizeLayoutPropertie.test.ets | 44 + .../UIAttributesPositionSizePosition.test.ets | 901 ++++ ...atestylesInterfaceNestedScrolling.test.ets | 1544 ++++++ ...sStatestylesInterfaceSupportstage.test.ets | 404 ++ .../UIComponentCanvasAttribute.test.ets | 1562 ++++++ .../UIComponentCanvasCanvasRender.test.ets | 57 + .../UIComponentCanvasInterface.test.ets | 135 + .../UIComponentCanvasModifier.test.ets | 1740 ++++++ .../UIComponentCanvasReset.test.ets | 679 +++ .../UIComponentColumnMirrorImage.test.ets | 977 ++++ .../UIComponentFlexSpace.test.ets | 689 +++ .../UIComponentLayoutFlexDirection.test.ets | 4740 +++++++++++++++++ .../UIComponentLayoutFlexLayout.test.ets | 81 + ...erRowsplitandcolumnsplitAnimation.test.ets | 229 + .../UIComponentPositionOffset.test.ets | 1512 ++++++ ...ntRowColumnColumnSplitInteraction.test.ets | 59 + ...nentRowcolumnColumnsplitInterface.test.ets | 94 + ...mponentRowcolumnColumnsplitLayout.test.ets | 196 + ...omponentsPluginComponentInterface.test.ets | 122 + ...sXcomponentSurfaceBackgroundcolor.test.ets | 182 + ...ponentsXcomponentSurfaceInterface.test.ets | 410 ++ .../UIComponentUIsupportColor1.test.ets | 318 ++ .../UIAttributesPositionSizeFeature0020.ets | 26 + .../UIAttributesPositionSizeFeature0060.ets | 26 + .../UIAttributesPositionSizeFeature0080.ets | 26 + .../UIAttributesPositionSizeFeature0160.ets | 25 + ...ributesPositionSizeLayoutPropertie0070.ets | 31 + .../UIAttributesPositionSizePosition0010.ets | 32 + .../UIAttributesPositionSizePosition0020.ets | 31 + .../UIAttributesPositionSizePosition0030.ets | 31 + .../UIAttributesPositionSizePosition0040.ets | 31 + .../UIAttributesPositionSizePosition0050.ets | 31 + .../UIAttributesPositionSizePosition0060.ets | 31 + .../UIAttributesPositionSizePosition0070.ets | 31 + .../UIAttributesPositionSizePosition0080.ets | 31 + .../UIAttributesPositionSizePosition0090.ets | 31 + .../UIAttributesPositionSizePosition0100.ets | 31 + .../UIAttributesPositionSizePosition0110.ets | 31 + .../UIAttributesPositionSizePosition0120.ets | 31 + .../UIAttributesPositionSizePosition0130.ets | 31 + .../UIAttributesPositionSizePosition0140.ets | 31 + .../UIAttributesPositionSizePosition0150.ets | 31 + .../UIAttributesPositionSizePosition0160.ets | 47 + .../UIAttributesPositionSizePosition0170.ets | 47 + .../UIAttributesPositionSizePosition0180.ets | 47 + .../UIAttributesPositionSizePosition0190.ets | 47 + .../UIAttributesPositionSizePosition0200.ets | 47 + .../UIAttributesPositionSizePosition0210.ets | 29 + .../UIAttributesPositionSizePosition0220.ets | 29 + .../UIAttributesPositionSizePosition0230.ets | 29 + .../UIAttributesPositionSizePosition0240.ets | 29 + .../UIAttributesPositionSizePosition0250.ets | 37 + .../UIAttributesPositionSizePosition0260.ets | 37 + .../UIAttributesPositionSizePosition0270.ets | 37 + .../UIAttributesPositionSizePosition0280.ets | 36 + .../UIAttributesPositionSizePosition0290.ets | 36 + .../UIAttributesPositionSizePosition0300.ets | 36 + .../UIAttributesPositionSizePosition0310.ets | 36 + .../UIAttributesPositionSizePosition0320.ets | 36 + .../UIAttributesPositionSizePosition0330.ets | 36 + .../UIAttributesPositionSizePosition0340.ets | 36 + .../UIAttributesPositionSizePosition0350.ets | 36 + .../UIAttributesPositionSizePosition0360.ets | 36 + .../UIAttributesPositionSizePosition0370.ets | 35 + .../UIAttributesPositionSizePosition0380.ets | 35 + .../UIAttributesPositionSizePosition0390.ets | 35 + .../UIAttributesPositionSizePosition0400.ets | 35 + .../UIAttributesPositionSizePosition0410.ets | 35 + .../UIAttributesPositionSizePosition0420.ets | 35 + .../UIAttributesPositionSizePosition0430.ets | 30 + .../UIAttributesPositionSizePosition0440.ets | 42 + .../UIAttributesPositionSizePosition0450.ets | 33 + .../UIAttributesPositionSizePosition0460.ets | 33 + .../UIAttributesPositionSizePosition0470.ets | 33 + .../UIAttributesPositionSizePosition0480.ets | 33 + .../UIAttributesPositionSizePosition0490.ets | 33 + .../UIAttributesPositionSizePosition0500.ets | 33 + .../UIAttributesPositionSizePosition0510.ets | 33 + ...tatestylesInterfaceNestedScrolling0010.ets | 102 + ...tatestylesInterfaceNestedScrolling0020.ets | 102 + ...tatestylesInterfaceNestedScrolling0030.ets | 102 + ...tatestylesInterfaceNestedScrolling0040.ets | 102 + ...tatestylesInterfaceNestedScrolling0050.ets | 102 + ...tatestylesInterfaceNestedScrolling0060.ets | 105 + ...tatestylesInterfaceNestedScrolling0070.ets | 80 + ...tatestylesInterfaceNestedScrolling0080.ets | 108 + ...tatestylesInterfaceNestedScrolling0090.ets | 80 + ...tatestylesInterfaceNestedScrolling0100.ets | 105 + ...tatestylesInterfaceNestedScrolling0110.ets | 80 + ...tatestylesInterfaceNestedScrolling0120.ets | 105 + ...tatestylesInterfaceNestedScrolling0130.ets | 80 + ...tatestylesInterfaceNestedScrolling0140.ets | 105 + ...tatestylesInterfaceNestedScrolling0150.ets | 80 + ...tatestylesInterfaceNestedScrolling0160.ets | 105 + ...tatestylesInterfaceNestedScrolling0170.ets | 95 + ...tatestylesInterfaceNestedScrolling0180.ets | 95 + ...tatestylesInterfaceNestedScrolling0190.ets | 95 + ...tatestylesInterfaceNestedScrolling0200.ets | 95 + ...tatestylesInterfaceNestedScrolling0210.ets | 91 + ...tatestylesInterfaceNestedScrolling0220.ets | 99 + ...tatestylesInterfaceNestedScrolling0230.ets | 100 + ...tatestylesInterfaceNestedScrolling0240.ets | 100 + ...tatestylesInterfaceNestedScrolling0250.ets | 97 + ...tatestylesInterfaceNestedScrolling0260.ets | 96 + ...tatestylesInterfaceNestedScrolling0270.ets | 80 + ...tatestylesInterfaceNestedScrolling0280.ets | 79 + ...tatestylesInterfaceNestedScrolling0290.ets | 102 + ...tatestylesInterfaceNestedScrolling0300.ets | 102 + ...tatestylesInterfaceNestedScrolling0310.ets | 82 + ...tatestylesInterfaceNestedScrolling0320.ets | 102 + ...tatestylesInterfaceNestedScrolling0330.ets | 102 + ...tatestylesInterfaceNestedScrolling0340.ets | 102 + ...tatestylesInterfaceNestedScrolling0350.ets | 102 + ...tatestylesInterfaceNestedScrolling0360.ets | 102 + ...tatestylesInterfaceNestedScrolling0370.ets | 102 + ...tatestylesInterfaceNestedScrolling0380.ets | 102 + ...tatestylesInterfaceNestedScrolling0390.ets | 102 + ...tatestylesInterfaceNestedScrolling0400.ets | 102 + ...tatestylesInterfaceNestedScrolling0410.ets | 104 + ...tatestylesInterfaceNestedScrolling0420.ets | 102 + ...tatestylesInterfaceNestedScrolling0430.ets | 102 + ...tatestylesInterfaceNestedScrolling0440.ets | 102 + ...tatestylesInterfaceNestedScrolling0450.ets | 102 + ...tatestylesInterfaceNestedScrolling0460.ets | 102 + ...tatestylesInterfaceNestedScrolling0470.ets | 102 + ...tatestylesInterfaceNestedScrolling0480.ets | 102 + ...tatestylesInterfaceNestedScrolling0490.ets | 90 + ...tatestylesInterfaceNestedScrolling0500.ets | 104 + ...tatestylesInterfaceNestedScrolling0510.ets | 89 + ...tatestylesInterfaceNestedScrolling0520.ets | 88 + ...tatestylesInterfaceNestedScrolling0540.ets | 59 + ...tatestylesInterfaceNestedScrolling0550.ets | 51 + ...tatestylesInterfaceNestedScrolling0560.ets | 52 + ...tatestylesInterfaceNestedScrolling0570.ets | 52 + ...tatestylesInterfaceNestedScrolling0580.ets | 52 + ...tatestylesInterfaceNestedScrolling0590.ets | 59 + ...tatestylesInterfaceNestedScrolling0600.ets | 55 + ...tatestylesInterfaceNestedScrolling0610.ets | 87 + ...tatestylesInterfaceNestedScrolling0620.ets | 87 + .../WaterFlowDataSource.ets | 142 + ...esStatestylesInterfaceSupportstage0010.ets | 67 + ...esStatestylesInterfaceSupportstage0020.ets | 67 + ...esStatestylesInterfaceSupportstage0030.ets | 65 + ...esStatestylesInterfaceSupportstage0040.ets | 65 + ...esStatestylesInterfaceSupportstage0050.ets | 65 + ...esStatestylesInterfaceSupportstage0060.ets | 65 + ...esStatestylesInterfaceSupportstage0070.ets | 65 + ...esStatestylesInterfaceSupportstage0080.ets | 65 + ...esStatestylesInterfaceSupportstage0090.ets | 65 + ...esStatestylesInterfaceSupportstage0100.ets | 65 + ...esStatestylesInterfaceSupportstage0110.ets | 65 + ...esStatestylesInterfaceSupportstage0120.ets | 65 + ...esStatestylesInterfaceSupportstage0130.ets | 65 + ...esStatestylesInterfaceSupportstage0140.ets | 65 + ...esStatestylesInterfaceSupportstage0150.ets | 65 + ...esStatestylesInterfaceSupportstage0160.ets | 65 + ...esStatestylesInterfaceSupportstage0170.ets | 65 + ...esStatestylesInterfaceSupportstage0180.ets | 66 + ...esStatestylesInterfaceSupportstage0190.ets | 66 + ...esStatestylesInterfaceSupportstage0200.ets | 66 + ...esStatestylesInterfaceSupportstage0210.ets | 65 + .../UIComponentCanvasAttribute0010.ets | 52 + .../UIComponentCanvasAttribute0020.ets | 46 + .../UIComponentCanvasAttribute0030.ets | 53 + .../UIComponentCanvasAttribute0040.ets | 45 + .../UIComponentCanvasAttribute0060.ets | 44 + .../UIComponentCanvasAttribute0070.ets | 45 + .../UIComponentCanvasAttribute0080.ets | 44 + .../UIComponentCanvasAttribute0090.ets | 44 + .../UIComponentCanvasAttribute0110.ets | 42 + .../UIComponentCanvasAttribute0120.ets | 44 + .../UIComponentCanvasAttribute0130.ets | 42 + .../UIComponentCanvasAttribute0140.ets | 42 + .../UIComponentCanvasAttribute0150.ets | 42 + .../UIComponentCanvasAttribute0160.ets | 42 + .../UIComponentCanvasAttribute0170.ets | 44 + .../UIComponentCanvasAttribute0180.ets | 43 + .../UIComponentCanvasAttribute0190.ets | 43 + .../UIComponentCanvasAttribute0200.ets | 48 + .../UIComponentCanvasAttribute0210.ets | 43 + .../UIComponentCanvasAttribute0220.ets | 43 + .../UIComponentCanvasAttribute0230.ets | 43 + .../UIComponentCanvasAttribute0240.ets | 43 + .../UIComponentCanvasAttribute0250.ets | 43 + .../UIComponentCanvasAttribute0260.ets | 43 + .../UIComponentCanvasAttribute0270.ets | 43 + .../UIComponentCanvasAttribute0280.ets | 42 + .../UIComponentCanvasAttribute0290.ets | 43 + .../UIComponentCanvasAttribute0300.ets | 38 + .../UIComponentCanvasAttribute0310.ets | 43 + .../UIComponentCanvasAttribute0320.ets | 39 + .../UIComponentCanvasAttribute0330.ets | 43 + .../UIComponentCanvasAttribute0340.ets | 38 + .../UIComponentCanvasAttribute0350.ets | 38 + .../UIComponentCanvasAttribute0360.ets | 39 + .../UIComponentCanvasAttribute0370.ets | 44 + .../UIComponentCanvasAttribute0380.ets | 44 + .../UIComponentCanvasAttribute0390.ets | 44 + .../UIComponentCanvasAttribute0400.ets | 43 + .../UIComponentCanvasAttribute0410.ets | 43 + .../UIComponentCanvasAttribute0420.ets | 40 + .../UIComponentCanvasAttribute0430.ets | 42 + .../UIComponentCanvasAttribute0440.ets | 42 + .../UIComponentCanvasAttribute0450.ets | 42 + .../UIComponentCanvasAttribute0460.ets | 42 + .../UIComponentCanvasAttribute0470.ets | 42 + .../UIComponentCanvasAttribute0480.ets | 42 + .../UIComponentCanvasAttribute0490.ets | 40 + .../UIComponentCanvasAttribute0500.ets | 41 + .../UIComponentCanvasAttribute0510.ets | 41 + .../UIComponentCanvasAttribute0520.ets | 41 + .../UIComponentCanvasAttribute0540.ets | 41 + .../UIComponentCanvasAttribute0550.ets | 41 + .../UIComponentCanvasAttribute0560.ets | 41 + .../UIComponentCanvasAttribute0570.ets | 40 + .../UIComponentCanvasAttribute0580.ets | 41 + .../UIComponentCanvasAttribute0590.ets | 41 + .../UIComponentCanvasAttribute0600.ets | 41 + .../UIComponentCanvasAttribute0610.ets | 41 + .../UIComponentCanvasAttribute0620.ets | 40 + .../UIComponentCanvasAttribute0630.ets | 40 + .../UIComponentCanvasAttribute0640.ets | 36 + .../UIComponentCanvasAttribute0650.ets | 36 + .../UIComponentCanvasAttribute0660.ets | 36 + .../UIComponentCanvasAttribute0670.ets | 37 + .../UIComponentCanvasAttribute0680.ets | 39 + .../UIComponentCanvasAttribute0690.ets | 37 + .../UIComponentCanvasAttribute0700.ets | 37 + .../UIComponentCanvasAttribute0710.ets | 39 + .../UIComponentCanvasAttribute0720.ets | 38 + .../UIComponentCanvasAttribute0730.ets | 37 + .../UIComponentCanvasAttribute0740.ets | 39 + .../UIComponentCanvasAttribute0750.ets | 40 + .../UIComponentCanvasAttribute0760.ets | 37 + .../UIComponentCanvasAttribute0770.ets | 37 + .../UIComponentCanvasAttribute0780.ets | 38 + .../UIComponentCanvasAttribute0790.ets | 38 + .../UIComponentCanvasAttribute0800.ets | 39 + .../UIComponentCanvasAttribute0810.ets | 39 + .../UIComponentCanvasAttribute0820.ets | 37 + .../UIComponentCanvasAttribute0830.ets | 37 + .../UIComponentCanvasAttribute0840.ets | 39 + .../UIComponentCanvasAttribute0850.ets | 39 + .../UIComponentCanvasAttribute0860.ets | 37 + .../UIComponentCanvasAttribute0870.ets | 39 + .../UIComponentCanvasAttribute0880.ets | 37 + .../UIComponentCanvasAttribute0890.ets | 40 + .../UIComponentCanvasAttribute0900.ets | 37 + .../UIComponentCanvasAttribute0910.ets | 39 + .../UIComponentCanvasAttribute0920.ets | 37 + .../UIComponentCanvasAttribute0930.ets | 36 + .../UIComponentCanvasAttribute0940.ets | 37 + .../UIComponentCanvasAttribute0950.ets | 37 + .../UIComponentCanvasAttribute0960.ets | 37 + .../UIComponentCanvasAttribute0970.ets | 37 + .../UIComponentCanvasAttribute0980.ets | 36 + .../UIComponentCanvasAttribute0990.ets | 39 + .../UIComponentCanvasAttribute1000.ets | 37 + .../UIComponentCanvasAttribute1010.ets | 37 + .../UIComponentCanvasAttribute1020.ets | 39 + .../UIComponentCanvasAttribute1030.ets | 37 + .../UIComponentCanvasAttribute1040.ets | 39 + .../UIComponentCanvasAttribute1050.ets | 37 + .../UIComponentCanvasAttribute1060.ets | 39 + .../UIComponentCanvasAttribute1070.ets | 37 + .../UIComponentCanvasAttribute1080.ets | 39 + .../UIComponentCanvasAttribute1090.ets | 38 + .../UIComponentCanvasAttribute1100.ets | 39 + .../UIComponentCanvasAttribute1110.ets | 37 + .../UIComponentCanvasAttribute1120.ets | 37 + .../UIComponentCanvasAttribute1130.ets | 37 + .../UIComponentCanvasAttribute1140.ets | 37 + .../UIComponentCanvasAttribute1150.ets | 38 + .../UIComponentCanvasAttribute1160.ets | 37 + .../UIComponentCanvasCanvasRender0050.ets | 52 + .../UIComponentCanvasInterface0350.ets | 37 + .../UIComponentCanvasInterface1170.ets | 34 + .../UIComponentCanvasInterface1320.ets | 35 + .../UIComponentCanvasInterface1570.ets | 38 + .../UIComponentCanvasInterface1860.ets | 40 + .../UIComponentCanvasInterface1910.ets | 40 + .../UIComponentCanvasInterface2550.ets | 42 + .../UIComponentCanvasInterface2560.ets | 42 + .../UIComponentCanvasModifier0070.ets | 35 + .../UIComponentCanvasModifier0090.ets | 40 + .../UIComponentCanvasModifier0110.ets | 45 + .../UIComponentCanvasModifier0130.ets | 54 + .../UIComponentCanvasModifier0140.ets | 43 + .../UIComponentCanvasModifier0160.ets | 45 + .../UIComponentCanvasModifier0170.ets | 45 + .../UIComponentCanvasModifier0180.ets | 39 + .../UIComponentCanvasModifier0190.ets | 40 + .../UIComponentCanvasModifier0230.ets | 39 + .../UIComponentCanvasModifier0250.ets | 39 + .../UIComponentCanvasModifier0310.ets | 42 + .../UIComponentCanvasModifier0330.ets | 38 + .../UIComponentCanvasModifier0340.ets | 42 + .../UIComponentCanvasModifier0350.ets | 42 + .../UIComponentCanvasModifier0370.ets | 40 + .../UIComponentCanvasModifier0380.ets | 41 + .../UIComponentCanvasModifier0390.ets | 41 + .../UIComponentCanvasModifier0400.ets | 38 + .../UIComponentCanvasModifier0420.ets | 42 + .../UIComponentCanvasModifier0470.ets | 36 + .../UIComponentCanvasModifier0510.ets | 47 + .../UIComponentCanvasModifier0560.ets | 37 + .../UIComponentCanvasModifier0570.ets | 38 + .../UIComponentCanvasModifier0580.ets | 38 + .../UIComponentCanvasModifier0610.ets | 39 + .../UIComponentCanvasModifier0620.ets | 35 + .../UIComponentCanvasModifier0630.ets | 38 + .../UIComponentCanvasModifier0670.ets | 38 + .../UIComponentCanvasModifier0960.ets | 36 + .../UIComponentCanvasModifier0970.ets | 37 + .../UIComponentCanvasModifier0980.ets | 40 + .../UIComponentCanvasModifier1020.ets | 43 + .../UIComponentCanvasModifier1030.ets | 40 + .../UIComponentCanvasModifier1050.ets | 45 + .../UIComponentCanvasModifier1080.ets | 39 + .../UIComponentCanvasModifier1110.ets | 42 + .../UIComponentCanvasModifier1130.ets | 43 + .../UIComponentCanvasModifier1170.ets | 39 + .../UIComponentCanvasModifier1260.ets | 42 + .../UIComponentCanvasModifier1290.ets | 43 + .../UIComponentCanvasModifier1300.ets | 38 + .../UIComponentCanvasModifier1310.ets | 38 + .../UIComponentCanvasModifier1340.ets | 38 + .../UIComponentCanvasModifier1370.ets | 43 + .../UIComponentCanvasModifier1390.ets | 41 + .../UIComponentCanvasModifier1470.ets | 43 + .../UIComponentCanvasModifier1500.ets | 47 + .../UIComponentCanvasModifier1520.ets | 36 + .../UIComponentCanvasModifier1550.ets | 42 + .../UIComponentCanvasModifier1560.ets | 43 + .../UIComponentCanvasModifier1570.ets | 43 + .../UIComponentCanvasModifier1590.ets | 36 + .../UIComponentCanvasModifier1600.ets | 45 + .../UIComponentCanvasModifier1700.ets | 46 + .../UIComponentCanvasModifier1710.ets | 46 + .../UIComponentCanvasModifier1720.ets | 39 + .../UIComponentCanvasModifier1760.ets | 37 + .../UIComponentCanvasModifier1780.ets | 38 + .../UIComponentCanvasModifier1840.ets | 38 + .../UIComponentCanvasModifier1860.ets | 43 + .../UIComponentCanvasModifier1870.ets | 35 + .../UIComponentCanvasModifier1900.ets | 35 + .../UIComponentCanvasModifier1920.ets | 37 + .../UIComponentCanvasModifier1940.ets | 38 + .../UIComponentCanvasModifier1960.ets | 38 + .../UIComponentCanvasModifier1970.ets | 50 + .../UIComponentCanvasModifier1980.ets | 50 + .../UIComponentCanvasModifier2010.ets | 44 + .../UIComponentCanvasModifier2040.ets | 46 + .../UIComponentCanvasModifier2050.ets | 36 + .../UIComponentCanvasModifier2100.ets | 39 + .../UIComponentCanvasModifier2140.ets | 36 + .../UIComponentCanvasModifier2220.ets | 43 + .../UIComponentCanvasModifier2230.ets | 38 + .../UIComponentCanvasModifier2250.ets | 40 + .../UIComponentCanvasModifier2270.ets | 40 + .../UIComponentCanvasModifier2320.ets | 40 + .../UIComponentCanvasModifier2390.ets | 42 + .../UIComponentCanvasModifier2420.ets | 39 + .../UIComponentCanvasModifier2440.ets | 44 + .../UIComponentCanvasModifier2450.ets | 43 + .../UIComponentCanvasModifier2510.ets | 41 + .../UIComponentCanvasModifier2600.ets | 40 + .../UIComponentCanvasModifier2630.ets | 40 + .../UIComponentCanvasModifier2640.ets | 40 + .../UIComponentCanvasModifier2650.ets | 39 + .../UIComponentCanvasModifier2660.ets | 39 + .../UIComponentCanvasModifier2680.ets | 40 + .../UIComponentCanvasModifier2740.ets | 36 + .../UIComponentCanvasModifier2770.ets | 36 + .../UIComponentCanvasModifier2810.ets | 41 + .../UIComponentCanvasModifier2820.ets | 40 + .../UIComponentCanvasModifier2830.ets | 42 + .../UIComponentCanvasModifier2840.ets | 43 + .../UIComponentCanvasModifier2850.ets | 43 + .../UIComponentCanvasModifier2860.ets | 40 + .../UIComponentCanvasModifier2900.ets | 42 + .../UIComponentCanvasModifier2920.ets | 42 + .../UIComponentCanvasModifier2930.ets | 41 + .../UIComponentCanvasModifier2940.ets | 41 + .../UIComponentCanvasModifier2960.ets | 44 + .../UIComponentCanvasModifier2970.ets | 45 + .../UIComponentCanvasModifier3000.ets | 36 + .../UIComponentCanvasModifier3030.ets | 43 + .../UIComponentCanvasModifier3070.ets | 46 + .../UIComponentCanvasModifier3090.ets | 39 + .../UIComponentCanvasModifier3120.ets | 38 + .../UIComponentCanvasModifier3130.ets | 36 + .../UIComponentCanvasModifier3150.ets | 46 + .../UIComponentCanvasModifier3180.ets | 43 + .../UIComponentCanvasModifier3210.ets | 45 + .../UIComponentCanvasModifier3220.ets | 36 + .../UIComponentCanvasModifier3230.ets | 47 + .../UIComponentCanvasModifier3270.ets | 38 + .../UIComponentCanvasModifier3290.ets | 48 + .../UIComponentCanvasModifier3300.ets | 53 + .../UIComponentCanvasModifier3320.ets | 40 + .../UIComponentCanvasModifier3350.ets | 49 + .../UIComponentCanvasModifier3390.ets | 40 + .../UIComponentCanvasModifier3430.ets | 38 + .../UIComponentCanvasModifier3440.ets | 43 + .../UIComponentCanvasModifier3450.ets | 38 + .../UIComponentCanvasModifier3480.ets | 38 + .../UIComponentCanvasModifier3490.ets | 45 + .../UIComponentCanvasModifier3510.ets | 41 + .../UIComponentCanvasModifier3520.ets | 43 + .../UIComponentCanvasModifier3540.ets | 38 + .../UIComponentCanvasModifier3550.ets | 38 + .../UIComponentCanvasModifier3580.ets | 42 + .../UIComponentCanvasModifier3660.ets | 38 + .../UIComponentCanvasModifier3700.ets | 42 + .../UIComponentCanvasModifier3720.ets | 37 + .../UIComponentCanvasModifier3730.ets | 36 + .../UIComponentCanvasModifier3740.ets | 41 + .../UIComponentCanvasModifier3770.ets | 46 + .../UIComponentCanvasModifier3780.ets | 37 + .../UIComponentCanvasReset0390.ets | 37 + .../UIComponentCanvasReset0400.ets | 36 + .../UIComponentCanvasReset0410.ets | 36 + .../UIComponentCanvasReset0420.ets | 36 + .../UIComponentCanvasReset0430.ets | 39 + .../UIComponentCanvasReset0440.ets | 42 + .../UIComponentCanvasReset0450.ets | 41 + .../UIComponentCanvasReset0460.ets | 37 + .../UIComponentCanvasReset0470.ets | 44 + .../UIComponentCanvasReset0480.ets | 43 + .../UIComponentCanvasReset0490.ets | 39 + .../UIComponentCanvasReset0500.ets | 39 + .../UIComponentCanvasReset0510.ets | 43 + .../UIComponentCanvasReset0520.ets | 40 + .../UIComponentCanvasReset0530.ets | 40 + .../UIComponentCanvasReset0540.ets | 41 + .../UIComponentCanvasReset0550.ets | 41 + .../UIComponentCanvasReset0560.ets | 42 + .../UIComponentCanvasReset0570.ets | 95 + .../UIComponentCanvasReset0580.ets | 39 + .../UIComponentCanvasReset0590.ets | 39 + .../UIComponentCanvasReset0600.ets | 41 + .../UIComponentCanvasReset0610.ets | 41 + .../UIComponentCanvasReset0620.ets | 42 + .../UIComponentCanvasReset0630.ets | 44 + .../UIComponentCanvasReset0640.ets | 36 + .../UIComponentCanvasReset0650.ets | 50 + .../UIComponentCanvasReset0660.ets | 47 + .../UIComponentCanvasReset0670.ets | 39 + .../UIComponentCanvasReset0680.ets | 39 + .../UIComponentCanvasReset0690.ets | 43 + .../UIComponentCanvasReset0700.ets | 38 + .../UIComponentCanvasReset0710.ets | 38 + .../UIComponentCanvasReset0720.ets | 58 + .../UIComponentCanvasReset0730.ets | 39 + .../UIComponentCanvasReset0740.ets | 37 + .../UIComponentCanvasReset0750.ets | 39 + .../UIComponentColumnMirrorImage0010.ets | 82 + .../UIComponentColumnMirrorImage0020.ets | 87 + .../UIComponentColumnMirrorImage0030.ets | 87 + .../UIComponentColumnMirrorImage0040.ets | 45 + .../UIComponentColumnMirrorImage0050.ets | 68 + .../UIComponentColumnMirrorImage0060.ets | 68 + .../UIComponentColumnMirrorImage0070.ets | 68 + .../UIComponentColumnMirrorImage0080.ets | 62 + .../UIComponentColumnMirrorImage0090.ets | 49 + .../UIComponentColumnMirrorImage0100.ets | 54 + .../UIComponentColumnMirrorImage0110.ets | 54 + .../UIComponentColumnMirrorImage0120.ets | 43 + .../UIComponentColumnMirrorImage0130.ets | 106 + .../UIComponentColumnMirrorImage0140.ets | 142 + .../UIComponentColumnMirrorImage0150.ets | 142 + .../UIComponentColumnMirrorImage0160.ets | 142 + .../UIComponentColumnMirrorImage0170.ets | 137 + .../UIComponentColumnMirrorImage0180.ets | 148 + .../UIComponentColumnMirrorImage0190.ets | 148 + .../UIComponentColumnMirrorImage0200.ets | 148 + .../UIComponentColumnMirrorImage0210.ets | 144 + .../UIComponentColumnMirrorImage0230.ets | 67 + .../UIComponentColumnMirrorImage0240.ets | 67 + .../UIComponentColumnMirrorImage0250.ets | 67 + .../UIComponentColumnMirrorImage0260.ets | 45 + .../UIComponentColumnMirrorImage0270.ets | 109 + .../UIComponentColumnMirrorImage0280.ets | 109 + .../UIComponentColumnMirrorImage0290.ets | 109 + .../UIComponentColumnMirrorImage0300.ets | 99 + .../UIComponentColumnMirrorImage0310.ets | 81 + .../UIComponentColumnMirrorImage0320.ets | 98 + .../UIComponentColumnMirrorImage0330.ets | 81 + .../UIComponentColumnMirrorImage0340.ets | 74 + .../UIComponentColumnMirrorImage0350.ets | 120 + .../UIComponentColumnMirrorImage0360.ets | 120 + .../UIComponentColumnMirrorImage0370.ets | 120 + .../UIComponentColumnMirrorImage0380.ets | 116 + .../UIComponentFlexSpace0010.ets | 56 + .../UIComponentFlexSpace0020.ets | 37 + .../UIComponentFlexSpace0030.ets | 37 + .../UIComponentFlexSpace0040.ets | 41 + .../UIComponentFlexSpace0050.ets | 36 + .../UIComponentFlexSpace0060.ets | 56 + .../UIComponentFlexSpace0070.ets | 39 + .../UIComponentFlexSpace0080.ets | 39 + .../UIComponentFlexSpace0090.ets | 41 + .../UIComponentFlexSpace0100.ets | 42 + .../UIComponentFlexSpace0110.ets | 42 + .../UIComponentFlexSpace0120.ets | 71 + .../UIComponentFlexSpace0130.ets | 54 + .../UIComponentFlexSpace0140.ets | 39 + .../UIComponentFlexSpace0150.ets | 55 + .../UIComponentFlexSpace0160.ets | 100 + .../UIComponentFlexSpace0170.ets | 42 + .../UIComponentFlexSpace0180.ets | 42 + .../UIComponentLayoutFlexDirection0010.ets | 58 + .../UIComponentLayoutFlexDirection0020.ets | 58 + .../UIComponentLayoutFlexDirection0030.ets | 58 + .../UIComponentLayoutFlexDirection0040.ets | 58 + .../UIComponentLayoutFlexDirection0050.ets | 58 + .../UIComponentLayoutFlexDirection0060.ets | 58 + .../UIComponentLayoutFlexDirection0070.ets | 58 + .../UIComponentLayoutFlexDirection0080.ets | 58 + .../UIComponentLayoutFlexDirection0090.ets | 57 + .../UIComponentLayoutFlexDirection0100.ets | 57 + .../UIComponentLayoutFlexDirection0110.ets | 57 + .../UIComponentLayoutFlexDirection0120.ets | 57 + .../UIComponentLayoutFlexDirection0130.ets | 57 + .../UIComponentLayoutFlexDirection0140.ets | 57 + .../UIComponentLayoutFlexDirection0150.ets | 57 + .../UIComponentLayoutFlexDirection0160.ets | 57 + .../UIComponentLayoutFlexDirection0170.ets | 57 + .../UIComponentLayoutFlexDirection0180.ets | 51 + .../UIComponentLayoutFlexDirection0190.ets | 56 + .../UIComponentLayoutFlexDirection0200.ets | 51 + .../UIComponentLayoutFlexDirection0210.ets | 54 + .../UIComponentLayoutFlexDirection0220.ets | 50 + .../UIComponentLayoutFlexDirection0230.ets | 51 + .../UIComponentLayoutFlexDirection0240.ets | 58 + .../UIComponentLayoutFlexDirection0250.ets | 59 + .../UIComponentLayoutFlexDirection0260.ets | 58 + .../UIComponentLayoutFlexDirection0270.ets | 58 + .../UIComponentLayoutFlexDirection0280.ets | 58 + .../UIComponentLayoutFlexDirection0290.ets | 58 + .../UIComponentLayoutFlexDirection0300.ets | 58 + .../UIComponentLayoutFlexDirection0310.ets | 58 + .../UIComponentLayoutFlexDirection0320.ets | 57 + .../UIComponentLayoutFlexDirection0330.ets | 57 + .../UIComponentLayoutFlexDirection0340.ets | 57 + .../UIComponentLayoutFlexDirection0350.ets | 57 + .../UIComponentLayoutFlexDirection0360.ets | 57 + .../UIComponentLayoutFlexDirection0370.ets | 57 + .../UIComponentLayoutFlexDirection0380.ets | 57 + .../UIComponentLayoutFlexDirection0390.ets | 57 + .../UIComponentLayoutFlexDirection0400.ets | 57 + .../UIComponentLayoutFlexDirection0410.ets | 51 + .../UIComponentLayoutFlexDirection0420.ets | 56 + .../UIComponentLayoutFlexDirection0430.ets | 51 + .../UIComponentLayoutFlexDirection0440.ets | 50 + .../UIComponentLayoutFlexDirection0450.ets | 54 + .../UIComponentLayoutFlexDirection0460.ets | 51 + .../UIComponentLayoutFlexDirection0470.ets | 51 + .../UIComponentLayoutFlexDirection0480.ets | 51 + .../UIComponentLayoutFlexDirection0490.ets | 50 + .../UIComponentLayoutFlexDirection0500.ets | 51 + .../UIComponentLayoutFlexDirection0510.ets | 50 + .../UIComponentLayoutFlexDirection0520.ets | 50 + .../UIComponentLayoutFlexDirection0530.ets | 50 + .../UIComponentLayoutFlexDirection0540.ets | 51 + .../UIComponentLayoutFlexDirection0550.ets | 51 + .../UIComponentLayoutFlexDirection0560.ets | 51 + .../UIComponentLayoutFlexDirection0570.ets | 51 + .../UIComponentLayoutFlexDirection0580.ets | 51 + .../UIComponentLayoutFlexDirection0590.ets | 51 + .../UIComponentLayoutFlexDirection0600.ets | 51 + .../UIComponentLayoutFlexDirection0610.ets | 51 + .../UIComponentLayoutFlexDirection0620.ets | 51 + .../UIComponentLayoutFlexDirection0630.ets | 51 + .../UIComponentLayoutFlexDirection0640.ets | 51 + .../UIComponentLayoutFlexDirection0650.ets | 56 + .../UIComponentLayoutFlexDirection0660.ets | 51 + .../UIComponentLayoutFlexDirection0670.ets | 50 + .../UIComponentLayoutFlexDirection0680.ets | 54 + .../UIComponentLayoutFlexDirection0690.ets | 50 + .../UIComponentLayoutFlexLayout0010.ets | 41 + .../UIComponentLayoutFlexLayout0020.ets | 41 + .../UIComponentLayoutFlexLayout0030.ets | 44 + ...herRowsplitandcolumnsplitAnimation0090.ets | 46 + ...herRowsplitandcolumnsplitAnimation0100.ets | 46 + ...herRowsplitandcolumnsplitAnimation0110.ets | 46 + ...herRowsplitandcolumnsplitAnimation0120.ets | 46 + ...herRowsplitandcolumnsplitAnimation0130.ets | 46 + ...herRowsplitandcolumnsplitAnimation0140.ets | 46 + ...herRowsplitandcolumnsplitAnimation0150.ets | 46 + ...herRowsplitandcolumnsplitAnimation0160.ets | 103 + ...herRowsplitandcolumnsplitAnimation0170.ets | 47 + .../UIComponentPositionOffset0020.ets | 68 + .../UIComponentPositionOffset0030.ets | 68 + .../UIComponentPositionOffset0040.ets | 68 + .../UIComponentPositionOffset0050.ets | 68 + .../UIComponentPositionOffset0060.ets | 118 + .../UIComponentPositionOffset0070.ets | 118 + .../UIComponentPositionOffset0090.ets | 25 + .../UIComponentPositionOffset0100.ets | 25 + .../UIComponentPositionOffset0110.ets | 25 + .../UIComponentPositionOffset0120.ets | 25 + .../UIComponentPositionOffset0130.ets | 25 + .../UIComponentPositionOffset0140.ets | 25 + .../UIComponentPositionOffset0150.ets | 51 + .../UIComponentPositionOffset0160.ets | 79 + .../UIComponentPositionOffset0170.ets | 29 + .../UIComponentPositionOffset0180.ets | 32 + .../UIComponentPositionOffset0190.ets | 32 + .../UIComponentPositionOffset0200.ets | 29 + .../UIComponentPositionOffset0210.ets | 29 + .../UIComponentPositionOffset0220.ets | 29 + .../UIComponentPositionOffset0230.ets | 32 + .../UIComponentPositionOffset0240.ets | 32 + .../UIComponentPositionOffset0250.ets | 37 + .../UIComponentPositionOffset0260.ets | 56 + .../UIComponentPositionOffset0270.ets | 77 + .../UIComponentPositionOffset0280.ets | 62 + .../UIComponentPositionOffset0290.ets | 31 + .../UIComponentPositionOffset0300.ets | 35 + .../UIComponentPositionOffset0310.ets | 38 + .../UIComponentPositionOffset0320.ets | 34 + .../UIComponentPositionOffset0330.ets | 34 + .../UIComponentPositionOffset0340.ets | 34 + .../UIComponentPositionOffset0350.ets | 58 + .../UIComponentPositionOffset0360.ets | 58 + .../UIComponentPositionOffset0380.ets | 29 + .../UIComponentPositionOffset0390.ets | 29 + .../UIComponentPositionOffset0400.ets | 29 + .../UIComponentPositionOffset0410.ets | 29 + .../UIComponentPositionOffset0420.ets | 29 + .../UIComponentPositionOffset0430.ets | 30 + .../UIComponentPositionOffset0440.ets | 26 + .../UIComponentPositionOffset0450.ets | 49 + .../UIComponentPositionOffset0460.ets | 35 + .../UIComponentPositionOffset0470.ets | 30 + .../UIComponentPositionOffset0480.ets | 30 + .../UIComponentPositionOffset0490.ets | 30 + .../UIComponentPositionOffset0500.ets | 30 + .../UIComponentPositionOffset0510.ets | 30 + .../UIComponentPositionOffset0520.ets | 31 + .../UIComponentPositionOffset0530.ets | 30 + .../UIComponentPositionOffset0540.ets | 30 + .../UIComponentPositionOffset0550.ets | 30 + .../UIComponentPositionOffset0560.ets | 30 + ...entRowColumnColumnSplitInteraction0010.ets | 41 + ...onentRowcolumnColumnsplitInterface0010.ets | 41 + ...onentRowcolumnColumnsplitInterface0020.ets | 41 + ...onentRowcolumnColumnsplitInterface0030.ets | 40 + ...omponentRowcolumnColumnsplitLayout0030.ets | 35 + ...omponentRowcolumnColumnsplitLayout0050.ets | 36 + ...omponentRowcolumnColumnsplitLayout0070.ets | 36 + ...omponentRowcolumnColumnsplitLayout0090.ets | 37 + ...omponentRowcolumnColumnsplitLayout0110.ets | 42 + ...omponentRowcolumnColumnsplitLayout0130.ets | 42 + ...omponentRowcolumnColumnsplitLayout0140.ets | 41 + ...omponentRowcolumnColumnsplitLayout0150.ets | 41 + ...ComponentsPluginComponentInterface0010.ets | 65 + ...ComponentsPluginComponentInterface0040.ets | 68 + ...ComponentsPluginComponentInterface0050.ets | 68 + ...ComponentsPluginComponentInterface0060.ets | 68 + .../plugin_component.js | 91 + ...tsXcomponentSurfaceBackgroundcolor0010.ets | 44 + ...tsXcomponentSurfaceBackgroundcolor0020.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0030.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0040.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0050.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0060.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0070.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0080.ets | 45 + ...tsXcomponentSurfaceBackgroundcolor0090.ets | 45 + ...mponentsXcomponentSurfaceInterface0010.ets | 53 + ...mponentsXcomponentSurfaceInterface0020.ets | 55 + ...mponentsXcomponentSurfaceInterface0040.ets | 56 + ...mponentsXcomponentSurfaceInterface0050.ets | 58 + ...mponentsXcomponentSurfaceInterface0060.ets | 54 + ...mponentsXcomponentSurfaceInterface0070.ets | 57 + ...mponentsXcomponentSurfaceInterface0080.ets | 59 + ...mponentsXcomponentSurfaceInterface0090.ets | 58 + ...mponentsXcomponentSurfaceInterface0100.ets | 54 + ...mponentsXcomponentSurfaceInterface0110.ets | 56 + ...mponentsXcomponentSurfaceInterface0140.ets | 58 + ...mponentsXcomponentSurfaceInterface0180.ets | 59 + ...mponentsXcomponentSurfaceInterface0190.ets | 39 + .../UIComponentUIsupportColor0290.ets | 40 + .../UIComponentUIsupportColor0300.ets | 40 + .../UIComponentUIsupportColor0310.ets | 40 + .../UIComponentUIsupportColor0320.ets | 40 + .../UIComponentUIsupportColor0330.ets | 35 + .../UIComponentUIsupportColor0340.ets | 35 + .../UIComponentUIsupportColor0350.ets | 35 + .../UIComponentUIsupportColor0360.ets | 57 + .../UIComponentUIsupportColor0370.ets | 57 + .../UIComponentUIsupportColor0380.ets | 57 + .../UIComponentUIsupportColor0390.ets | 57 + .../UIComponentUIsupportColor0400.ets | 41 + .../UIComponentUIsupportColor0410.ets | 41 + .../UIComponentUIsupportColor0420.ets | 51 + .../resources/base/element/string.json | 4 + .../resources/base/profile/test_pages.json | 712 ++- 703 files changed, 52113 insertions(+), 1 deletion(-) create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/WaterFlowDataSource.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410.ets create mode 100644 function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420.ets 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 0860e1238..225f92c1c 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 @@ -150,6 +150,33 @@ import UIComponentPopupBoxToastStyleInterface001 import UIComponentPopupBoxFullDialogInterface001 from './UIComponentPopupBoxFullDialogInterfaceTest/UIComponentPopupBoxFullDialogInterface001.test'; +import UIComponentCanvasReset from './UIComponentCanvasResetTest/UIComponentCanvasReset.test'; +import UIComponentSpecialComponentsPluginComponentInterface from './UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test'; +import UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor from './UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test'; +import UIComponentSpecialComponentsXcomponentSurfaceInterface from './UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test'; +import UIAttributesStatestylesInterfaceSupportstage from './UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test'; +import UIComponentPositionOffset from './UIComponentPositionOffsetTest/UIComponentPositionOffset.test'; +import UIAttributesPositionSizePosition from './UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test'; +import UIAttributesStatestylesInterfaceNestedScrolling from './UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test'; +import UIComponentUIsupportColor1 from './UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test'; +import UIComponentColumnMirrorImage from './UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test'; +import UIComponentFlexSpace from './UIComponentFlexSpaceTest/UIComponentFlexSpace.test'; +import UIComponentLayoutFlexDirection from './UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test'; +import UIAttributesPositionSizeFeature from './UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test'; +import UIComponentOtherRowsplitandcolumnsplitAnimation from './UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test'; +import UIComponentRowColumnColumnSplitInteraction from './UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test'; +import UIComponentCanvasAttribute from './UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test'; +import UIComponentCanvasInterface from './UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test'; +import UIAttributesPositionSizeLayoutPropertie + from './UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test'; +import UIComponentLayoutFlexLayout from './UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test'; +import UIComponentRowcolumnColumnsplitInterface + from './UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test'; +import UIComponentCanvasModifier from './UIComponentCanvasModifierTest/UIComponentCanvasModifier.test'; +import UIComponentRowcolumnColumnsplitLayout + from './UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test'; +import UIComponentCanvasCanvasRender from './UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test'; + export default function testsuite() { ComponentTextRicheditorFontfeatures(); ComponentTextRicheditorCustomColors(); @@ -239,6 +266,32 @@ export default function testsuite() { UIComponentPopupBoxAttribute(); UIComponentPopupBoxPromptToastSequence(); UIComponentPopupBoxSpecificationsPopup(); + + UIComponentCanvasReset(); + UIComponentSpecialComponentsPluginComponentInterface(); + UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor(); + UIComponentSpecialComponentsXcomponentSurfaceInterface(); + UIAttributesStatestylesInterfaceSupportstage(); + UIComponentPositionOffset(); + UIAttributesPositionSizePosition(); + UIAttributesStatestylesInterfaceNestedScrolling(); + UIComponentUIsupportColor1(); + UIComponentColumnMirrorImage(); + UIComponentFlexSpace(); + UIComponentLayoutFlexDirection(); + UIAttributesPositionSizeFeature(); + UIComponentOtherRowsplitandcolumnsplitAnimation(); + UIComponentRowColumnColumnSplitInteraction(); + UIComponentCanvasAttribute(); + + UIComponentCanvasInterface(); + UIAttributesPositionSizeLayoutPropertie(); + UIComponentLayoutFlexLayout(); + UIComponentRowcolumnColumnsplitInterface(); + UIComponentCanvasModifier(); + UIComponentRowcolumnColumnsplitLayout(); + UIComponentCanvasCanvasRender(); + } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets new file mode 100644 index 000000000..8970c6597 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.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. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, 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 UIAttributesPositionSizeFeature() { + + describe('UIAttributesPositionSizeFeature', () => { + 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_ATTRIBUTES_POSITION_SIZE_FEATURE_0060 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_FEATURE_0060 + * @tc.desc 1.启动测试应用 + 2.在SR列表页面点击按钮"Canvas支持绘制能力增强” + 3.在用例一览页面点击按钮"ArkUI_Calc_0600° + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_FEATURE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_FEATURE_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_FEATURE_0060 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 + * @tc.name SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 + * @tc.desc + */ + it("SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160", 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 start.`); + Settings.createWindow('testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160'); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0080 + * @tc.name SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0080 + * @tc.desc + */ + it("SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0080", 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0080 start.`); + Settings.createWindow('testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080'); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0080 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0020 + * @tc.name SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0020 + * @tc.desc + */ + it("SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0020", 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0020 start.`); + Settings.createWindow('testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020'); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0020 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets new file mode 100644 index 000000000..cf7225b30 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, 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 UIAttributesPositionSizeFeature() { + describe("UIAttributesPositionSizeLayoutPropertie", () => { + /* + * @tc.number SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 + * @tc.name SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 + * @tc.desc + */ + it("SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070", 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070 START`); + Settings.createWindow('testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070'); +/*await Utils.sleep(1000); +let driver: Driver = Driver.create(); +let size = await driver.getDisplaySize(); +driver.swipe(size.x / 2, size.y / 2, 0, 0);*/ +await Utils.sleep(3000); +windowSnap.snapShot(); +await Utils.sleep(3000); +Logger.error('TEST', `SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070 finish.`); +done(); +}) +}) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets new file mode 100644 index 000000000..199adb8e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets @@ -0,0 +1,901 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesPositionSizePosition() { + + describe('UIAttributesPositionSizePosition', () => { + 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_ATTRIBUTES_POSITION_SIZE_POSITION_0010 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0010 +* @tc.desc 1、添加尺寸组件2、position设置为{x:0y:100%}markAnchor设置为x:0y:100%} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0010 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0020 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0020 +* @tc.desc 1、添加尺寸组件2、position设置为{x:0y:100%}markAnchor设置为x:0y:100%} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0020 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0030 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0030 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量{x:0,y:0} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0030 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0040 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0040 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5y:-5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0050 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0050 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5y:-5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0060 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0060 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为区:-5y:5] + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0070 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0070 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5 y:-5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0080 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0080 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5 y:5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0080 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0100 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0100 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:-5y:5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0110 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0110 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5y:-5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0110 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0120 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0120 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5y:5} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0120 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0130 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0130 +* @tc.desc 1、添加尺寸组件 + 2、设置百分百{x:"50%'y:"50%} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0130 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0140 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0140 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量{x:5abcy:5abc} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0150 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0150 +* @tc.desc 1、添加尺寸组件 + 2、设置偏移量{x:0,y:0} + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0150 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0160 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0160 +* @tc.desc 1、添加尺寸组件 +2、设置元素水平方向布局的directtion属性为-1 + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0160 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0170 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0170 +* @tc.desc 1、添加尺寸组件 + 2、设置元素水平方向布局的directtion属性为0 + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0170 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0180 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0180 +* @tc.desc 1、添加尺寸组件 + 2、设置元素水平方向布局的 Direction.Auto + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0180 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0190 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0190 +* @tc.desc 1、添加尺寸组件 + 2、设置元素水平方向布局的 Direction.Ltr + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0190 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0200 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0200 +* @tc.desc 1、添加尺寸组件 + 2、设置元素水平方向布局的 Direction.Rtl + 3、查看设置元素在位置定位时的锚点 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0200 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0210 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0210 +* @tc.desc 1、添加尺寸组件 +2、设置对齐方式align属性是-1 +3、查看组件的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0210 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0220 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0220 +* @tc.desc 1、添加尺寸组件 +2、设置对齐方式align属性是0 +3、查看组件的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0220 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0230 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0230 +* @tc.desc 1、添加尺寸组件 +2、设置对齐方式align属性是1 +3、查看组件的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0230 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0240 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0240 +* @tc.desc 1、添加尺寸组件 +2、设置对齐方式align属性是1000 +3、查看组件的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0240 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0240 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0250 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0250 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的bottom参数VerticalAlign.Bottom + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0250 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0260 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0260 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的bottom参数VerticalAlign.Center + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0260 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0270 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0270 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的bottom参数VerticalAlign.Top + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0270 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0280 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0280 +* @tc.desc 1、添加尺寸容器组件 +2、设置alignRules接口的center参数VerticalAlign.Bottom +3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0280 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0290 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0290 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的center参数VerticalAlign.Bottom + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0290 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0300 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0300 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的center参数VerticalAlign.Top + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0300 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0300 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0310 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0310 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的center参数VerticalAlign.End + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0310 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0320 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0320 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的left参数为HorizontalAlign.Start + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0320 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0330 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0330 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的left参数为HorizontalAlign.Center + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0330 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0340 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0340 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的middle参数HorizontalAlign.End + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0340 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0350 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0350 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的middle参数HorizontalAlign.Start + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0350 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0360 +* @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0360 +* @tc.desc 1、添加尺寸容器组件 + 2、设置alignRules接口的middle参数HorizontalAlign.Center + 3、查看容器的对齐方式 +*/ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0360 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0090 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0090 + * @tc.desc 1、添加尺寸组件 + 2、设置偏移量为{x:5abc,y:5abc] + 3、查看设置元素在位置定位时的锚点 + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090") + + await Utils.sleep(1000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0090 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0370 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0370 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0370 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0370 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0380 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0380 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0380 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0380 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0390 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0390 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0390 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0390 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0400 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0400 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0400 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0400 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0410 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0410 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0410 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0410 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0420 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0420 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0420 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0420 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0430 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0430 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0430 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0430 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0440 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0440 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0440 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0440 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0450 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0450 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0450 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0450 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0460 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0460 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0460 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0460 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0470 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0470 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0470 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0470 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0480 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0480 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0480 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0480 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0490 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0490 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0490 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0490 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0500 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0500 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0500 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0500 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0510 + * @tc.name SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0510 + * @tc.desc + */ + it('SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0510 START`); + Settings.createWindow("testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_POSITION_SIZE_POSITION_0510 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets new file mode 100644 index 000000000..d9c51cdf6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets @@ -0,0 +1,1544 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceNestedScrolling() { + + describe('UIAttributesStatestylesInterfaceNestedScrolling', () => { + 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_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0060 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0060 +* @tc.desc 1.子组件配置scrollFroward\scrollBackward(NestedScrollMode.SELF_FIRST) + 2.编译运行代码,通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0060')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070 +* @tc.desc 1.子组件配置scrollFroward\scrollBackward(NestedScrollMode.SELF_ONLY) + 2.编译运行代码,通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0070')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0080 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0080 +* @tc.desc 1.子组件配置scrollFroward\scrollBackward(NestedScrollMode.SELF_ONLY) + 2.编译运行代码,通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0080')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0080 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0090 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0090 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0090')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0090 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0100 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0100 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0100')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0110 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0110 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0110')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0110 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0120 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0120 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0120')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + /*await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0120 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0130 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0130 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0130')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0130 finish.`); + done() + }) + + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0140 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0140 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0140')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0150 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0150 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0150')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0150 finish.`); + done() + }) + + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0160 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0160 +* @tc.desc 1.孙组件配置scrollFroward\scrollBackward(NestedScrolMode.PARALLEL) + 2 编 译 运 行 代 码 ,  通 过 手 指 划 动 / 鼠 标 滚 轮划 动 孙 组 件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0160')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0160 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0170 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0170 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST) scrollBackward(NestedScrollMode.SELF_FIRST) + 2.编译运行代码,向下通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170") + await Utils.sleep(1000) + + /*let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0170')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0170 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0280 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0280 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST) scrollBackward(NestedScrollMode.SELF_FIRST) + 2.编译运行代码,向下通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0280 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0280')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0280 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0270 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0270 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST) scrollBackward(NestedScrollMode.SELF_FIRST) + 2.编译运行代码,向下通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0270 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0270')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x+100,pos.y,pos.x-100,pos.y) + await Utils.sleep(2000) + + await driver.swipe(pos.x-100,pos.y,pos.x+100,pos.y) + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0270 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0260 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0260 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件和父组件布局设置均为纵向模式 + 2.编译运行代码,向下通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0260 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260") + await Utils.sleep(1000) + + /*let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0260')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x,pos.y+250,pos.x,pos.y-250) + await Utils.sleep(2000) + + await driver.swipe(pos.x,pos.y-250,pos.x,pos.y+250)*/ + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0260 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0250 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0250 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件和父组件布局设置均为横向模式 + 2.编译运行代码,向右通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0250 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250") + await Utils.sleep(1000) + + /*let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let watrerFlowCenter:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0250')); + let pos = await watrerFlowCenter.getBoundsCenter() + await Utils.sleep(500) + + await driver.swipe(pos.x+100,pos.y,pos.x-100,pos.y) + await Utils.sleep(2000) + + await driver.swipe(pos.x-100,pos.y,pos.x+100,pos.y) + await Utils.sleep(2000)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0250 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0240 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0240 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件和父组件布局设置均为横向模式 + 2.编译运行代码,向右通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0240 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0240_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0240 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0230 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0230 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件和父组件布局设置均为横向模式 + 2.编译运行代码,向右通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0230 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0230_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0230 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0220 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0220 +* @tc.desc 1.子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件和父组件布局设置均为横向模式 + 2.编译运行代码,向右通过手指划动/鼠标滚轮划动子组件 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0220 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0220_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0220 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210 +* @tc.desc 1.子组件配置sCrollFroward(NestedScrollMode.PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件加入控制器ScrollerscrollEdge(Edge.End)方法 + 2. 编译运行代码  启用控制器 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210") + await Utils.sleep(1000) + + /*let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0210_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0200 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0200 +* @tc.desc 1.子组件配置sCrollFroward(NestedScrollMode.PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件加入控制器ScrollerscrollEdge(Edge.End)方法 + 2. 编译运行代码  启用控制器 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200") + await Utils.sleep(1000) + + /*let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0200_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0200 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0190 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0190 +* @tc.desc 1.子组件配置sCrollFroward(NestedScrollMode.PARENT_FIRST)scrollBackward(NestedScrollMode SELF_FIRST),子组件加入控制器ScrollerscrollEdge(Edge.End)方法 + 2. 编译运行代码  启用控制器 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0190_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0190 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0180 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0180 +* @tc.desc 1子组件配置scrollFroward(NestedScrollMode PARENT_FIRST)scrollBackward(NestedScrollMode.SELF_FIRST),子组件加入控制器Scroller scrollBy(dx)方法 +2.编译运行代码,启用控制器 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0180_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_NESTEDSCROLLING_0180 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0010 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0010 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0010')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0010 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0020 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0020 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0020')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0030 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0030 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0030')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0040 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0040 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0040')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0040 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0050 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0050 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0050')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0050 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0290 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0290 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0290 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0290')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0290 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0300 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0300 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0300 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0300')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0300 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0310 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0310 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0310 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0310')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0320 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0320 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0320 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0320')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0320 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0330 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0330 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0330 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0330')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0340 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0340 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0340 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0340')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0350 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0350 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0350 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0350')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0350 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0360 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0360 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0360 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0360')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0360 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0370 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0370 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0370 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0370')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0370 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0380 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0380 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0380 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0380')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0380 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0390 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0390 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0390 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0390')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0390 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0400 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0400 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0400 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0400')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0400 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0410 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0410 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0410 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0410')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0410 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0420 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0420 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0420 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0420')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0420 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0430 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0430 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0430 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0430')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0430 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0440 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0440 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0440 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0440')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0440 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0450 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0450 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0450 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0450')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0450 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0460 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0460 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0460 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0460')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0460 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0470 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0470 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0470 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0470')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0470 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0480 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0480 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0480 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0480')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0480 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0490 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0490 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0490 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0490')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + /*await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250);*/ + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0490 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0500 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0500 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0500 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0500')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0500 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0510')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0520 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0520 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0520 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0520')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0520 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0540 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0540 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0540 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0540_001')); + //await button.click(); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0540 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0550 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0550 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0550 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550"); + await Utils.sleep(3000); + // let driver: Driver = Driver.create(); + // await Utils.sleep(500); + //let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0550_001')); + //await button.click(); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0550 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0560 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0560 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0560 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0560_001')); + //await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0560 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0570_001')); + //await button.click(); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0580 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0580 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0580 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580"); + await Utils.sleep(3000); + // let driver: Driver = Driver.create(); + // await Utils.sleep(500); + //let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0580_001')); + //await button.click(); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0580 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0590 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0590 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0590 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0590_001')); + //await button.click(); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0590 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0600 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0600 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0600 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0600_001')); + //await button.click(); + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0600 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0610 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0610 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0610', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0610 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0610')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + /*await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250);*/ + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0610 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0620 + * @tc.name SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0620 + * @tc.desc + */ + it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0620', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0620 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620"); + await Utils.sleep(1000); + let driver: Driver = Driver.create(); + await Utils.sleep(500); + let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0620')); + let pos = await watrerFlowCenter.getBoundsCenter(); + await Utils.sleep(500); + /*await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); + await Utils.sleep(2000); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250);*/ + await Utils.sleep(2000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0620 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets new file mode 100644 index 000000000..fd21aa926 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets @@ -0,0 +1,404 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceSupportstage() { + + describe('UIAttributesStatestylesInterfaceSupportstage', () => { + 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_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0190 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0190 +* @tc.desc 1、设置查询条件为screen and (round-screen:true) + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0190 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0190 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0200 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0200 +* @tc.desc 1、设置查询条件为screen and (round-screen:true) + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0200 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0200 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0180 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0180 +* @tc.desc 1、不设置查询条件 + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0180 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0180 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0170 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0170 +* @tc.desc 1、设置查询条件为dark-mode为false + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0170 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0170 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0160 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0160 +* @tc.desc 1、设置查询条件为dark-mode为true + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0160 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0160 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0070 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0070 +* @tc.desc 设置查询条件为screen and (width>=100) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0070 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0080 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0080 +* @tc.desc 设置查询条件为screen and (width<100) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0080 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0080 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0050 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0050 +* @tc.desc 设置查询条件为screenand (max-height<1000) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0050 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0040 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0040 +* @tc.desc 设置查询条件为screen and (min-height<600) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0040 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0030 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0030 +* @tc.desc 设置查询条件为screen and (height >=600) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0030 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0030 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0060 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0060 +* @tc.desc 设置查询条件为screen and (height <= 50) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0060 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0060 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0150 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0150 +* @tc.desc 设置查询条件为screen and (resolution>5) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0150 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0150 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0120 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0120 +* @tc.desc 设置查询条件为screen and (device-width>=400) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0120 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0120 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0140 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0140 +* @tc.desc 设置查询条件为screenand (max-device-width<600) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0140 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0110 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0110 +* @tc.desc 设置查询条件为screenand (max-device-height<1000) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0110 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0110 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0130 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0130 +* @tc.desc 设置查询条件为screenand (min-device-width>400) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0130 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0130 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0100 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0100 +* @tc.desc 设置查询条件为screenand (min-device-height>400) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0100 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0210 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0210 +* @tc.desc 设置查询条件为screen and (device-type) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0210 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0210 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0090 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0090 +* @tc.desc 设置查询条件为screenand (device-height<1000) +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0090 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0090 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0010 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0010 +* @tc.desc 设置查询条件为landscape +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0010 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0010 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0020 +* @tc.name SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0020 +* @tc.desc 设置查询条件为portrait +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0020 start.`); + Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_ATTRIBUTES_STATESTYLES_INTERFACE_SUPPORTSTAGE_0020 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets new file mode 100644 index 000000000..bc0fa35e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets @@ -0,0 +1,1562 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentCanvasAttribute() { + + describe('UIComponentCanvasAttribute', () => { + 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_CANVAS_ATTRIBUTE_0430 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0430 + * @tc.desc 1、direction设置为"rtl",使用reset方法 + 2、查看绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0430 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0430 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0440 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0440 + * @tc.desc 1、设置flIStyle ='red'、flRect(20,20,150,100)、reset()、filIRect(20.150.150,100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0440 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0440 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0450 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0450 + * @tc.desc 1、设置this.context.font ='30vp sans-serif'、reset ()、this.context.filText('Hello World!',100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0450 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0450 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0490 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0490 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0500 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0500 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0510 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0510 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0520 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0520 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0540 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0540 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0550 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0550 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0560 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0560 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0580 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0580 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0590 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0590 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0600 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0600 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0610', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0610 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0610 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0620', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0620 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0620 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1120 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1120 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1120 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1120 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1110 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1110 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1110 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1070 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1070 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1070 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1070 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1050 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1050 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1050 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1050 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1030 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1030 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1030 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1030 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1010 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1010 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1010 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1000 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1000 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1000', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1000 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1000 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0980 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0980 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0980', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0980 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0980 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0970 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0970 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0970', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0970 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0970 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0960 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0960 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0960', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0960 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0960 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0950 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0950 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0950', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0950 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0950 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0940 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0940 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0940', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0940 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0940 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0930 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0930 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0930', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0930 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0930 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0920 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0920 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0920', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0920 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0920 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0900 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0900 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0900', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0900 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0900 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0820 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0820 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0820', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0820 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0820 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0830 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0830 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0830', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0830 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0830 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0880 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0880 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0880', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0880 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0880 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0860 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0860 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0860', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0860 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0860 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0770 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0770 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0770', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0770 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0770 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0760 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0760 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0760', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0760 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0760 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0730 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0730 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0730', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0730 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0730 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0700 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0700 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0700', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0700 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0700 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0690 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0690 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0690', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0690 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0690 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0670 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0670 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0670', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0670 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0670 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0680 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0680', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0680 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0680 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0570 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0570 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0570 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0570 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0660 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0660 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0660', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0660 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0660 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0710 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0710', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0710 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0710 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0650 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0650 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0650', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0650 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0650 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0720 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0720', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0720 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0720 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0640 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0640 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0640', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0640 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0640 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0750 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0750', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0750 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0750 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0630 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0630 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0630', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0630 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0630 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0790 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0790', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0790 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0790 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1160 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1160 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1160 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1160 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1130 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1130 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1130 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0800 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0800', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0800 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0800 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1140 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1140 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1140 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_1140 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0850 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0850', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0850 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0850 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0870 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0870', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0870 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0870 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0890 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0890', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0890 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0890 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1020 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1020 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1020 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1040 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1040 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1040 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1060 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1060 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1060 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1090 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1090 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1090 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1080 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1080 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1080 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0810 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0810', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0810 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0810 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0080 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0090 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0370 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0370 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0380 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0380 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0390 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0410 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0410 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0460 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0460 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0470 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0470 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0480 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0480 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0010 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0010 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0010', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010") + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('Button_click')) + await Utils.sleep(1000) + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0030 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0030 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0030', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030") + await Utils.sleep(1000) + let driver: Driver = Driver.create() + let button: Component = await driver.findComponent(ON.id('Button_click')) + await Utils.sleep(1000) + button.click() + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0030 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0360 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0360 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0360 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0360 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0020 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0020 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0020', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0020 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0350 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0350 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0350 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0040 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0040 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0040', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0040 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0200 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0200 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0200', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0200 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0200 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0250 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0250 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0250 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0250 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0260 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0260 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0260', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0260 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0260 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0190 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0190 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0190', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0190 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0190 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0290 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0290 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0290', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0290 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0290 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0240 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0240 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0240', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0240 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0240 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0270 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0270 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0270 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0270 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0220 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0220 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0220', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0220 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0220 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0230 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0230 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0230 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0230 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0280 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0280 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0280', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0280 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0280 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0210 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0210 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0210 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0210 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0180 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0180 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0180 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0120 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0120 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0120', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0120 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0120 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0170 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0170 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0170', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0170 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0170 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0150 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0150 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0150 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0150 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0140 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0140 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0140', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0140 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0160 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0160 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0160', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0160 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0160 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0130 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0130 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0130 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0110 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0110 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0110 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0340 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0340 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0340 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0340 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0320 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0320 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0320 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0320 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0300 + * @tc.name SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0300 + */ + it('SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0300 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_ULCOMPONENT_CANVAS_ATTRIBUTE_0300 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0060 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0060 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0060', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0060 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0310 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0310 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0310 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0310 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0330 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0330 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0330 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0330 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0400 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0400 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0400 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0400 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0420 + * @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0420 + * @tc.desc UlComponentCanvasAttribute + */ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0420 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_0420 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_1150 +* @tc.name SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_1150 +* @tc.desc UlComponentCanvasAttribute +*/ + it('SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_1150', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_1150 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UL_COMPONENT_CANVAS_ATTRIBUTE_1150 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0070 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0070 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070") + await Utils.sleep(5000) + windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0070 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1100 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1100 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_1100 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0780 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0780', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0780 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0780 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0840 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0840', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0840 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0840 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0740 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0740', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0740 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0740 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0990 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0990', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0990 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0990 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0910 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0910', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0910 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_ATTRIBUTE_0910 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets new file mode 100644 index 000000000..dd0ea8ff5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, 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 UIComponentCanvasCanvasRender() { + + describe('UIComponentCanvasCanvasRender', () => { + 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_CANVAS_CANVAS_RENDER_0050 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_CANVAS_RENDER_0050 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_CANVAS_RENDER_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_CANVAS_RENDER_0050 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_CANVAS_RENDER_0050 finish.`); + done() + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets new file mode 100644 index 000000000..ede7337d5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentCanvasInterface() { + + describe('UIComponentCanvasInterface', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + + it('SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1320 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1320 finish.`); + done() + }) + + it('SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1170 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1170 finish.`); + done() + }) + + it('SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1570 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UICOMPONENT_CANVAS_INTERFACE_1570 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_0350 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1860', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1860 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1860 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1910', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1910 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910") + await Utils.sleep(3000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_1910 finish.`); + done() + }) + + + + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2550 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2550 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2550 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2560 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2560 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_INTERFACE_2560 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets new file mode 100644 index 000000000..8eb6c0ca8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets @@ -0,0 +1,1740 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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, MouseButton, On } from '@ohos.UiTest' + +export default function UIComponentCanvasModifier() { + + describe('UIComponentCanvasModifier', () => { + 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_CANVAS_MODIFIER_0380 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0380 + * @tc.desc 1、direction设置为"rtl",使用reset方法 + 2、查看绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0380 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0380 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0570 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0570 + * @tc.desc 1、设置flIStyle ='red'、flRect(20,20,150,100)、reset()、filIRect(20.150.150,100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0570 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0570 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0630 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0630 + * @tc.desc 1、设置this.context.font ='30vp sans-serif'、reset ()、this.context.filText('Hello World!',100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0630', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0630 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0630 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0670', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0670 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0670 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1020 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1020 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1560 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1560 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1600 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1600 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3070 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3070 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3270 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3270 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3350 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3350 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3450 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3450 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3510 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510") + + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3510 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0980 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0980', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0980 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0980 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1970 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1970', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1970 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1970 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0620 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0620', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0620 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0620 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1030 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1030 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1030 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1370 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1370 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1370 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2820 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2820', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2820 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2820 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1980 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1980', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1980 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1980 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1260 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1260 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1260 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0170 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0170 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0170 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2650 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2650', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2650 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2650 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2660 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2660', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2660 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2660 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1840 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1840', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1840 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1840 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0160 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0160 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0160 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2600 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2600 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2600 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3700 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3700', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3700 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3700 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3780', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3780 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3780 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3220 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3220 finish.`); + done() + }) + + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3130 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3090 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2920', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2920 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2920 finish.`); + done() + }) + + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2390 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1430 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1340 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1300 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1300 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0960', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0960 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0960 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0420 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0420 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0190 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0190 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1290 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1290 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1290 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2680 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2680', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2680 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2680 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1940 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1940', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1940 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1940 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0090 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0090 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0090 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3150 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3150 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3150 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3580 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3580 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3580 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0370 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0370 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0370 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0340 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0340 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0340 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0390 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0390 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2850 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2850', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2850 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2850 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2840 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2840', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2840 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2840 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0350 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0350 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0350 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1550 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1550 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1550 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1900 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1900', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1900 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1900 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2040 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2040 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2040 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2230 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2230 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2230 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2450 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2450 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2450 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2830 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2830', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2830 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2830 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3120 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3120 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3120 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3290 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3290 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3290 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3430 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3430 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3430 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3490 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3490 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3490 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3540 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3540 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3540 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1130 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1130 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0510 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0510 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0510 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1500 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1500 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1500 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2510 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2510 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2510 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2440 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2440 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2440 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3440 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3440 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3440 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3520 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3520 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3520 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3660 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3660', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3660 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3660 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3180 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3180 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3180 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0140 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0140 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0140 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1590 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1590 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1590 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2970 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2970', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2970 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2970 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1870 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1870', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1870 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1870 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3740 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3740', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3740 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3740 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2140 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2140 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2140 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1470 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1470 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1470 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2220 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2220 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2220 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2050 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2050 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2050 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2010 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2010 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2740 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2740', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2740 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2740 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2860 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2860', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2860 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2860 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3300 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3300 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3300', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3300 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3300 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3230 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3230 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3230 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3230 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1570 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1570 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1570', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1570 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1570 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2630 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2630 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2630', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2630 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2630 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0310 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0310 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0310 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0310 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1700 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1700 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1700', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1700 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1700 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1860 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1860 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1860', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1860 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1860 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3730 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3730 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3730', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3730 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3730 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1050 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1050 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1050', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1050 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1050 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3210 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3210 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3210', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3210 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3210 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0230 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0230 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0230', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0230 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0230 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2810 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2810 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2810', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2810 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2810 finish.`); + done() + }) + + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2960 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2960 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2960 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2960 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2930 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2930 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2930', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2930 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2930 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2640 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2640 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2640', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2640 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2640 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0250 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0250 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0250 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0250 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3000 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3000 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3000', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3000 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3000 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1710 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1710 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1710', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1710 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1710 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0180 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0180 + * @tc.desc UIComponentCanvasModifier + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0180', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0180 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0180 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0560 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0560 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0970', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0970 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0970 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1080 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1080 finish.`); + done() + }) + + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1920', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1920 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1920 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3390 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2900', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2900 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2900 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3030 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3030 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1310 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1310 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3550 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3550 finish.`); + done() + }) + + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0110 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3480 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3480 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3480 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0470 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0470 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0470 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2770 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2770', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2770 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2770 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0330 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0330 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0330 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1170 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1170 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1170 finish.`); + done() + }) + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0070 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0070', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0070 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0070 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2420 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2420', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2420 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2420 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1520 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1520', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1520 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1520 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0130 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0130', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0130 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0130 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3320 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3320 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1720 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1720 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1720 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1780 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1780', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1780 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1780 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1960 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1960', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1960 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1960 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0610 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0610', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0610 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0610 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2250 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2250', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2250 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2250 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1110 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1110', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1110 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1110 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2320 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2320 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2320 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3720 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3720', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3720 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3720 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1760 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1760', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1760 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1760 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0400 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0400', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0400 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0400 finish.`); + done(); + }) + + /** + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2270 + * + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2270', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2270 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270"); + await Utils.sleep(3000); + await windowSnap.snapShot(); + await Utils.sleep(2000); + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2270 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3770 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3770', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3770 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_3770 finish.`); + done() + }) + /* + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1390 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390") + await Utils.sleep(2000) + await windowSnap.snapShot() + await Utils.sleep(4000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_1390 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0580 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_0580 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2940', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2940 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2940 finish.`); + done() + }) + it('SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2100 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_MODIFIER_2100 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets new file mode 100644 index 000000000..405d608d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets @@ -0,0 +1,679 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentCanvasReset() { + + describe('UIComponentCanvasReset', () => { + 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_CANVAS_RESET_0570 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0570 + * @tc.desc 1、direction设置为"rtl",使用reset方法 + 2、查看绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0570', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0570 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0570 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0390 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0390 + * @tc.desc 1、设置flIStyle ='red'、flRect(20,20,150,100)、reset()、filIRect(20.150.150,100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0390 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0390 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0460 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0460 + * @tc.desc 1、设置this.context.font ='30vp sans-serif'、reset ()、this.context.filText('Hello World!',100) + 2、观察绘制效果 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0460 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0460 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0490 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0490 +* @tc.desc 1、1、设置globalAlpha为0.2、使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0490 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0490 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0510 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0510 +* @tc.desc 1、lobalCompositeOperation设置为destination-out,使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0510 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0510 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0580 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0580 +* @tc.desc 1、height设置为300,使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0580', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0580 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0580 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0440 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0440 +* @tc.desc 、设置lineCap ='round'、reset0、lineWidth =10、beginPath0、moveTo(3050)、lineTo(220,50)、stroke( + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0440 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0440 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0500 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0500 +* @tc.desc 1、lineDashOffset设置为10、使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0500 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0500 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0450 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0450 +* @tc.desc 1、设置lineJoin ='round'、reset()、lineWidth =10、beginPath0、moveTo(30,30)、lineTo(120,60)、lineTo(30.110)、stroke() + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0450', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0450 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0450 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0410 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0410 +* @tc.desc 1、设置lineWidth =-10、reset()、strokeRect(25,25,85,105) + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0410 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0410 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0400 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0400 +* @tc.desc 1、设置lineWidth =0、reset()、strokeRect(25,25,85,105) + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0400 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0400 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0420 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0420 +* @tc.desc 1、设置lineWidth =10、reset()、strokeRect(25,25,85,105) + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0420 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0420 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0520 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0520 +* @tc.desc 1、shadowBlur设置为30,使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0520 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0520 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0530 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0530 +* @tc.desc 1、shadowColor设置为'rgb(0,0,255),使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0530', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0530 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0530 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0540 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0540 +* @tc.desc 1、shadowOffsetX设置为30,使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0540 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0540 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0550 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0550 +* @tc.desc 1、shadowOffsetY设置为30,使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0550 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0550 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0430 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0430 +* @tc.desc 1、设置strokeStyle =red、reset() lineWidth =10、strokeRect(25,25,85,105) + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0430 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0430 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0470 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0470 +* @tc.desc 1、设置this.context.textAlign ='center'、reset () this.context.filIText(textAlign=center,140,120) +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0470 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0470 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0480 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0480 +* @tc.desc 1、设置this.context.textBaseline =hanging'、this.context.reset()、 + this.context.flText(Hanging',295.120)、 +this.context.strokeStyle ='#0000ff、 +this.context.moveTo(0,120)、 +this.contextlineTo(400,120)、 +this.context.stroke() +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0480 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0480 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0590 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0590 +* @tc.desc 1、width设置为300,使用reset方法 +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0590', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0590 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0590 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0740 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0740 +* @tc.desc 1、添加measureText、设置reset方法 +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0740', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0740 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0740 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0620 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0620 +* @tc.desc 1、设置moveTo (20,20),使用reset方法、设置lineTo(90,90)、设置stroke +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0620', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0620 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0620 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0630 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0630 +* @tc.desc 1、设置lineTo (90,90),使用reset方法、moveTo (30,30)、设置stroke +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0630', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0630 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0630 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0640 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0640 +* @tc.desc 1、设置rotate(45*Math.PI/180),使用reset方法 +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0640', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0640 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0640 finish.`); + done() + }) + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0650 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0650 +* @tc.desc 1、设置scale(2.2),使用reset方法 +2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0650', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0650 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0650 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0750 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0750 +* @tc.desc 1、设置setLineDash([10,20])、设置reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0750', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0750 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0750 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0680 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0680 +* @tc.desc 1、设置setTransform(1,0.5,-0.5,1,10,10),使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0680', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0680 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0680 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0670 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0670 +* @tc.desc 1、设置transform(1.0.5,-0.5,1.10.10),使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0670', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0670 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0670 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0690 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0690 +* @tc.desc 1、设置setTransform(1,0.5,-0.5,1,10,10),使用reset方法、添加getTransform + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0690', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0690 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0690 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0660 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0660 +* @tc.desc 1、设置translate(70,70),使用reset方法 + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0660', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0660 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0660 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0720 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0720 +* @tc.desc 1、设置用reset方法、添加getLineDash + 2、观察绘制效果 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0720', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0720 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720") + await Utils.sleep(1000) + + /*let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentCanvasReset0720_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentCanvasReset0720_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500)*/ + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0720 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0700 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0700 +* @tc.desc 1、设置用reset方法、添加getPixelMap +2、查看获取值 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0700', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0700 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0700 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0710 +* @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0710 +* @tc.desc 1、设置用reset方法、添加getlmageData +2、查看获取值 +*/ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0710', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0710 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0710 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0730 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0730 + * @tc.desc 1、添加toDataURL、设置reset方法 + 2、查看获取值 + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0730', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0730 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0730 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0610 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0610 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0610', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0610 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0610 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0560 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0560 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0560 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0560 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_CANVAS_RESET_0600 + * @tc.name SUB_ACE_UI_COMPONENT_CANVAS_RESET_0600 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_CANVAS_RESET_0600', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0600 start.`); + Settings.createWindow("testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_CANVAS_RESET_0600 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets new file mode 100644 index 000000000..14950a50f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets @@ -0,0 +1,977 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentColumnMirrorImage() { + + describe('UIComponentColumnMirrorImage', () => { + 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_COLUMN_MIRRORIMAGE_0120 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0120 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0120 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0120 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0130 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0130 +* @tc.desc 进入页面,旋转屏幕,切换横竖屏,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0130 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0130_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0130_002')); + await Utils.sleep(1000) + await button2.click() + await Utils.sleep(2000) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0130_003')); + await Utils.sleep(1000) + await button3.click() + await Utils.sleep(2000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0130 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0090 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0090 +* @tc.desc 点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0090_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0090 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0110 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0110 +* @tc.desc 点击direction:LTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0110_001')); + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0110 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0100 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0100 +* @tc.desc 点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0100_001')); + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0040 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0040 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0340 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0340 +* @tc.desc 点击添加/减少组件,进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0340 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0340_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0340_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0340 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0310 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0310 +* @tc.desc 点击添加/减少组件,进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0310 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0310_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0310_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0310_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0310 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0330 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0330 +* @tc.desc 点击添加/减少组件,点击direction:LTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0330 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0330_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0330_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0330_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0330 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0320 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0320 +* @tc.desc 点击添加/减少组件,点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0320 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0320_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0320_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0320_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + await button3.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0320 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0010 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0010 +* @tc.desc 点击添加/减少组件,点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0010_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0010 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0030 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0030 +* @tc.desc 点击添加/减少组件,点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0030_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0030 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0020 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0020 +* @tc.desc 点击添加/减少组件,点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0020_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0020 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0260 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0260 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0260 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0260 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0230 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0230 +* @tc.desc 点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0230 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0230_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0230 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0250 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0250 +* @tc.desc 点击direction:LTR按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0250 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0250_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0250 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0240 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0240 +* @tc.desc 点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0240 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0240_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0240 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0140 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0140 +* @tc.desc 点击direction:Auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0140_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0170 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0170 +* @tc.desc 点击direction:Auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0170 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0170 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0160 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0160 +* @tc.desc 点击direction:Auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0160 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0160_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0160 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0150 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0150 +* @tc.desc 点击direction:Auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0150 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0150_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0150 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0080 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0080 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0080 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0050 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0050 +* @tc.desc 点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0050_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0070 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0070 +* @tc.desc 点击direction:LTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0070_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0060 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0060 +* @tc.desc 点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0060_001')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0380 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0380 +* @tc.desc 点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0380 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0380_001')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0380_002')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0380 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0350 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0350 +* @tc.desc 点击添加/减少组件,点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0350 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0350_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0350_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0350_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0350 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0370 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0370 +* @tc.desc 点击添加/减少组件,点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0370 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0370_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0370_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0370_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0370 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0360 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0360 +* @tc.desc 点击添加/减少组件,点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0360 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0360_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0360_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0360_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0360 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0210 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0210 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0210 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0210 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0180 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0180 +* @tc.desc 点击direction:auto按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0180_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0180 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0200 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0200 +* @tc.desc 点击direction:LTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0200 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0200_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0200 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0190 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0190 +* @tc.desc 点击direction:RTL按钮,查看页面布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0190 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0190_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0190 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0300 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0300 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0300 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0300 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0270 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0270 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0270 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0270_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0270 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0290 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0290 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0290 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0290_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0290 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0280 +* @tc.name SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0280 +* @tc.desc 进入页面,查看布局效果 +*/ + it('SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0280 start.`); + Settings.createWindow("testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentColumnMirrorImage0280_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_COLUMN_MIRRORIMAGE_0280 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets new file mode 100644 index 000000000..1699ef671 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets @@ -0,0 +1,689 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentFlexSpace() { + + describe('UIComponentFlexSpace', () => { + 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_FLEX_SPACE_0050 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0050 +* @tc.desc 1、设置space参数的cross值为10 + 2、wrap参数不设置 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_1 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_1 +* @tc.desc 2、子组件上下间距为10vp + +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_1 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0060_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_2 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_2 +* @tc.desc 3、子组件上下间距为0 + +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_2 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0060_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_3 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_3 +* @tc.desc 4、子组件上下间距为0 + +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_3 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0060_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_3 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_4 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_4 +* @tc.desc 5、子组件上下间距为3276789vp,超出屏幕显示,只能显示前一个子组件 + +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_4', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_4 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0060_004')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0060_4 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0070 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0070 +* @tc.desc 1、设置wrap参数值为Wrap + 2、设置space参数的cross值为undefined +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0080 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0080 +* @tc.desc 1、设置wrap参数值为Wrap + 2、设置space参数的cross值为LengthMetrics percent(20) +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0080 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_1 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_1 +* @tc.desc 1、子组件左右间距为10vp +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_1 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0010_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_2 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_2 +* @tc.desc 2、子组件左右间距为0 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_2 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0010_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_3 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_3 +* @tc.desc 2、子组件左右间距为0 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_3 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0010_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_3 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_4 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_4 +* @tc.desc 4、子组件左右间距为3276789vp,间距过大超出屏幕显示,只能显示前一个子组件 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_4', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_4 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0010_004')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0010_4 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0020 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0020 +* @tc.desc 1、设置space参数的main值为undefined +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0020 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0030 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0030 +* @tc.desc 1、设置space参数的main值为LengthMetrics percent(20) +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0030 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0140 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0140 +* @tc.desc 1、设置space的cross、main值都为5vp + 2、设置参数direction的值为Row + 3、Fex组件设置padding为10,子组件设置margin为10 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0160 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0160 +* @tc.desc 1、设置space的cross、main值都为5vp + 2、设置参数direction的值为Row + 3、切换横屏 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0160 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0160_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(1000) + + let button2:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0160_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0160 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0150 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0150 +* @tc.desc 1、设置space的cross、main值都为5vp + 2、设置参数direction的值为Row + 3、动态改变子组件的宽高 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0150 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0150") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0150_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0150 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0130 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0130 +* @tc.desc 1、设置space的main值为5单位为vp +2、设置参数direction的值为ColumnReverse +3、设置参数Wrap值为NoWrap +4、点击按钮动态切换参数alignltems的值 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0130 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0130_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0130 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0180 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0180 +* @tc.desc 1、设置参数space的cross值为5vp + 2、设置参数direction的值为Column + 3、设置参数Wrap值为Wrap +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0180 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0170 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0170 +* @tc.desc 1、设置参数space的main值为5vp +2、设置参数direction的值为Column +3、设置参数Wrap值为NoWrap +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0170 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0170 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0110 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0110 +* @tc.desc 1、设置参数space的main值为5vp +2、设置参数direction的值为RowReverse +3、设置参数Wrap值为NoWrap +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0110 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_1 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_1 +* @tc.desc 2、主轴方向与Row相反 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_1 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_2 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_2 +* @tc.desc 4、子组件左右间距为5vp,子组件在主轴方向首端对齐 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_2 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_3 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_3 +* @tc.desc 5、子组件左右间距为5vp,子组件在主轴方向中心对齐 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_3 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_3 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_4 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_4 +* @tc.desc 6、子组件左右间距为5vp,子组件在主轴方向尾部对齐 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_4', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_4 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_4 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_5 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_5 +* @tc.desc 7、子组件左右间距设置不生效Fex主轴方向均匀分配弹性元素相邻元素之间距离相同。第一个元素与行首对齐,最后一个元素与行尾对齐 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_5', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_5 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_004')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_5 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_6 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_6 +* @tc.desc 8、子组件左右间距设置不生效Flex主轴方向均匀分配弹性元素,相邻元素之间距离相同。第一个元素到行首的距离和最后一个元素到行尾的距离是相邻元素之间距离的一半。 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_6', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_6 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_005')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_6 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_7 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_7 +* @tc.desc 9、子组件左右间距设置不生效Fex主轴方向均匀分配弹性元素相邻元素之间的距离、第一个元素与行首的间距、最后一个元素到行尾的间距都完全一样。 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_7', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_7 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentFlexSpace0120_006')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0120_7 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0100 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0100 +* @tc.desc 1、设置参数space的main值为5vp +2、设置参数direction的值为Row +3、设置参数Wrap值为NoWrap +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0040 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0040 +* @tc.desc 1、设置space参数不配置 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_FLEX_SPACE_0090 +* @tc.name SUB_ACE_UI_COMPONENT_FLEX_SPACE_0090 +* @tc.desc 1、设置space参数不配置 +*/ + it('SUB_ACE_UI_COMPONENT_FLEX_SPACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_FLEX_SPACE_0090 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets new file mode 100644 index 000000000..53cf4434a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets @@ -0,0 +1,4740 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentLayoutFlexDirection() { + + describe('UIComponentLayoutFlexDirection', () => { + 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_LAYOUT_FLEX_DIRECTION_0010_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0010_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0010_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0010_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0010_3 finish.`); + done() + }) + + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0020_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0020_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0020_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0020_3 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0030_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0030_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0030_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0030_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0040_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0040_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0040_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0040_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0050_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0050_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0050_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0050_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0060_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0060_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0060_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0060_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0070_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0070_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0070_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0070_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0080_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0080_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0080_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0080_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0090_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0090_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0090_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0090_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0100_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0100_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0100_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0100_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0110_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0110_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0110_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0110_3 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0120_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0120_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0120_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0120_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0130_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0130_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0130_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0130_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0140_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0140_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0140_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0140_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0150_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0150_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0150_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0150_3 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0160_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0160_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0160_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0160_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0170_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0170_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0170_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0170_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0180_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0180_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0180_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0180_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0190_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0190_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0190_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0190_3 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_1 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_1 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0230_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0230_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0230_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0230_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0240_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0240_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0240_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0240_3 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0250_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0250_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0250_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0250_3 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0260_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0260_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0260_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0260_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0270_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0270_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0270_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0270_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0280_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0280_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0280_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0280_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0290_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0290_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0290_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0290_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0300_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0300_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0300_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0300_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0310_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0310_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0310_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0310_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0320_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0320_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0320_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0320_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0330_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0330_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0330_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0330_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0340_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0340_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0340_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0340_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0350_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0350_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0350_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0350_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0370_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0370_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0370_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0370_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0360_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0360_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0360_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0360_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0380_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0380_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0380_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0380_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0390_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0390_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0390_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0390_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0400_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0400_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0400_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0400_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0410_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0410_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0410_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0410_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0420_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0420_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0420_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0420_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0460_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0460_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0460_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0460_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0200_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0200_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0200_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0200_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0430_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0430_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0430_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0430_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0220_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0220_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0220_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0220_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0440_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0440_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0440_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0440_3 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0210_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0210_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0210_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0210_3 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_1 + * @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0450_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_1 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_2 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_2 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0450_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_2 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_3 +* @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_3 +* @tc.desc 1.点击auto按钮,将direction切换为Auto模式 + 2.点击RTL按钮,将direction切换为RTL模式 + 3.点击LTR按钮,将direction切换为LTR模式 +*/ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450") + await Utils.sleep(1000) + let driver : Driver = Driver.create(); + await Utils.sleep(500) + + let button1:Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0450_003')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0450_3 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0470_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0470_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0470_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0470_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0480_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0480_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0480_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0480_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0490_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0490_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0490_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0490_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0500_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0500_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0500_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0500_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0510_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0510_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0510_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0510_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0520_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0520_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0520_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0520_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0530_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0530_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0530_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0530_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0540_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0540_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0540_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0540_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0550_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0550_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0550_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0550_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0560_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0560_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0560_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0560_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0570_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0570_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0570_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0570_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0580_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0580_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0580_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0580_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0600_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0600_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0600_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0600_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0590_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0590_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_3 + * @tc.des2 + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0590_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0590_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0610_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0610_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_3 + * @tc.des + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0610_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0610_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0620_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0620_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_3 + * @tc.des + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0620_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0620_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0630_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0630_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0630_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0630_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0640_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0640_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0640_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0640_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0650_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0650_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0650_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0650_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0660_001')); + await button.click();*/ + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0660_002')); + await button.click(); + await Utils.sleep(1000);*/ + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0660_003')); + await button.click();*/ + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0660_3 finish.`); + done(); + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0670_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0670_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0670_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0670_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0680_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0680_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0680_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0680_3 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_1 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_1 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0690_001')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_2 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_2 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0690_002')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_2 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_3 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_3 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_3', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_3 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentLayoutFlexDirection0690_003')); + await button.click(); + await Utils.sleep(1000); + await windowSnap.snapShot() + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_DIRECTION_0690_3 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets new file mode 100644 index 000000000..065dc2014 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' +import Settings from '../model/Settings' +import windowSnap from '../model/snapShot' +import Logger from '../model/Logger' +import Utils from '../model/Utils' + +export default function UIComponentLayoutFlexLayout() { + + describe('UIComponentLayoutFlexLayout', () => { + 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_LAYOUT_FLEX_LAYOUT_0010 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0010 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0010 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0010 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0020 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0020 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0020 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0030 + * @tc.name SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0030 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0030 start.`); + Settings.createWindow("testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0030 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets new file mode 100644 index 000000000..500248d7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets @@ -0,0 +1,229 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentOtherRowsplitandcolumnsplitAnimation() { + + describe('UIComponentOtherRowsplitandcolumnsplitAnimation', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return; + } + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0090 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0090_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 70)*/ + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0090 finish.`); + done(); + }) + + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0100 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0100_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 70) + await Utils.sleep(1000);*/ + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0100 finish.`); + done(); + }) + + + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0130 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0130_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 160) + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0130 finish.`); + done(); + }) + + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0170 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0170_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 70) + await Utils.sleep(1000);*/ + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0170 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0120 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0120_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 70) + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0120 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0110 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110"); + await Utils.sleep(1000); + /*let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0110_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 70) + await Utils.sleep(1000); + await driver.swipe(rect.top, center.y+70, rect.top, center.y) + await Utils.sleep(1000);*/ + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0110 finish.`); + done(); + }) + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0140 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0140_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 160) + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0140 finish.`); + done(); + }) + + + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0160 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160"); + await Utils.sleep(1000); + let driver = Driver.create(); + await Utils.sleep(1000); + let button1:Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_001')); + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_003')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 160) + await Utils.sleep(3000); + + let button2:Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_002')); + await Utils.sleep(1000) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0160 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_1 + * @tc.name SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_1 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_1', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_1 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0150_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + //await driver.swipe(rect.top, center.y, rect.top, center.y - 70) + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_1 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_2 + * @tc.name SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_2 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_2', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_2 start.`); + Settings.createWindow("testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0150_002')); + await button.click(); + let text: Component = await driver.findComponent(ON.id('UIComponentOtherRowsplitandcolumnsplitAnimation0150_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 70) + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0150_2 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets new file mode 100644 index 000000000..8f816655a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets @@ -0,0 +1,1512 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentPositionOffset() { + + describe('UIComponentPositionOffset', () => { + 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_POSITION_OFFSET_0440 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0440 + * @tc.desc 添加column组件,设置宽高为300、400,添加子组件text设置宽高为100、100 + 设置text组件position(left:100,top:100})offset({right:100,bottom:100}) + 2、观察text组件位置 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0440', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0440 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0440 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0110 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0110 + * @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 + * 设置position为{top:fp2px(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0110 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0110 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0120 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0120 + * @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 + * 设置position为{top:px2fp(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0120', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0120 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0120 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0130 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0130 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为{top:lpx2px(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0130 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0130 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0140 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0140 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为{top:px2lpx(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0140 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0100 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0100 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为{top:px2vp(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0100 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0090 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0090 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为{top:vp2px(100)} + 2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0090 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0090 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0040 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0040 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为 {bottom:0} +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0040 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(300) + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + + let button3: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_003')); + await Utils.sleep(300) + await button3.click() + await Utils.sleep(300) + + let button4: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_004')); + await Utils.sleep(300) + await button4.click() + await Utils.sleep(300) + + let button5: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_005')); + await Utils.sleep(300) + await button5.click() + await Utils.sleep(300) + + let button6: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_006')); + await Utils.sleep(300) + await button6.click() + await Utils.sleep(300) + + let button7: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_007')); + await Utils.sleep(300) + await button7.click() + await Utils.sleep(300) + + let button8: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_008')); + await Utils.sleep(300) + await button8.click() + await Utils.sleep(300) + + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0040_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0050 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0050 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为 {left:0} +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0050 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(300) + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + + let button3: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_003')); + await Utils.sleep(300) + await button3.click() + await Utils.sleep(300) + + let button4: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_004')); + await Utils.sleep(300) + await button4.click() + await Utils.sleep(300) + + let button5: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_005')); + await Utils.sleep(300) + await button5.click() + await Utils.sleep(300) + + let button6: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_006')); + await Utils.sleep(300) + await button6.click() + await Utils.sleep(300) + + let button7: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_007')); + await Utils.sleep(300) + await button7.click() + await Utils.sleep(300) + + let button8: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_008')); + await Utils.sleep(300) + await button8.click() + await Utils.sleep(300) + + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0050_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0030 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0030 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为 {right:0} +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0030 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + let button4: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_004')); + await Utils.sleep(500) + await button4.click() + await Utils.sleep(500) + + let button5: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_005')); + await Utils.sleep(500) + await button5.click() + await Utils.sleep(500) + + let button6: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_006')); + await Utils.sleep(500) + await button6.click() + await Utils.sleep(500) + + let button7: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_007')); + await Utils.sleep(500) + await button7.click() + await Utils.sleep(500) + + let button8: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_008')); + await Utils.sleep(500) + await button8.click() + await Utils.sleep(500) + + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0030_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0030 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0020 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0020 +* @tc.desc 1、新建ets页面,添加column组件设置宽高为300、300,添加子组件text组件宽高为100,100 +* 设置position为 {top:0} +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0020 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + let button3: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_003')); + await Utils.sleep(500) + await button3.click() + await Utils.sleep(500) + + let button4: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_004')); + await Utils.sleep(500) + await button4.click() + await Utils.sleep(500) + + let button5: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_005')); + await Utils.sleep(500) + await button5.click() + await Utils.sleep(500) + + let button6: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_006')); + await Utils.sleep(500) + await button6.click() + await Utils.sleep(500) + + let button7: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_007')); + await Utils.sleep(500) + await button7.click() + await Utils.sleep(500) + + let button8: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_008')); + await Utils.sleep(500) + await button8.click() + await Utils.sleep(500) + + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0020_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0020 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0060 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0060 +* @tc.desc 1、1、点击top按钮(切换为top值为50px、60vp、70fp、80lpx、60%、Sr(app.string string_value_100)、100abc、-50) +2、点击bottom按钮(切换为bottom值为50px、60vp、70fp、80lpx、60%、Sr(app.string string_value_100)、100abc、-50) +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0060 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0060_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0060_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0070 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0070 +* @tc.desc 1、1、点击top按钮(切换为top值为50px、60vp、70fp、80lpx、60%、Sr(app.string string_value_100)、100abc、-50) +2、点击bottom按钮(切换为bottom值为50px、60vp、70fp、80lpx、60%、Sr(app.string string_value_100)、100abc、-50) +2、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0070 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0070_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0070_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0160 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0160 +* @tc.desc 1、点击width+10/-10按钮(每次点击button父组件宽度+10/-10) +2、点击height+10/-10按钮(每次点击button父组件高度+10/-10) +3、点击textwidth+10/-10按钮(每次点击button子组件宽度+10/-10) +4、点击textheight+10/-10按钮(每次点击button子组件高度+10/-10) +5、观察text组件位置 + +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0160', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0160 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0160_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0160_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + + let button3: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0160_003')); + await Utils.sleep(300) + await button3.click() + await Utils.sleep(300) + await button3.click() + await Utils.sleep(300) + + let button4: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0160_004')); + await Utils.sleep(300) + await button4.click() + await Utils.sleep(300) + await button4.click() + await Utils.sleep(300) + + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0160 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0150 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0150 +* @tc.desc 1、点击padding+10/-10按钮(每次点击button父组件padding值+10/-10) +2、点击margin+10/-10按钮(每次点击button子组件margin值+10/-10) +5、观察text组件位置 + +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0150 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0150_001')); + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + await button1.click() + await Utils.sleep(300) + + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0150_002')); + await Utils.sleep(300) + await button2.click() + await Utils.sleep(300) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0150 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0270 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0270 +* @tc.desc 1、输入框位置正常 + 2、输入框抬起,正常避让输入法 + 3、输入框回到起始位置 + 4、多次重复操作均正常显示 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0270', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0270 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270") + await Utils.sleep(1000) + + let driver1_1: Driver = Driver.create(); + await driver1_1.delayMs(500) + let button1_1: Component = await driver1_1.findComponent(ON.id('UIComponentPositionOffset0270_002')); + await Utils.sleep(500) + await button1_1.click() + await Utils.sleep(500) + + let button2_1: Component = await driver1_1.findComponent(ON.id('UIComponentPositionOffset0270_003')); + await Utils.sleep(500) + await button2_1.click() + await Utils.sleep(1000) + + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270") + await Utils.sleep(1000) + + let driver1_2: Driver = Driver.create(); + await driver1_2.delayMs(500) + let button1_2: Component = await driver1_2.findComponent(ON.id('UIComponentPositionOffset0270_002')); + await Utils.sleep(500) + await button1_2.click() + await Utils.sleep(500) + + let button2_2: Component = await driver1_2.findComponent(ON.id('UIComponentPositionOffset0270_003')); + await Utils.sleep(500) + await button2_2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0270 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0280 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0280 +* @tc.desc 1、点击top按钮/left按钮(动态改变top/left值) +5、观察text组件位置 + +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0280', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0280 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280") + await Utils.sleep(1000) + + let driver: Driver = Driver.create(); + await driver.delayMs(500) + let button1: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0280_001')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentPositionOffset0280_002')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0280 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0260 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0260 +* @tc.desc 1、观察子组件显示 + +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0260', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0260 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0260 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0290 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0290 +* @tc.desc 1、观察子组件显示 + +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0290 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290") + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0290 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0230 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0230 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0230', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0230 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230") + await Utils.sleep(1000) + let driver = Driver.create(); + let text = await driver.findComponent(ON.type('TextArea')); + await text.inputText('123'); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0230 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0240 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0240 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0240', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0240 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0240 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0180 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0180 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0180 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0180 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0190 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0190 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0190 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0190 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0210 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0210 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0210', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0210 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210") + await Utils.sleep(1000) + let driver = Driver.create(); + let text = await driver.findComponent(ON.type('TextArea')); + await text.inputText('123'); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0210 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0200 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0200 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0200', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0200 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200") + await Utils.sleep(1000) + let driver = Driver.create(); + let text = await driver.findComponent(ON.type('TextArea')); + await text.inputText('123'); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0200 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0220 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0220 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0220', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0220 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220") + await Utils.sleep(1000) + let driver = Driver.create(); + let text = await driver.findComponent(ON.type('TextArea')); + await text.inputText('123'); + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0220 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0170 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0170 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0170', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0170 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0170 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0400 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0400 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0400 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0400 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0420 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0420 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0420 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0420 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0410 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0410 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0410 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0410 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0430 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0430 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0430', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0430 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0430 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0390 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0390 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0390 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0390 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0380 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0380 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0380 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0380 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0300 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0300 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0300 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0300 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0250 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0250 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0250', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0250 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0250 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0460 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0460 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0460', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0460 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0460 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0560 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0560 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0560', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0560 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0560 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0550 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0550 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0550', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0550 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0550 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0530 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0530 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0530', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0530 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0530 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0540 + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0540 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0540', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0540 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0540 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0510 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0510 +* @tc.desc 1、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0510', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0510 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0510 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0520 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0520 +* @tc.desc 1、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0520', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0520 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0520 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0490 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0490 +* @tc.desc 1、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0490', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0490 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0490 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0500 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0500 +* @tc.desc 1、观察text组件位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0500', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0500 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0500 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0470 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0470 +* @tc.desc 1、观察text组件在column父组件的位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0470', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0470 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0470 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0480 +* @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0480 +* @tc.desc 1、观察text组件在column父组件的位置 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0480', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0480 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0480 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0330 +*/ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0330', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0330 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0330 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0340 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0340', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0340 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0340 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0320 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0320', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0320 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0320 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0310 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0310', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0310 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310") + await Utils.sleep(3000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0310 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_7', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350_8', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0350 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_1', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_2', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_3', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_4', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_5', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_6', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_7', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360_8', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + let button1: Component = await driver.findComponent(ON.id('PositionOffset0350_001')); + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await button1.click() + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0360 finish.`); + done() + }) + + /* + * @tc.name SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0450 + */ + it('SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0450', 0, async (done: Function) => { + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0450 start.`); + Settings.createWindow("testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450") + await Utils.sleep(3000) + let driver: Driver = Driver.create(); + await Utils.sleep(2000) + windowSnap.snapShot() + await Utils.sleep(2000) + Logger.info('TEST', `SUB_ACE_UI_COMPONENT_POSITION_OFFSET_0450 finish.`); + done() + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets new file mode 100644 index 000000000..a804642e2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, 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 UIComponentRowColumnColumnSplitInteraction() { + + describe('UIComponentRowColumnColumnSplitInteraction', () => { + afterEach(async (done: Function) => { + if (Settings.windowClass == undefined) { + return + } + + Settings.windowClass.destroyWindow((err) => { + if (err.code) { + Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) + return; + } + Logger.info('TEST', `Succeeded in destroy the window.`); + }) + await Utils.sleep(1000); + done() + }) + + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERACTION_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERACTION_0010 start.`); + Settings.createWindow("testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentRowColumnColumnSplitInteraction0010_001')); + let rect = await text.getBounds(); + let center = await text.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y + 160) + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERACTION_0010 finish.`); + done(); + }) + + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets new file mode 100644 index 000000000..38fca95af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.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 { describe, beforeAll, beforeEach, afterEach, afterAll, it, 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 UIComponentRowcolumnColumnsplitInterface() { + + describe('UIComponentRowcolumnColumnsplitInterface', () => { + 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_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitInterface0010_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 250) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0020 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0020 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitInterface0020_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 250) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0020 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0030 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0030 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0030 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0030 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets new file mode 100644 index 000000000..06b170b87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentRowcolumnColumnsplitLayout() { + + describe('UIComponentRowcolumnColumnsplitLayout', () => { + 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_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0030_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 250) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0050 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0050 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0050 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0050_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 250) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0050 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0070 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0070 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0070 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0070_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 250) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0070 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0090 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0090 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0090 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0090_001')); + let rect = await button.getBounds(); + let center = await button.getBoundsCenter(); + await driver.swipe(rect.top, center.y, rect.top, center.y - 50) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0090 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0110_001')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x, center.y - 50, center.x, center.y - 100) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0130 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0130 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0130', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0130 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0130_001')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x, center.y - 50, center.x, center.y - 100) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0130 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0140 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0140 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0140 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0140_001')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x, center.y, center.x, center.y - 100) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0140 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0150 + * @tc.name SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0150 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0150', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0150 start.`); + Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150"); + await Utils.sleep(1000); + let driver = Driver.create(); + let text: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0150_001')); + let center = await text.getBoundsCenter(); + await driver.swipe(center.x, center.y, center.x, center.y - 100) + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0150 finish.`); + done(); + }) + }) +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets new file mode 100644 index 000000000..e5fb55260 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentSpecialComponentsPluginComponentInterface() { + + describe('UIComponentSpecialComponentsPluginComponentInterface', () => { + 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_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0010 + * @tc.name SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0010 + * @tc.desc 1,创建一个接口PluginComponen + 2,配置onComplete + 3,其他配置成功,PluginComponent加载失败 + 3,编译运行hap + 4,查看onComplete触发 + */ + it('SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0060 + * @tc.name SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0060 + * @tc.desc 1.创建一个接口PluginComponen + 2,配置onError(callback(info)=>void) + 3,编译运行hap + 4,使用bundleName获取模板路径时,对应bundleName不存在 + 5,查看onError(callback(nfo)=>void)返回信息 +*/ + it('SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0040 +* @tc.name SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0040 +* @tc.desc 1,创建一个接口PluginComponen + 2,配置onError(callback(nfo)=>void) + 3,编译运行hap + 4,使用bundleName获取模板路径时bundleName字段为空 + 5,查看onError(callback(nfo)=>void)返回信息 +*/ + it('SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0050 +* @tc.name SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0050 +* @tc.desc 1,创建一个接口PluginComponen + 2,配置onError(callback:(nfo)=>void) + 3,编译运行hap + 4.使用bundleName获取模板路径时source字段为空 + 5,查看onError(callback(nfo.)=>void)返回信息 +*/ + it('SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_CMPONENT_SPECIALCOMPONENTS_PLUGINCOMPONENT_INTERFACE_0050 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets new file mode 100644 index 000000000..974b9ba27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets @@ -0,0 +1,182 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor() { + + describe('UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor', () => { + 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_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 + * @tc.desc 1、XComponent surface类型不设置backgroundColor + 2、编译hap并安装 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0080 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0080 + * @tc.desc 1、XComponent surface类型设置backgroundColor为null + 2、编译hap并安装 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0080 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0080 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0090 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0090 + * @tc.desc 1、XComponent surface类型设置backgroundColor为null + 2、编译hap并安装 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0090 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0090 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0020 + * @tc.desc 1、XComponent surface类型设置backgroundColor为为"#33ff0000" + 2、编译hap并安装 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0020 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0020 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0030 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0030 + * @tc.desc 1、XComponent surface类型设置backgroundColor为为 Color.Red + 2、编译hap并安装 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0030', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0030 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0030 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0040 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0040 + * @tc.desc 1、XComponent surface类型设置backgroundColor为为 Color.Yellow + 2、编译hap并安装 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0040 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0040 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0060 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0060 +* @tc.desc 1、XComponent surface类型设置backgroundColor为为 Color.Transparent + 2、编译hap并安装 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0060 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0060 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0070 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0070 +* @tc.desc 1、XComponent surface类型设置backgroundColor为 xyz + 2、编译hap并安装 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0070 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0070 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets new file mode 100644 index 000000000..33d74ef53 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets @@ -0,0 +1,410 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentSpecialComponentsXcomponentSurfaceInterface() { + + describe('UIComponentSpecialComponentsXcomponentSurfaceInterface', () => { + 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_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0190 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0190 +* @tc.desc 1、XComponent设置SURFACE类型,调用XComponentController显示内容,调用setXComponentSurfaceRect方法 + (未设置offsetX、offsetY) + 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0190', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0190 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190") + + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0190 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0090 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0090 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容调用setXComponentSurfaceRect +方法(设置SurfaceWidth为0),通过Button(GetRect)调用getXComponentSurfaceRect方法 +* 2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0090', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0090 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0090_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0090_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0090 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0080 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0080 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容 +调用setXComponentSurfaceRect方法(设置SurfaceWidth、SurfaceHeight超出XComponent).通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0080', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0080 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0080_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0080_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0080 finish.`); + done() + }) + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0070 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0070 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容 +调用setXComponentSurfaceRect方法(设置SurfaceWidth、SurfaceHeight为负值),通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0070', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0070 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0070_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0070_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0070 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0060 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0060 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容 +调用setXComponentSurfaceRect方法(设置offsetX、offsetY,显示内容偏移后部分超出XComponent),通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0060', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0060 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0060_002')); + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0060_003')); + await Utils.sleep(1000) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0060 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0050 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0050 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容 +调用setXComponentSurfaceRect方法(设置offsetX、offsetY,显示内容偏移后完全超出XComponent),通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0050', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0050 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0050_002')); + await Utils.sleep(1000) + await button1.click() + await Utils.sleep(1000) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0050_003')); + await Utils.sleep(1000) + await button2.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0050 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0040 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0040 +* @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容, +调用setXComponentSurfaceRect方法(设置offsetX、offsetY,显示内容偏移后未超出XComponent),通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0040', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0040 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0040_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0040_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0040 finish.`); + done() + }) + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0010 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0010 + * @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容, + 调用setXComponentSurfaceRect方法(设置offsetX、offsetY,显示内容偏移后未超出XComponent),通过Button(GetRect)调用getXComponentSurfaceRect方法 + 2、编译hap并安装运行 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0010', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0010 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0010_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0010_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0010 finish.`); + done() + }) + + + /* + * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0020 + * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0020 + * @tc.desc 1、创建ets页面,添加XComponent组件设置type为SURFACE类型,调用XComponentController显示内容, + 调用setXComponentSurfaceRect方法(设置offsetX、offsetY,显示内容偏移后未超出XComponent),通过Button(GetRect)调用getXComponentSurfaceRect方法 + 2、编译hap并安装运行 + */ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0020', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0020 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0020_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0020_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0020 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0100 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0100 +* @tc.desc 创建ets页面,添加XComponent组件设置type为TEXTURE类型,调用XComponentController显示内容 +未调用setXComponentSurfaceRect方法,通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0100', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0100 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0100_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0100_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0100 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0110 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0110 +* @tc.desc 创建ets页面,添加XComponent组件设置type为TEXTURE类型,调用XComponentController显示内容,调用setXComponentSurfaceRect方法(未设置offsetX、offsetY), +* 通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0110', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0110 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0110_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0110_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0110 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0140 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0140 +* @tc.desc 创建ets页面,添加XComponent组件设置type为TEXTURE类型,调用XComponentController显示内容,调用setXComponentSurfaceRect方法(未设置offsetX、offsetY), +* 通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0140', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0140 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0140_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0140_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0140 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0180 +* @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0180 +* @tc.desc 创建ets页面,添加XComponent组件设置type为TEXTURE类型,调用XComponentController显示内容,调用setXComponentSurfaceRect方法(未设置offsetX、offsetY), +* 通过Button(GetRect)调用getXComponentSurfaceRect方法 +2、编译hap并安装运行 +*/ + it('SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0180', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0180 start.`); + Settings.createWindow("testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180") + await Utils.sleep(1000) + let driver: Driver = Driver.create(); + await driver.delayMs(1000) + let button1: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0180_002')); + await Utils.sleep(500) + await button1.click() + await Utils.sleep(500) + + let button2: Component = await driver.findComponent(ON.id('UIComponentSpecialComponentsXcomponentSurfaceInterface0180_003')); + await Utils.sleep(500) + await button2.click() + await Utils.sleep(500) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_INTERFACE_0180 finish.`); + done() + }) + + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets new file mode 100644 index 000000000..802d5305e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets @@ -0,0 +1,318 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentUIsupportColor1() { + + describe('UIComponentUIsupportColor1', () => { + 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_UISUPPORT_COLOR_0360 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0360 +* @tc.desc 1、创建Divider组件、 +2、动态切换系统模式:浅色模式-浅色模式 +3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0360', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0360 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button:Component = await driver.findComponent(ON.id('UIComponentUIsupportColor0360_001')); + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0360 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0370 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0370 +* @tc.desc 1、创建Divider组件、 +2、动态切换系统模式:浅色模式-深色模式 +3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0370', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0370 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button:Component = await driver.findComponent(ON.id('UIComponentUIsupportColor0370_001')); + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0370 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0380 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0380 +* @tc.desc 1、创建Divider组件、 +2、动态切换系统模式:深色模式-浅色模式 +3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0380', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0380 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button:Component = await driver.findComponent(ON.id('UIComponentUIsupportColor0380_001')); + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0380 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0390 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0390 +* @tc.desc 1、创建Divider组件、 +2、动态切换系统模式:深色模式-深色模式 +3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0390', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0390 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390") + await Utils.sleep(1000) + + let driver : Driver = Driver.create(); + await Utils.sleep(1000) + let button:Component = await driver.findComponent(ON.id('UIComponentUIsupportColor0390_001')); + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + await button.click() + await Utils.sleep(1000) + + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0390 finish.`); + done() + }) + + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0400 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0400 +* @tc.desc 1、创建Divider组件、 + 2、组件设置ThemoColorMode属性为LIGHT + 3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0400', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0400 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0400 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0410 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0410 +* @tc.desc 1、创建Divider组件、 + 2、组件设置ThemoColorMode属性为LIGHT + 3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0410', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0410 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0410 finish.`); + done() + }) + + /* +* @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0420 +* @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0420 +* @tc.desc 1、创建Divider组件、 + 2、组件设置ThemoColorMode属性为SYSTEM + 3、编译运行hap包 +*/ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0420', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0420 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420") + await Utils.sleep(1000) + await windowSnap.snapShot() + await Utils.sleep(3000) + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0420 finish.`); + done() + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0290 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0290 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0290', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0290 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUISupportColor0290_001')); + await Utils.sleep(1000); + await button.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0290 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0300 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0300 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0300', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0300 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUISupportColor0300_001')); + await Utils.sleep(1000); + await button.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0300 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0310 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0310 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0310', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0310 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUISupportColor0310_001')); + await Utils.sleep(1000); + await button.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0310 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0320 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0320 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0320', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0320 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320"); + await Utils.sleep(1000); + let driver = Driver.create(); + let button: Component = await driver.findComponent(ON.id('UIComponentUISupportColor0320_001')); + await Utils.sleep(1000); + await button.click(); + await Utils.sleep(5000); + await windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0320 finish.`); + done(); + })/* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0330 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0330 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0330', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0330 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330"); + await Utils.sleep(1000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0330 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0340 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0340 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0340', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0340 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0340 finish.`); + done(); + }) + /* + * @tc.number SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0350 + * @tc.name SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0350 + * @tc.desc + */ + it('SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0350', 0, async (done: Function) => { + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0350 start.`); + Settings.createWindow("testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350"); + await Utils.sleep(1000); + await windowSnap.snapShot(); + await Utils.sleep(5000); + Logger.error('TEST', `SUB_ACE_UI_COMPONENT_UISUPPORT_COLOR_0350 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020.ets new file mode 100644 index 000000000..b9abd206b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizeFeature0020 { + build() { + Column() { + Button('PositionSize') + .width('calc(45% + 60vp)') + .position({x: 'calc(45% + 60vp)', y: 'calc(50% + 60vp)'}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060.ets new file mode 100644 index 000000000..3958e1197 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizeFeature0060 { + build() { + Column() { + Button('PositionSize') + .width('calc(45% + 60vp)') + .position({x: 'calc(45% + 60vp)', y: 'calc(50% + 60vp)'}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080.ets new file mode 100644 index 000000000..00a08b0b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizeFeature0080 { + build() { + Column() { + Button('PositionSize') + .width('calc( 100% - calc(100px * 2) )') + .position({x: 'calc( 50% + calc(10px * 2) )', y: '50px'}) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160.ets new file mode 100644 index 000000000..0073ba61f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizeFeature0160 { + build() { + Column() { + Button('PositionSize') + .width('calc(45% + 45%)') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070.ets new file mode 100644 index 000000000..d1cd259c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070.ets @@ -0,0 +1,31 @@ +// UIAttributesPositionSizeLayoutPropertie +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizeLayoutPropertie0070 { + scroll: Scroller = new Scroller() + + build() { + Scroll(this.scroll) { + Flex() { + Text('flex in scroll') + } + .backgroundColor(Color.Blue) + .height(1000) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010.ets new file mode 100644 index 000000000..c108a4d6e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0010 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:0, y:'100%'} ) + .markAnchor({ x:0, y:'100%'} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020.ets new file mode 100644 index 000000000..7da9a32eb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0020 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .markAnchor({ x:5, y:5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030.ets new file mode 100644 index 000000000..550e51da2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0030 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .markAnchor({ x:0, y:0} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040.ets new file mode 100644 index 000000000..a6f8f2683 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0040 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .markAnchor({ x:5, y:-5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050.ets new file mode 100644 index 000000000..9fd21459e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0050 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .offset({ x:0, y:0} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060.ets new file mode 100644 index 000000000..b72f99541 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0060 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .offset({ x:-5, y:5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070.ets new file mode 100644 index 000000000..f5a24407a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0070 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .offset({ x:5, y:-5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080.ets new file mode 100644 index 000000000..bc0013f66 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0080 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .offset({ x:5, y:5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090.ets new file mode 100644 index 000000000..2e4cc736f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0090 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .offset({ x:'5abc', y:'5abc'} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100.ets new file mode 100644 index 000000000..2152aa699 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0100 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:-5, y:5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110.ets new file mode 100644 index 000000000..efb64bfac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0110 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:5, y:-5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120.ets new file mode 100644 index 000000000..6a38c0c0a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0120 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:5, y:5} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130.ets new file mode 100644 index 000000000..afa7a4f71 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0130 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:'50%', y:'50%' } ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140.ets new file mode 100644 index 000000000..41f1cdf46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0140 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:'5abc', y:'5abc'} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150.ets new file mode 100644 index 000000000..fc75bb02a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0150 { + build() { + Column() { + Text('123') + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({ x:0, y:0} ) + } + .backgroundColor(Color.Red) + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160.ets new file mode 100644 index 000000000..3a2dfbaf8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160.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 UIAttributesPositionSizePosition0160 { + build() { + Column() { + Column({ space: 10 }) { + // 元素内容<元素宽高,设置内容在与元素内的对齐方式 + Text('align').fontSize(9).fontColor(0xCCCCCC).width('90%') + Stack() { + Text('First show in bottom end').height('65%').backgroundColor(0xD2B48C) + Text('Second show in bottom end').backgroundColor(0xF5DEB3).opacity(0.9) + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.BottomEnd) + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.TopStart) + + Text('direction').fontSize(9).fontColor(0xCCCCCC).width('90%') + Row() { + Text('1').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('2').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + Text('3').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('4').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + } + .width('90%') + .direction(Direction.Rtl) + + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170.ets new file mode 100644 index 000000000..42a066ea9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170.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 UIAttributesPositionSizePosition0170 { + build() { + Column() { + Column({ space: 10 }) { + // 元素内容<元素宽高,设置内容在与元素内的对齐方式 + Text('align').fontSize(9).fontColor(0xCCCCCC).width('90%') + Stack() { + Text('First show in bottom end').height('65%').backgroundColor(0xD2B48C) + Text('Second show in bottom end').backgroundColor(0xF5DEB3).opacity(0.9) + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.BottomEnd) + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.TopStart) + + Text('direction').fontSize(9).fontColor(0xCCCCCC).width('90%') + Row() { + Text('1').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('2').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + Text('3').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('4').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + } + .width('90%') + .direction(0) + + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180.ets new file mode 100644 index 000000000..68d91699e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180.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 UIAttributesPositionSizePosition0180 { + build() { + Column() { + Column({ space: 10 }) { + // 元素内容<元素宽高,设置内容在与元素内的对齐方式 + Text('align').fontSize(9).fontColor(0xCCCCCC).width('90%') + Stack() { + Text('First show in bottom end').height('65%').backgroundColor(0xD2B48C) + Text('Second show in bottom end').backgroundColor(0xF5DEB3).opacity(0.9) + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.BottomEnd) + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.TopStart) + + Text('direction').fontSize(9).fontColor(0xCCCCCC).width('90%') + Row() { + Text('1').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('2').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + Text('3').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('4').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + } + .width('90%') + .direction(Direction.Auto) + + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190.ets new file mode 100644 index 000000000..9a6ef3e56 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190.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 UIAttributesPositionSizePosition0190 { + build() { + Column() { + Column({ space: 10 }) { + // 元素内容<元素宽高,设置内容在与元素内的对齐方式 + Text('align').fontSize(9).fontColor(0xCCCCCC).width('90%') + Stack() { + Text('First show in bottom end').height('65%').backgroundColor(0xD2B48C) + Text('Second show in bottom end').backgroundColor(0xF5DEB3).opacity(0.9) + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.BottomEnd) + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.TopStart) + + Text('direction').fontSize(9).fontColor(0xCCCCCC).width('90%') + Row() { + Text('1').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('2').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + Text('3').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('4').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + } + .width('90%') + .direction(Direction.Ltr) + + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200.ets new file mode 100644 index 000000000..3cd4a365b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200.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 UIAttributesPositionSizePosition0200 { + build() { + Column() { + Column({ space: 10 }) { + // 元素内容<元素宽高,设置内容在与元素内的对齐方式 + Text('align').fontSize(9).fontColor(0xCCCCCC).width('90%') + Stack() { + Text('First show in bottom end').height('65%').backgroundColor(0xD2B48C) + Text('Second show in bottom end').backgroundColor(0xF5DEB3).opacity(0.9) + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.BottomEnd) + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(Alignment.TopStart) + + Text('direction').fontSize(9).fontColor(0xCCCCCC).width('90%') + Row() { + Text('1').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('2').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + Text('3').height(50).width('25%').fontSize(16).backgroundColor(0xF5DEB3) + Text('4').height(50).width('25%').fontSize(16).backgroundColor(0xD2B48C) + } + .width('90%') + .direction(Direction.Rtl) + + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210.ets new file mode 100644 index 000000000..0cda068d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0210 { + build() { + Column() { + Column({ space: 10 }) { + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(-1); + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220.ets new file mode 100644 index 000000000..988d9aa81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0220 { + build() { + Column() { + Column({ space: 10 }) { + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(0); + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230.ets new file mode 100644 index 000000000..e3cda37fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0230 { + build() { + Column() { + Column({ space: 10 }) { + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(1); + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240.ets new file mode 100644 index 000000000..13d313e4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0240 { + build() { + Column() { + Column({ space: 10 }) { + Stack() { + Text('top start') + }.width('90%').height(50).margin({ top: 5 }).backgroundColor(0xFFE4C4) + .align(1000); + } + } + .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/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250.ets new file mode 100644 index 000000000..f5c004683 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0250 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + bottom: {anchor: "__container__", align: VerticalAlign.Bottom}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260.ets new file mode 100644 index 000000000..5c984cee1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0260 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + bottom: {anchor: "__container__", align: VerticalAlign.Center}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270.ets new file mode 100644 index 000000000..c01adac17 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0270 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + bottom: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280.ets new file mode 100644 index 000000000..25562c819 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0280 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + center: {anchor: "__container__", align: VerticalAlign.Bottom} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290.ets new file mode 100644 index 000000000..c4da0ace2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0290 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + center: {anchor: "__container__", align: VerticalAlign.Center} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300.ets new file mode 100644 index 000000000..47bc341ec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0300 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + center: {anchor: "__container__", align: VerticalAlign.Top} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310.ets new file mode 100644 index 000000000..2768eadbc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0310 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320.ets new file mode 100644 index 000000000..705f8eb98 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0320 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330.ets new file mode 100644 index 000000000..2918947cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0330 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + left: {anchor: "__container__", align: HorizontalAlign.Center} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340.ets new file mode 100644 index 000000000..75843c596 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0340 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + middle: {anchor: "__container__", align: HorizontalAlign.End} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350.ets new file mode 100644 index 000000000..63e0f3380 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0350 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + middle: {anchor: "__container__", align: HorizontalAlign.Start} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360.ets new file mode 100644 index 000000000..42eb8c584 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesPositionSizePosition0360 { + build() { + Row() { + RelativeContainer() { + Row(){Text('row1')}.justifyContent(FlexAlign.Center) + .width(100).height(100) + .backgroundColor("#FF3333") + .alignRules({ + middle: {anchor: "__container__", align: HorizontalAlign.Center} + }) + .id("row1") + + } + .width(300).height(300) + .margin({left: 50}) + .border({width:2, color: "#6699FF"}) + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370.ets new file mode 100644 index 000000000..dbb9e9c7d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0370 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + right: { anchor: "__container__", align: HorizontalAlign.End } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380.ets new file mode 100644 index 000000000..77aa41954 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0380 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + right: { anchor: "__container__", align: HorizontalAlign.Start } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390.ets new file mode 100644 index 000000000..59264c7d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0390 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + right: { anchor: "__container__", align: HorizontalAlign.Center } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400.ets new file mode 100644 index 000000000..2e19bb9fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0400 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Bottom } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410.ets new file mode 100644 index 000000000..883985fb0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0410 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Center } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420.ets new file mode 100644 index 000000000..2705f1238 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0420 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top } + }) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430.ets new file mode 100644 index 000000000..50b3b822e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0430 { + build() { + Row() { + Column() { + Text('row') + } + .align(Alignment.Bottom) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440.ets new file mode 100644 index 000000000..74efa358f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440.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 UIAttributesPositionSizePosition0440 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#330000") + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + .align(Alignment.BottomEnd) + } + .width(300).height(300) + .border({width:2, color: "#6699FF"}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450.ets new file mode 100644 index 000000000..40e4b4b26 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0450 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.BottomStart) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460.ets new file mode 100644 index 000000000..86e97f150 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0460 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.Center) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470.ets new file mode 100644 index 000000000..f1af4de87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0470 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.End) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480.ets new file mode 100644 index 000000000..7b21f2b21 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0480 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.Start) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490.ets new file mode 100644 index 000000000..535241311 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0490 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.Top) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500.ets new file mode 100644 index 000000000..8b590baa4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0500 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.TopEnd) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510.ets new file mode 100644 index 000000000..0e0b40cec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510.ets @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesPositionSizePosition0510 { + build() { + Row() { + RelativeContainer() { + Row() { + Text('row') + } + .justifyContent(FlexAlign.Center) + .width(100) + .height(100) + .backgroundColor("#FF3333") + } + .align(Alignment.TopStart) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010.ets new file mode 100644 index 000000000..3ca812754 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0010 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0010'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020.ets new file mode 100644 index 000000000..291bc03e8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0020 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0020'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030.ets new file mode 100644 index 000000000..2db25ae1b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0030 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0030'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040.ets new file mode 100644 index 000000000..0c9df71a3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0040 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0040'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050.ets new file mode 100644 index 000000000..b059f51f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0050 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0050'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060.ets new file mode 100644 index 000000000..47af255b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0060 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 10; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST}) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0060'); + } + }.nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST}); + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070.ets new file mode 100644 index 000000000..9950dcb82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0070 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .id('UIAttributesStatestylesInterfaceNestedScrolling0070') + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080.ets new file mode 100644 index 000000000..3dde4a64b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080.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 UIAttributesStatestylesInterfaceNestedScrolling0080 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0080'); + } + }.nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }); + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090.ets new file mode 100644 index 000000000..292fd1016 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0090 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .id('UIAttributesStatestylesInterfaceNestedScrolling0090') + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100.ets new file mode 100644 index 000000000..ad0507a57 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0100 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0100'); + } + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110.ets new file mode 100644 index 000000000..5d968fc5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0110 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .id('UIAttributesStatestylesInterfaceNestedScrolling0110') + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120.ets new file mode 100644 index 000000000..eda7ee493 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0120 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0120'); + } + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130.ets new file mode 100644 index 000000000..23d9277dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0130 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .id('UIAttributesStatestylesInterfaceNestedScrolling0130') + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140.ets new file mode 100644 index 000000000..e54d73a8d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0140 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0140'); + } + }.borderWidth(10).borderColor(Color.Red); + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150.ets new file mode 100644 index 000000000..219545c81 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0150 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .id('UIAttributesStatestylesInterfaceNestedScrolling0150') + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160.ets new file mode 100644 index 000000000..83d8c4475 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160.ets @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0160 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Flex() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0160'); + } + }.borderWidth(10).borderColor(Color.Red); + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170.ets new file mode 100644 index 000000000..0c65949c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0170 { + private timeTable: TimeTable0170[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @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: TimeTable0170, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .scrollBar(BarState.Off) + .id('UIAttributesStatestylesInterfaceNestedScrolling0170'); + + + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } + +} + +interface TimeTable0170 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180.ets new file mode 100644 index 000000000..c0feb4510 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0180 { + private timeTable: TimeTable0180[] = [ + { + title: '星期一', + projects: ['语文', '数学'] + }, + { + title: '星期二', + projects: ['物理', '化学'] + }, + { + title: '星期三', + projects: ['历史', '政治'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = { index: -1 } + @State mess: string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("30%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("30%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable0180, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("40%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index * 3 +subIndex] ? 0x68B4FF : 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0180') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + Button('scroll 150') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(150, 0); + }).id('UIAttributesStatestylesInterfaceNestedScrolling0180_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0180 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190.ets new file mode 100644 index 000000000..337bfb66f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0190 { + private timeTable: TimeTable0190[] = [ + { + title: '星期一', + projects: ['语文', '数学'] + }, + { + title: '星期二', + projects: ['物理', '化学'] + }, + { + title: '星期三', + projects: ['历史', '政治'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = { index: -1 } + @State mess: string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable0190, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index * 3 +subIndex] ? 0x68B4FF : 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + //.listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0190') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + Button('scroll 150') + .height('5%') + .onClick(() => { + this.scroller.scrollBy(0, 150); + }).id('UIAttributesStatestylesInterfaceNestedScrolling0190_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0190 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200.ets new file mode 100644 index 000000000..91f338fb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0200 { + private timeTable: TimeTable0200[] = [ + { + title: '星期一', + projects: ['语文', '数学'] + }, + { + title: '星期二', + projects: ['物理', '化学'] + }, + { + title: '星期三', + projects: ['历史', '政治'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = { index: -1 } + @State mess: string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable0200, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index * 3 +subIndex] ? 0x68B4FF : 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + //.listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0200') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + Button('scroll Edge.Bottom') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.Bottom, { velocity: 700 }) + }).id('UIAttributesStatestylesInterfaceNestedScrolling0200_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0200 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210.ets new file mode 100644 index 000000000..21ec0a3c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210.ets @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0210 { + private timeTable: TimeTable0210[] = [ + { + title: '星期一', + projects: ['语文', '数学'] + }, + { + title: '星期二', + projects: ['物理', '化学'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("30%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("30%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller}) { + ForEach(this.timeTable, (item: TimeTable0210, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("40%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0210') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + + Button('scroll Edge.End') + .height('5%') + .onClick(() => { + this.scroller.scrollEdge(Edge.End, { velocity: 700 }) + }).id('UIAttributesStatestylesInterfaceNestedScrolling0210_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0210 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220.ets new file mode 100644 index 000000000..5ee260f1a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220.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. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0220 { + private timeTable: TimeTable0220[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = { index: -1 } + @State mess: string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller }) { + ForEach(this.timeTable, (item: TimeTable0220, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index * 3 +subIndex] ? 0x68B4FF : 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + //.listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0220') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + Button('scroll next page') + .height('5%') + .onClick(() => { // 点击后滑动到指定位置,即下滑100.0vp的距离 + this.scroller.scrollPage({ next: true }) + }).id('UIAttributesStatestylesInterfaceNestedScrolling0220_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0220 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230.ets new file mode 100644 index 000000000..9136764c9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230.ets @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0230 { + private timeTable: TimeTable0230[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("30%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("30%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller}) { + ForEach(this.timeTable, (item: TimeTable0230, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("40%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0230') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + + Button('scroll 100') + .height('5%') + .onClick(() => { // 点击后滑动到指定位置,即右滑100.0vp的距离 + const xOffset: number = this.scroller.currentOffset().xOffset; + this.scroller.scrollTo({xOffset: xOffset + 100 , yOffset: 0, }) + }).id('UIAttributesStatestylesInterfaceNestedScrolling0230_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0230 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240.ets new file mode 100644 index 000000000..7cc2824b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240.ets @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0240 { + private timeTable: TimeTable0240[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("100%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("100%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller}) { + ForEach(this.timeTable, (item: TimeTable0240, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + //.listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0240') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + + Button('scroll 100') + .height('5%') + .onClick(() => { // 点击后滑动到指定位置,即下滑100.0vp的距离 + const yOffset: number = this.scroller.currentOffset().yOffset; + this.scroller.scrollTo({ xOffset: 0, yOffset: yOffset + 100 }) + }).id('UIAttributesStatestylesInterfaceNestedScrolling0240_001'); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0240 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250.ets new file mode 100644 index 000000000..145e85078 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250.ets @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0250 { + private timeTable: TimeTable0250[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @Builder + itemHead(text: string) { + Text(text) + .fontSize(20) + .backgroundColor(0xFF0000) + .width("30%") + .padding(10) + } + + @Builder + itemFoot(num: number) { + Text('共' + num + "节课") + .fontSize(16) + .backgroundColor(0x0000FF) + .width("30%") + .padding(5) + } + + build() { + Column() { + List({ space: 20, scroller: this.scroller}) { + ForEach(this.timeTable, (item: TimeTable0250, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("40%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .listDirection(Axis.Horizontal) + .id('UIAttributesStatestylesInterfaceNestedScrolling0250') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + + Text('您当前位置Item索引为'+ this.mess) + .fontColor(Color.Red) + .height(50); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0250 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260.ets new file mode 100644 index 000000000..20b4d232c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260.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. + */ +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0260 { + private timeTable: TimeTable0260[] = [ + { + title: '星期一', + projects: ['语文', '数学', '英语'] + }, + { + title: '星期二', + projects: ['物理', '化学', '生物'] + }, + { + title: '星期三', + projects: ['历史', '地理', '政治'] + }, + { + title: '星期四', + projects: ['美术', '音乐', '体育'] + } + ] + private scroller: ListScroller = new ListScroller() + @State listIndexInfo: VisibleListContentInfo = {index: -1} + @State mess:string = "null" + @State itemBackgroundColorArr: boolean[] = [false] + @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: TimeTable0260, index: number) => { + ListItemGroup({ header: this.itemHead(item.title), footer: this.itemFoot(item.projects.length) }) { + ForEach(item.projects, (project: string, subIndex: number) => { + ListItem() { + Text(project) + .width("100%") + .height(100) + .fontSize(20) + .textAlign(TextAlign.Center) + .backgroundColor(this.itemBackgroundColorArr[index *3 +subIndex] ? 0x68B4FF: 0xFFFFFF) + } + }, (item: string) => item) + } + .divider({ strokeWidth: 1, color: Color.Blue }) // 每行之间的分界线 + },(item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .id('UIAttributesStatestylesInterfaceNestedScrolling0260') + .width('90%') + .sticky(StickyStyle.Header | StickyStyle.Footer) + .scrollBar(BarState.Off); + + Text('您当前位置Item索引为'+ this.mess) + .fontColor(Color.Red) + .height(50); + }.width('100%').height('90%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} + +interface TimeTable0260 { + title: string; + projects: string[]; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270.ets new file mode 100644 index 000000000..b5f810396 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0270 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + .listDirection(Axis.Horizontal) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + .id('UIAttributesStatestylesInterfaceNestedScrolling0270') + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280.ets new file mode 100644 index 000000000..57d764a72 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280.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. + */ + +import { LengthMetrics } from '@kit.ArkUI' +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0280 { + @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) + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + List({ space: 10 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text("item" + item) + .fontSize(16) + }.listCard() + }, (item: string) => item) + }.width("100%") + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + //.edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.PARALLEL, + scrollBackward: NestedScrollMode.PARALLEL + }) + }.tabBar("Tab1"); + + TabContent() { + }.tabBar("Tab2"); + } + .id('UIAttributesStatestylesInterfaceNestedScrolling0280') + .fadingEdge(true) + .vertical(false) + .height("100%") + }.width("100%") + } + //.edgeEffect(EdgeEffect.Spring) + //.fadingEdge(true,{fadingEdgeLength:LengthMetrics.vp(40)}) + .friction(0.6) + .backgroundColor('#DCDCDC') + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290.ets new file mode 100644 index 000000000..b9cb851a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0290 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0290'); + } + } + .scrollable(ScrollDirection.Vertical) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300.ets new file mode 100644 index 000000000..f59be78a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0300 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.PARENT_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0300'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310.ets new file mode 100644 index 000000000..464d4aafd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0310 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + this.setItemSizeArray() + } + + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0310'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320.ets new file mode 100644 index 000000000..468dbbd7e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0320 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0320'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330.ets new file mode 100644 index 000000000..6276d833c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0330 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0330'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340.ets new file mode 100644 index 000000000..162172bfc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0340 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0340'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350.ets new file mode 100644 index 000000000..b911e636a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0350 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0350'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360.ets new file mode 100644 index 000000000..eb2da916d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0360 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0360'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370.ets new file mode 100644 index 000000000..cc9ce0f2c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0370 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0370'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380.ets new file mode 100644 index 000000000..f7841b5be --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0380 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0380'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390.ets new file mode 100644 index 000000000..cd21d183f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0390 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0390'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400.ets new file mode 100644 index 000000000..75214f259 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0400 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0400'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410.ets new file mode 100644 index 000000000..eaae888f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410.ets @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceNestedScrolling0410 { + @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() + @State arr: number[] = []; + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll(this.scroller.scrollPage({ next: true })) { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0410'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420.ets new file mode 100644 index 000000000..3423a8a68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0420 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0420'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430.ets new file mode 100644 index 000000000..a30a05fe9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0430 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0430'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440.ets new file mode 100644 index 000000000..c138049b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0440 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0440'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450.ets new file mode 100644 index 000000000..a9af5525a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0450 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0450'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460.ets new file mode 100644 index 000000000..b6f04db31 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0460 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0460'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470.ets new file mode 100644 index 000000000..386097844 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0470 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0470'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480.ets new file mode 100644 index 000000000..51011f1ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480.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. + */ + +import { WaterFlowDataSource } from './WaterFlowDataSource' + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0480 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0480'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490.ets new file mode 100644 index 000000000..68e117498 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490.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 UIAttributesStatestylesInterfaceNestedScrolling0490 { + @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() + @State arr: number[] = []; + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0490'); + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500.ets new file mode 100644 index 000000000..e698c941c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500.ets @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceNestedScrolling0500 { + @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() + @State arr: number[] = []; + private itemWidthArray: number[] = [] + private itemHeightArray: number[] = [] + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Builder + itemFoot() { + Column() { + Text(`Footer`) + .fontSize(10) + .backgroundColor(Color.Red) + .width(50) + .height(50) + .align(Alignment.Center) + .margin({ top: 2 }) + } + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0500'); + } + } + .scrollable(ScrollDirection.Vertical) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510.ets new file mode 100644 index 000000000..31d124415 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510.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 UIAttributesStatestylesInterfaceNestedScrolling0510 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_ONLY, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0510'); + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520.ets new file mode 100644 index 000000000..5c8ecc5bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520.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 UIAttributesStatestylesInterfaceNestedScrolling0520 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + @Styles + listCard() { + .backgroundColor(Color.White) + .height(72) + .width("100%") + .borderRadius(12) + } + build() { + Scroll(this.scroller) { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + } + } + .id('UIAttributesStatestylesInterfaceNestedScrolling0520'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540.ets new file mode 100644 index 000000000..d12e2a5e9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0540 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('scrollBy(dx)') + .id('UIAttributesStatestylesInterfaceNestedScrolling0540_001') + .onClick(() => { + this.scroller.scrollBy(100, 0) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 3 ,scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.Pink) + } + .width('60%') + .height('80%') + }, (item: string) => item) + } + .chainAnimation(true) + .edgeEffect(EdgeEffect.Spring) + .listDirection(Axis.Horizontal) + .height('100%') + .width('100%') + .scrollSnapAlign(ScrollSnapAlign.CENTER) + .borderRadius(10) + .backgroundColor(0xDCDCDC) + .listDirection(Axis.Horizontal) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + .scrollable(ScrollDirection.Horizontal) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550.ets new file mode 100644 index 000000000..72eb9c379 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550.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 UIAttributesStatestylesInterfaceNestedScrolling0550 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('scrollBy(dy)') + .id('UIAttributesStatestylesInterfaceNestedScrolling0550_001') + .onClick(() => { + this.scroller.scrollBy(100, 100) + }) + 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) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560.ets new file mode 100644 index 000000000..b39504e3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560.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 UIAttributesStatestylesInterfaceNestedScrolling0560 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('Edge Start') + .id('UIAttributesStatestylesInterfaceNestedScrolling0560_001') + .onClick(() => { + this.scroller.scrollEdge(Edge.Start) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 9 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .backgroundColor(0xDCDCDC) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570.ets new file mode 100644 index 000000000..f14671292 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570.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 UIAttributesStatestylesInterfaceNestedScrolling0570 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('Edge Top') + .id('UIAttributesStatestylesInterfaceNestedScrolling0570_001') + .onClick(() => { + this.scroller.scrollEdge(Edge.Top) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 9 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .backgroundColor(0xDCDCDC) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580.ets new file mode 100644 index 000000000..a6573684d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580.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 UIAttributesStatestylesInterfaceNestedScrolling0580 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('scrollPage') + .id('UIAttributesStatestylesInterfaceNestedScrolling0580_001') + .onClick(() => { + this.scroller.scrollPage({ next: false }) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 9 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center).borderRadius(10).backgroundColor(0xFFFFFF) + } + }, (item: string) => item) + } + .backgroundColor(0xDCDCDC) + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590.ets new file mode 100644 index 000000000..825da12c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIAttributesStatestylesInterfaceNestedScrolling0590 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('scrollTo(xOffset)') + .id('UIAttributesStatestylesInterfaceNestedScrolling0590_001') + .onClick(() => { + this.scroller.scrollTo({ xOffset: 100, yOffset: 0}) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 3 ,scroller: this.scroller}) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(100).fontSize(16) + .textAlign(TextAlign.Center) + .backgroundColor(Color.Pink) + } + .width('60%') + .height('80%') + }, (item: string) => item) + } + .chainAnimation(true) + .edgeEffect(EdgeEffect.Spring) + .listDirection(Axis.Horizontal) + .height('100%') + .width('100%') + .scrollSnapAlign(ScrollSnapAlign.CENTER) + .borderRadius(10) + .backgroundColor(0xDCDCDC) + .listDirection(Axis.Horizontal) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + .scrollable(ScrollDirection.Horizontal) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600.ets new file mode 100644 index 000000000..b6d4764cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600.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 UIAttributesStatestylesInterfaceNestedScrolling0600 { + scroller: Scroller = new Scroller(); + private arr: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; + + build() { + Column() { + Button('scrollBy(dy)') + .id('UIAttributesStatestylesInterfaceNestedScrolling0600_001') + .onClick(() => { + this.scroller.scrollTo({ xOffset: 0, yOffset: 100 }) + }) + Scroll(this.scroller) { + List({ space: 20, initialIndex: 3, scroller: this.scroller }) { + 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.Off) + .friction(0.6) + .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 }) + .edgeEffect(EdgeEffect.Spring) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + } + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610.ets new file mode 100644 index 000000000..5737d6a5f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceNestedScrolling0610 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_ONLY + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0610'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620.ets new file mode 100644 index 000000000..25ce513ea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIAttributesStatestylesInterfaceNestedScrolling0620 { + @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[] = [] + @State arr: number[] = []; + + // 设置FlowItem的宽/高数组 + setItemSizeArray() { + for (let i = 0; i < 20; i++) { + this.itemWidthArray.push(30) + this.itemHeightArray.push(100) + } + } + + aboutToAppear() { + for (let i = 0; i < 10; i++) { + this.arr.push(i) + } + + this.setItemSizeArray() + } + + build() { + Scroll() { + Column({ space: 2 }) { + Text("Scroll Area") + .width("100%") + .height("20%") + .backgroundColor('#0080DC') + .textAlign(TextAlign.Center); + + WaterFlow() { + LazyForEach(this.dataSource, (item: number) => { + FlowItem() { + Column() { + Text("N" + item).fontSize(12).height('16'); + } + } + .width('100%') + .height(this.itemHeightArray[item % 100]) + .backgroundColor(this.colors[item % 5]); + }, (item: string) => item) + } + .nestedScroll({ + scrollForward: NestedScrollMode.SELF_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .nestedScroll({ + scrollForward: NestedScrollMode.PARENT_FIRST, + scrollBackward: NestedScrollMode.SELF_FIRST + }) + .columnsTemplate("1fr") + .columnsGap(10) + .rowsGap(5) + .backgroundColor(0xFAEEE0) + .width('100%') + .height('100%') + .id('UIAttributesStatestylesInterfaceNestedScrolling0620'); + } + + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/WaterFlowDataSource.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/WaterFlowDataSource.ets new file mode 100644 index 000000000..83a6455a4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/WaterFlowDataSource.ets @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// 实现IDataSource接口的对象,用于瀑布流组件加载数据 +export class WaterFlowDataSource implements IDataSource { + private dataArray: number[] = [] + private listeners: DataChangeListener[] = [] + + constructor() { + for (let i = 0; i < 10; 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/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010.ets new file mode 100644 index 000000000..adb1e69a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0010 { + @State color: string = '#DB7093'; + @State text1: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('(orientation: landscape)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text1 = 'orientation: landscape'; + } else { + this.text1 = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT); + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text1).fontSize(50).fontColor(this.color); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020.ets new file mode 100644 index 000000000..63084001d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0020 { + @State color: string = '#DB7093'; + @State text1: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('(orientation: portrait)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text1 = 'orientation: portrait'; + } else { + this.text1 = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT); + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text1).fontSize(50).fontColor(this.color); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030.ets new file mode 100644 index 000000000..98f14dc04 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0030 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( height >= 600 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'height >= 600'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040.ets new file mode 100644 index 000000000..8209164a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0040 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( min-height < 600 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'min-height < 600'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT); + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050.ets new file mode 100644 index 000000000..4f72d37a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0050 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( max-height < 1000 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'max-height < 1000'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060.ets new file mode 100644 index 000000000..2970c7579 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0060 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( height <= 50 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'height <= 50'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070.ets new file mode 100644 index 000000000..356cd064f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0070 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( width >= 100 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'width >= 100'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080.ets new file mode 100644 index 000000000..b74b1956c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0090 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( width < 100 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'width < 100'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090.ets new file mode 100644 index 000000000..91e4e231a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0090 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( device-height<1000 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'device-height<1000'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100.ets new file mode 100644 index 000000000..afde95e54 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0100 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( min-device-height>400 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'min-device-height>400'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110.ets new file mode 100644 index 000000000..9c51bc5a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0110 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( max-device-height<1000 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'max-device-height<1000'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120.ets new file mode 100644 index 000000000..eeb5c651a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0120 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( device-width >= 400 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'device-width >= 400'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130.ets new file mode 100644 index 000000000..5ba82e33a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0130 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( min-device-width>400 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'min-device-width>400'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140.ets new file mode 100644 index 000000000..cbd7dc13b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0140 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( max-device-width<600 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'max-device-width<600'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150.ets new file mode 100644 index 000000000..55d1e6e9a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0150 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( resolution > 5 )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'resolution > 5'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160.ets new file mode 100644 index 000000000..1c8425052 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0160 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and (dark-mode:true)'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'dark-mode:true'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170.ets new file mode 100644 index 000000000..3dc96a6b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0170 { + @State text: string = 'Portrait'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and (dark-mode:false)'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'dark-mode:false'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180.ets new file mode 100644 index 000000000..f9cea0e1d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0180 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync(''); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'round-screen'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190.ets new file mode 100644 index 000000000..57802f1f1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0190 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and (round-screen:true)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'round-screen'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200.ets new file mode 100644 index 000000000..c8f45c339 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0200 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and (round-screen:false)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'round-screen'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210.ets new file mode 100644 index 000000000..52053a7c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210.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 { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIAttributesStatestylesInterfaceSupportstage0210 { + @State text: string = 'no value'; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('screen and ( device-type )'); + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { + this.text = 'device-type:false'; + } else { + this.text = "can't show"; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column({ space: 50 }) { + Text(this.text).fontSize(50); + } + .width('100%').height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010.ets new file mode 100644 index 000000000..7094f9f47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010.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 { LengthMetricsUnit } from '@ohos.arkui.node' +import componentUtils from '@ohos.arkui.componentUtils'; + +@Entry +@Component +struct UlComponentCanvasAttribute0010 { + @State message: number = 0; + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(300, 300) + + build() { + Column(){ + Column() { + Canvas(this.context) + .width("300") + .height('80%') + .borderWidth(5) + .borderColor('#057D02') + .backgroundColor('#FFFFFF') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 100, this.offCanvas.height) + let image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }).id("canvasAttribute") + Row() { + Text("canvas默认宽度为:" + this.message) + Button('获取组件宽度').onClick(() => { + this.message = this.offCanvas.width; + }).id('Button_click') + }.height("15%") + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020.ets new file mode 100644 index 000000000..3b8f73878 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020.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 { LengthMetricsUnit } from '@ohos.arkui.node' +import componentUtils from '@ohos.arkui.componentUtils'; + +@Entry +@Component +struct UlComponentCanvasAttribute0020 { + @State message: number = 0; + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(0, 300) + + build() { + Column(){ + Column() { + Canvas(this.context) + .width(0) + .height('80%') + .borderColor('#057D02') + .backgroundColor('#FFFFFF') + .onReady(() => { + this.context.fillRect(0, 30, 100, 100) + }).id("canvasAttribute") + Row() { + Text("canvas宽度为:" + this.message) + Button('获取组件宽度').onClick(() => { + this.message = this.offCanvas.width; + }).id('Button_click') + }.height("15%") + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030.ets new file mode 100644 index 000000000..d64004856 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030.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 { LengthMetricsUnit } from '@ohos.arkui.node' +import componentUtils from '@ohos.arkui.componentUtils'; + +@Entry +@Component +struct UlComponentCanvasAttribute0030 { + @State message: number = 0; + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(300, 300) + + build() { + Column(){ + Column() { + Canvas(this.context) + .width(300) + .height('80%') + .borderColor('#057D02') + .backgroundColor('#FFFFFF') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 100, this.offCanvas.height) + let image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }).id("canvasAttribute") + Row() { + Text("canvas默认宽度为:" + this.message) + Button('获取组件宽度').onClick(() => { + this.message = this.offCanvas.width; + }).id('Button_click') + }.height("15%") + } + }.height('100%') + } + + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040.ets new file mode 100644 index 000000000..79ec6dc6c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040.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 { LengthMetricsUnit } from '@ohos.arkui.node' +import componentUtils from '@ohos.arkui.componentUtils'; + +@Entry +@Component +struct UlComponentCanvasAttribute0040 { + @State message: number = 0; + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(-300, 300) + + build() { + Column(){ + Column() { + Canvas(this.context) + .width(-300) + .height('80%') + .borderColor('#057D02') + .backgroundColor('#FFFFFF') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 100, this.offCanvas.height) + let image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }).id("canvasAttribute") + } + }.height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060.ets new file mode 100644 index 000000000..f86619673 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0060 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 150) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070.ets new file mode 100644 index 000000000..23417cc48 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0070 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context1: OffscreenCanvas = new OffscreenCanvas(-300, 0); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.context1.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.context1.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080.ets new file mode 100644 index 000000000..0bdc65d37 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0080 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 150) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090.ets new file mode 100644 index 000000000..adcc42368 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0090 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, -150) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110.ets new file mode 100644 index 000000000..3c6d49d46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0110 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 0.5 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120.ets new file mode 100644 index 000000000..6ad738d8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0120 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(0, 0, 50, 50) + offContext.globalAlpha = -0.5 + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130.ets new file mode 100644 index 000000000..be56a7866 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 0.5 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140.ets new file mode 100644 index 000000000..c15bdb58b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0140 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 5 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150.ets new file mode 100644 index 000000000..07ba8e913 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0150 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 1.0 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160.ets new file mode 100644 index 000000000..18dd7619a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0160 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 0.0 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170.ets new file mode 100644 index 000000000..18f3791a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170.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. + */ +// xxx.ets +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0170 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + + offContext.globalAlpha = 0.5 + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + offContext.globalAlpha = 0.4 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180.ets new file mode 100644 index 000000000..5adc6a683 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0180 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'destination-atop' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190.ets new file mode 100644 index 000000000..54807daef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0190 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'destination-over' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200.ets new file mode 100644 index 000000000..d575705f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200.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 UlComponentCanvasAttribute0200 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 150, 150) + offContext.globalCompositeOperation = 'destination-in' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 260, 260) + // offContext.fillStyle = 'rgb(255,0,0)' + // offContext.fillRect(120, 20, 50, 50) + // offContext.globalCompositeOperation = 'destination-over' + // offContext.fillStyle = 'rgb(0,0,255)' + // offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210.ets new file mode 100644 index 000000000..cab977c33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0210 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'source-atop' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220.ets new file mode 100644 index 000000000..e47670b24 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0220 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'source-over' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230.ets new file mode 100644 index 000000000..4b73c295a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0230 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'source-out' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240.ets new file mode 100644 index 000000000..7b3540417 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0240 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'source-in' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250.ets new file mode 100644 index 000000000..0911c1a3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0250 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'destination-out' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260.ets new file mode 100644 index 000000000..62de2c404 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0260 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'lighter' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270.ets new file mode 100644 index 000000000..e041f4eba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0270 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'copy' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280.ets new file mode 100644 index 000000000..fe20cab4a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0280 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290.ets new file mode 100644 index 000000000..d65517fe0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290.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. + */ +// xxx.ets +@Entry +@Component +struct UlComponentCanvasAttribute0290 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'abc' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300.ets new file mode 100644 index 000000000..43bfa1c95 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0300 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .grayscale(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle="rgb(255,0,0)" + this.context.lineWidth=10 + this.context.fillRect(0,0,200,200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310.ets new file mode 100644 index 000000000..83ad8ddeb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310.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 UlComponentCanvasAttribute0310 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + this.context.lineWidth = 10 + this.context.strokeStyle = 'rgb(255, 0, 0)' + offContext.fillStyle ='abcd' + offContext.fillRect(0, 0, 200, 200) + this.context.strokeRect(0, 0, 200, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320.ets new file mode 100644 index 000000000..bffbfef61 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0320 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .grayscale(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle="abcd" + this.context.fillStyle = 'rgb(0,0,0,0)' + this.context.lineWidth=10 + this.context.fillRect(0,0,200,200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330.ets new file mode 100644 index 000000000..02550c7a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330.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 UlComponentCanvasAttribute0330 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffffff') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + this.context.lineWidth = 10 + this.context.strokeStyle = 'rgba(0,0,0,0)' + offContext.fillStyle ='#ffff00' + offContext.fillRect(0, 0, 200, 200) + this.context.strokeRect(0, 0, 200, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340.ets new file mode 100644 index 000000000..fb6be0cdf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0340 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .grayscale(-1) + .backgroundColor(Color.Pink) + .onReady(() => { + this.context.strokeStyle="#ffff00" + this.context.lineWidth=10 + this.context.fillRect(0,0,200,200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350.ets new file mode 100644 index 000000000..1942f97fd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0350 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .grayscale(-1) + .backgroundColor(Color.Pink) + .onReady(() => { + this.context.strokeStyle=0xf0000 + this.context.lineWidth=10 + this.context.fillRect(0,0,200,200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360.ets new file mode 100644 index 000000000..f03aa076a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0360 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .grayscale(-1) + .backgroundColor(Color.Pink) + .onReady(() => { + this.context.strokeStyle='#ffff00' + this.context.fillStyle=0xf0000 + this.context.lineWidth=10 + this.context.fillRect(0,0,200,200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370.ets new file mode 100644 index 000000000..e97d42a0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0370 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380.ets new file mode 100644 index 000000000..6fe9c3373 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0380 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'miter' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390.ets new file mode 100644 index 000000000..33449b47f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'round' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400.ets new file mode 100644 index 000000000..2651fdeab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400.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 UIComponentCanvasAttribute0400 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410.ets new file mode 100644 index 000000000..ad2776283 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410.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 UIComponentCanvasAttribute0410 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420.ets new file mode 100644 index 000000000..eabfa54ab --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0420 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430.ets new file mode 100644 index 000000000..43477b995 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430.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 UIComponentCanvasAttribute0430 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetX = 10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440.ets new file mode 100644 index 000000000..916f61155 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440.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 UIComponentCanvasAttribute0440 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetX = 0 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450.ets new file mode 100644 index 000000000..761682c5b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450.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 UIComponentCanvasAttribute0450 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetX = -10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460.ets new file mode 100644 index 000000000..16ee18cb3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460.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 UIComponentCanvasAttribute0460 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetY = 10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470.ets new file mode 100644 index 000000000..1dd8564fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470.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 UIComponentCanvasAttribute0470 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetY = -10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480.ets new file mode 100644 index 000000000..b20f0f6ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480.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 UIComponentCanvasAttribute0480 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetY = 0 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490.ets new file mode 100644 index 000000000..befa57c3a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0490 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowColor = 'rgb(0,0,255)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500.ets new file mode 100644 index 000000000..8421bfb1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500.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 UIComponentCanvasAttribute0500 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 0 + offContext.shadowColor = 'rgb(0,0,255)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510.ets new file mode 100644 index 000000000..0c2fe8da4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510.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 UIComponentCanvasAttribute0510 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 2 + offContext.shadowColor = 'rgb(0,0,255)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520.ets new file mode 100644 index 000000000..d6635fd94 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520.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 UIComponentCanvasAttribute0520 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'rgb(0,0,255)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540.ets new file mode 100644 index 000000000..e2d8862f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540.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 UIComponentCanvasAttribute0540 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'rgb(0%,0%,0%,0.5)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550.ets new file mode 100644 index 000000000..03ec690d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550.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 UIComponentCanvasAttribute0550 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = '#CCCCCC' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560.ets new file mode 100644 index 000000000..c3b58ccd3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560.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 UIComponentCanvasAttribute0560 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'hsl(120,50%,50%)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570.ets new file mode 100644 index 000000000..6d3947707 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0570 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .grayscale(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.shadowColor = 'Color.Pink' + this.context.shadowOffsetX=0 + this.context.shadowOffsetY=0 + this.context.shadowBlur = 30 + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580.ets new file mode 100644 index 000000000..615dd590e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580.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 UIComponentCanvasAttribute0580 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = '#ff0000' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590.ets new file mode 100644 index 000000000..e26cacbd5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590.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 UIComponentCanvasAttribute0590 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'rgb(255,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600.ets new file mode 100644 index 000000000..daa3e33cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600.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 UIComponentCanvasAttribute0600 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'rgb(-255,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610.ets new file mode 100644 index 000000000..8fbbd0583 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610.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 UIComponentCanvasAttribute0610 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.shadowColor = 'rgb(256,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620.ets new file mode 100644 index 000000000..5a7f7f3ef --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0620 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 48 + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630.ets new file mode 100644 index 000000000..b0e813fbd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0630 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .grayscale(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.shadowColor = 'rgb(0,0,0)' + this.context.shadowOffsetX=0 + this.context.shadowOffsetY=0 + this.context.shadowBlur = 30 + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640.ets new file mode 100644 index 000000000..859dc1295 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0640 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.imageSmoothingEnabled = true + this.context.fillStyle = '#0097D4' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650.ets new file mode 100644 index 000000000..832014939 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0650 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.imageSmoothingEnabled = true + this.context.fillStyle = '#0097D4' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660.ets new file mode 100644 index 000000000..42a4ee3f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute0660 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.imageSmoothingEnabled = false + this.context.fillStyle = '#0097D4' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670.ets new file mode 100644 index 000000000..dd45320b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0670 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .grayscale(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680.ets new file mode 100644 index 000000000..bb7f1471c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0680 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .grayscale(0) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690.ets new file mode 100644 index 000000000..e21b60de8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0690 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .grayscale(0.5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700.ets new file mode 100644 index 000000000..67174d497 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0700 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .grayscale(1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710.ets new file mode 100644 index 000000000..23e836757 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0710 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .grayscale(2) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720.ets new file mode 100644 index 000000000..ac512e5a1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0720 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730.ets new file mode 100644 index 000000000..4ed83211f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0730 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .sepia(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740.ets new file mode 100644 index 000000000..7b3ed3feb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0740 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .sepia(0.5) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750.ets new file mode 100644 index 000000000..876169a53 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0750 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .sepia(1) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760.ets new file mode 100644 index 000000000..208008792 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0760 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .sepia(0) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770.ets new file mode 100644 index 000000000..a35bc2bc4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0770 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .sepia(2) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780.ets new file mode 100644 index 000000000..c05dda87d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0780 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790.ets new file mode 100644 index 000000000..45dec05d8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0790 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800.ets new file mode 100644 index 000000000..f1e22f984 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0800 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ffff00') + .saturate(0) + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810.ets new file mode 100644 index 000000000..12b0dde35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0810 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .saturate(0.5) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820.ets new file mode 100644 index 000000000..7b8c5cce7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0820 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .saturate(1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830.ets new file mode 100644 index 000000000..76bd24d2f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0830 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .saturate(3) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840.ets new file mode 100644 index 000000000..a3bc3b68b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0840 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .hueRotate('0deg') + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850.ets new file mode 100644 index 000000000..7dfd521d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0850 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .hueRotate('90deg') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860.ets new file mode 100644 index 000000000..dc6e705cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0860 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .hueRotate('180deg') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870.ets new file mode 100644 index 000000000..26cbc356e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0870 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .hueRotate('360deg') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880.ets new file mode 100644 index 000000000..6c83a1d05 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0880 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .invert(-1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890.ets new file mode 100644 index 000000000..1969d9ec7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0890 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .invert(0) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900.ets new file mode 100644 index 000000000..ec51f9fda --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0900 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .invert(0.5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910.ets new file mode 100644 index 000000000..8c24e1e9d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0910 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .invert(1) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920.ets new file mode 100644 index 000000000..60035d320 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0920 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .invert(2) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930.ets new file mode 100644 index 000000000..723cbd3c4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0930 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940.ets new file mode 100644 index 000000000..51426f3d3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0940 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .opacity(-11) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950.ets new file mode 100644 index 000000000..31b8d29d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0950 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .opacity(0) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960.ets new file mode 100644 index 000000000..9216c6a5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0960 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .opacity(0.5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970.ets new file mode 100644 index 000000000..1d20c890e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0970 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .opacity(1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980.ets new file mode 100644 index 000000000..3e19d3afa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute0980 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990.ets new file mode 100644 index 000000000..372990eac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute0990 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .brightness(-1) + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000.ets new file mode 100644 index 000000000..2fd6d1e25 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1000 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .brightness(0) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010.ets new file mode 100644 index 000000000..34969f442 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1010 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .brightness(0.3) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020.ets new file mode 100644 index 000000000..38a1b5be4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1020 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .brightness(0.5) + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030.ets new file mode 100644 index 000000000..1cc51af9b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1030 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .brightness(1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040.ets new file mode 100644 index 000000000..e9fe8d5bf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1040 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .contrast(1.0) + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050.ets new file mode 100644 index 000000000..2651911d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1050 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .contrast(0) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060.ets new file mode 100644 index 000000000..8a7c897a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1060 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .contrast(0.5) + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070.ets new file mode 100644 index 000000000..be2fd5ab3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1070 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .contrast(1) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080.ets new file mode 100644 index 000000000..ff9391402 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1080 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .contrast(3) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090.ets new file mode 100644 index 000000000..a460002f0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1090 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100.ets new file mode 100644 index 000000000..52afee3b8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; + +@Entry +@Component +struct UIComponentCanvasAttribute1100 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private contextPX: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings, LengthMetricsUnit.PX); + private contextVP: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.contextPX) + .width('100%') + .blur(0) + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + this.contextPX.fillRect(10,10,100,100) + this.contextPX.clearRect(10,10,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110.ets new file mode 100644 index 000000000..aa90119b4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1110 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(3) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120.ets new file mode 100644 index 000000000..105dc5081 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1120 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130.ets new file mode 100644 index 000000000..720f6ab4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute1130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter= 'drop-shadow(8px 8px 10px green)' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140.ets new file mode 100644 index 000000000..3102b3e5d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute1140 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter='drop-shadow(0)' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150.ets new file mode 100644 index 000000000..a87261b27 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasAttribute1150 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'drop-shadow(-10px green)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160.ets new file mode 100644 index 000000000..435143d5a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute1160 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter='drop-shadow(10px)' + this.context.fillRect(20, 20, 100, 80) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050.ets new file mode 100644 index 000000000..5e5e727c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050.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 UIComponentCanvasCanvasRender0050 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('context1'); + Canvas(this.context1) + .width('230vp') + .height('120vp') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context1.fillRect(50, 50, 50, 50); + this.context1.setTransform(1.2, Math.PI/8, Math.PI/6, 0.5, 30, -25); + this.context1.fillRect(50, 50, 50, 50); + }) + Text('context2'); + Canvas(this.context2) + .width('230vp') + .height('120vp') + .backgroundColor('#0ffff0') + .onReady(() =>{ + this.context2.fillRect(50, 50, 50, 50); + let storedTransform = this.context1.getTransform(); + console.log("Matrix [scaleX = " + storedTransform.scaleX + ", scaleY = " + storedTransform.scaleY + + ", rotateX = " + storedTransform.rotateX + ", rotateY = " + storedTransform.rotateY + + ", translateX = " + storedTransform.translateX + ", translateY = " + storedTransform.translateY + "]") + this.context2.setTransform(storedTransform); + this.context2.fillRect(50,50,50,50); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350.ets new file mode 100644 index 000000000..91224245e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIcomponentCanvasJinterface0350 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle = Color.Red; + this.context.fillRect(20, 20, 150, 100); + this.context.reset(); + this.context.fillRect(20, 150, 150, 100); + }) + } + .width('100%') + .height('100%') + }; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170.ets new file mode 100644 index 000000000..9f47cea95 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170.ets @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasInterface1170 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#000000') + .onReady(() => { + this.context.fillStyle='rgb(0,0,255)' + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320.ets new file mode 100644 index 000000000..1758eb3cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasInterface1320 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle='rgb(0,0,255)' + this.context.fillRect(0,0,400,400) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570.ets new file mode 100644 index 000000000..02830a368 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasInterface1570 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillRect(0, 30, 100, 100) + this.context.lineWidth =5.0 + this.context.strokeStyle='red' + this.context.beginPath() + this.context.moveTo(30,120) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860.ets new file mode 100644 index 000000000..a52da84b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasInterface1860 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff' + this.context.moveTo(140,10) + this.context.lineTo(140,90) + this.context.stroke() + this.context.font='50px sans-serif' + this.context.fillText('textAlign=start', 140, 60) + this.context.fillText('hello World!',140,90) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910.ets new file mode 100644 index 000000000..b711446af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasInterface1910 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff' + this.context.moveTo(20,120) + this.context.lineTo(200,120) + this.context.stroke() + this.context.font='50px sans-serif' + this.context.textBaseline = 'ideographic' + this.context.fillText('Hello global!',55,120) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550.ets new file mode 100644 index 000000000..621ce7b9b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550.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. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; +import json from '@ohos.util.json'; + +@Entry +@Component +struct UIComponentCanvasInterface2550 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + @State pixmap: PixelMap | undefined = undefined; + @State imagedata: string = ''; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + let pixelmap = this.context.getPixelMap(50, 50, 130, 130) + this.context.drawImage(pixelmap,0,0,130,130) + this.imagedata = JSON.stringify(this.context.getImageData(50,50,130,130).width) + }) + Text('the image width is: ' + this.imagedata) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560.ets new file mode 100644 index 000000000..639251b69 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560.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. + */ +import { LengthMetricsUnit } from '@ohos.arkui.node'; +import json from '@ohos.util.json'; + +@Entry +@Component +struct UIComponentCanvasInterface2560 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + @State pixmap: PixelMap | undefined = undefined; + @State imagedata: string = ''; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height(150) + .backgroundColor('#ff0099fc') + .onReady(() => { + let pixelmap = this.context.getPixelMap(50, 50, 130, 130) + this.context.drawImage(pixelmap,0,0,130,130) + this.imagedata = JSON.stringify(this.context.getImageData(50,50,130,130)?.height) + }) + Text('the image height is: ' + this.imagedata) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070.ets new file mode 100644 index 000000000..7290223e5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0070 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(0) + .onReady(() =>{ + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090.ets new file mode 100644 index 000000000..e057685fc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0090 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, -150) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(400) + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = 'italic bold 50px sans-serif' + offContext.fillText("Hello World", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110.ets new file mode 100644 index 000000000..35fd95a84 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0110 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(100, 100) + private img:ImageBitmap = new ImageBitmap('resources/base/media/icon.jpg') + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() => { + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + this.context.globalAlpha = 1 + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50,50,50,50) + this.context.drawImage(this.img, 0, 150, 300, 100) + this.dataURL = this.context.toDataURL() + }) + Text(this.dataURL) + } + .width(400) + .height(600) + .margin(5) + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130.ets new file mode 100644 index 000000000..f8bab7c4a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img:ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + @State text: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height(200) + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.context + let img = this.img + + ctx.drawImage(img, 0, 0, 100, 100); + + let result = ctx.toDataURL('image/png') + this.text = JSON.stringify(result) + }) + + TextArea({ + text: this.text, + }) + .width('100%') + .height(200) + .margin(20) + .fontSize(16) + .fontColor('#182431') + .backgroundColor('#FFFFFF') + } + .backgroundColor(Color.Gray) + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140.ets new file mode 100644 index 000000000..3cc5ca7c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140.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 UIComponentCanvasModifier0140 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(150) + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + + ctx.drawImage(img, 0, 0, 100, 100); + this.dataURL = ctx.toDataURL('image/jpeg', 0) + + }) + Text(this.dataURL) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160.ets new file mode 100644 index 000000000..77f875f05 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0160 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(100, 100) + private img:ImageBitmap = new ImageBitmap('resources/base/media/icon.jpg') + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() => { + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + this.context.globalAlpha = 1 + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50,50,50,50) + this.context.drawImage(this.img, 0, 150, 300, 100) + this.dataURL = this.context.toDataURL() + }) + Text(this.dataURL) + } + .width(400) + .height(600) + .margin(5) + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170.ets new file mode 100644 index 000000000..8af6246a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0170 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(100, 100) + private img:ImageBitmap = new ImageBitmap('resources/base/media/icon.jpg') + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() => { + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + this.context.globalAlpha = 1 + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50,50,50,50) + this.context.drawImage(this.img, 0, 150, 300, 100) + this.dataURL = this.context.toDataURL('image/jpeg', 0) + }) + Text(this.dataURL) + } + .width(400) + .height(500) + .margin(5) + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180.ets new file mode 100644 index 000000000..bfad9a74f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0180 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + @State toDataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() =>{ + this.context.fillStyle = "#00ff00" + this.context.fillRect(0,0,100,100) + this.toDataURL = this.context.toDataURL("image/jpeg", 1) + }) + Text(this.toDataURL) + } + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190.ets new file mode 100644 index 000000000..e094b22a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0190 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(100, 100) + @State dataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillRect(0,0,100,100) + this.dataURL = offContext.toDataURL('image/jpeg',2) + }) + .margin(10) + Text(this.dataURL) + } + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230.ets new file mode 100644 index 000000000..503a83d88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0230 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + @State toDataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() =>{ + this.context.fillStyle = "#00ff00" + this.context.fillRect(0,0,100,100) + this.toDataURL = this.context.toDataURL("image/webp", 2) + }) + Text(this.toDataURL) + } + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250.ets new file mode 100644 index 000000000..6faf55233 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0250 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + @State toDataURL: string = "" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() =>{ + this.context.fillStyle = "#00ff00" + this.context.fillRect(0,0,100,100) + this.toDataURL = this.context.toDataURL("image/png", -1) + }) + Text(this.toDataURL) + } + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310.ets new file mode 100644 index 000000000..b52b8f2ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310.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 UIComponentCanvasModifier0310 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 3 + offContext.strokeRect(30, 30, 50, 50) + offContext.scale(0, 1) + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330.ets new file mode 100644 index 000000000..55e48b564 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0330 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('not reset scale()'); + Canvas(this.context) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.strokeRect(30, 30, 50, 50); + this.context.scale(-1.5, 1); + this.context.strokeRect(30, 30, 50, 50); + }); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340.ets new file mode 100644 index 000000000..d19b68e83 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340.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 UIComponentCanvasModifier0340 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 3 + offContext.strokeRect(30, 30, 50, 50) + offContext.scale(15, 1) + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350.ets new file mode 100644 index 000000000..1ea837d99 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350.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 UIComponentCanvasModifier0350 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 3 + offContext.strokeRect(30, 30, 50, 50) + offContext.scale(1.5, 1.5) // Scale to 200% + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370.ets new file mode 100644 index 000000000..f35fbac24 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0370 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(400, 400) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.scale(1, 0) + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380.ets new file mode 100644 index 000000000..ebb4f8d20 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380.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 UIComponentCanvasModifier0380 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 10 + this.context.scale(1,1.5) + this.context.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390.ets new file mode 100644 index 000000000..54f57ac48 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390.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 UIComponentCanvasModifier0390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(400, 400) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 3 + offContext.scale(1, -1.5) + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400.ets new file mode 100644 index 000000000..576078c6f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0400 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height(500) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.scale(1, 15) + this.context.strokeRect(30, 30, 50, 50) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420.ets new file mode 100644 index 000000000..6d87c1ad3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420.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 UIComponentCanvasModifier0420 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.shadowOffsetX = 30; + + this.context.reset(); + + this.context.shadowBlur = 10; + this.context.shadowColor = 'rgb(0,0,0)'; + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 100, 80); + this.context.rotate(undefined) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470.ets new file mode 100644 index 000000000..f9324a84b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0470 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.translate(-100, 0) + this.context.strokeRect(30, 30, 50, 50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510.ets new file mode 100644 index 000000000..5ec878c0c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510.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 UIComponentCanvasModifier0510 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#0097D4' + offContext.strokeRect(30, 30, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + + offContext.fillStyle = '#0097D4' + offContext.translate(0, -100) + offContext.strokeRect(130, 130, 50, 50) + let image1 = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image1) + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560.ets new file mode 100644 index 000000000..160f332a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0560 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.scale(-1,1) + this.context.font='48px sans-serif' + this.context.fillText('hello World!',-280,90) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570.ets new file mode 100644 index 000000000..7b797d7ce --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0570 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.transform(1, 0, 0, 1.5, 0, 0) + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(0, 0, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580.ets new file mode 100644 index 000000000..f16b3a506 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0580 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context; + ctx.scale(1, -1); + ctx.font = '48px serif'; + ctx.fillText('Hello world!', -280, 90); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610.ets new file mode 100644 index 000000000..c328949e0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0610 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() => { + this.context.transform(1,0,0.5,1,0,0) + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(0, 0, 100, 100) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620.ets new file mode 100644 index 000000000..682952058 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0620 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.transform(1,0,-0.5,1,0,0) + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(0, 0, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630.ets new file mode 100644 index 000000000..7ddedec70 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0630 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.transform(1,0,0,1,50,0) + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(0, 0, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670.ets new file mode 100644 index 000000000..c43194e40 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0670 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.transform(1,0,0,1,50,50) + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(0, 0, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960.ets new file mode 100644 index 000000000..c054fbfba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0960 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle='rgb(0,0,255)' + this.context.globalAlpha=0.5 + this.context.fillRect(50,50,50,50) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970.ets new file mode 100644 index 000000000..94cf30a43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier0970 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.globalAlpha=5 + this.context.fillStyle='rgb(0,0,255)' + this.context.fillRect(50,50,50,50) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980.ets new file mode 100644 index 000000000..cdd24d235 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier0980 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img:ImageBitmap = new ImageBitmap('resources/base/media/icon.jpg') + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + this.context.globalAlpha = 1 + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50,50,50,50) + this.context.drawImage(this.img, 0, 150, 300, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020.ets new file mode 100644 index 000000000..e0e680e4d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020.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 UIComponentCanvasModifier1020 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'destination-over' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030.ets new file mode 100644 index 000000000..805a56658 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1030 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 50, 50) + offContext.globalCompositeOperation = 'destination-in' + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050.ets new file mode 100644 index 000000000..242412620 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct UIComponentCanvasModifier1050 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 50, 50) + offContext.globalCompositeOperation = 'source-over' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(50, 50, 50, 50) + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080.ets new file mode 100644 index 000000000..fa68fdacf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1080 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(20, 20, 50, 50) + this.context.globalCompositeOperation = 'destination-out' + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50, 50, 50, 50) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110.ets new file mode 100644 index 000000000..7723384a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110.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 UIComponentCanvasModifier1110 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private path2Db: Path2D = new Path2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() => { + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(20, 20, 50, 50) + this.context.globalCompositeOperation = 'xor' + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(50, 50, 50, 50) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130.ets new file mode 100644 index 000000000..8c529e74f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130.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 UIComponentCanvasModifier1130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(120, 20, 50, 50) + offContext.globalCompositeOperation = 'abc' + offContext.fillStyle = 'rgb(0,0,255)' + offContext.fillRect(150, 50, 50, 50) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170.ets new file mode 100644 index 000000000..ee742af4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1170 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor(Color.Pink) + .onReady(() => { + this.context.lineWidth=10 + this.context.fillStyle='#ffff00' + this.context.strokeStyle='rgba(0,0,0,0)' + this.context.fillRect(0, 0, 200, 200) + this.context.strokeRect(0,0,200,200) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260.ets new file mode 100644 index 000000000..6a5e35f77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260.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 UIComponentCanvasModifier1260 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img:ImageBitmap = new ImageBitmap('resources/base/media/icon.jpg') + private matrix : Matrix2D = new Matrix2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let canvasPattern = this.context.createPattern(this.img, 'repeat-x'); + if (canvasPattern) { + canvasPattern.setTransform(this.matrix); + this.context.fillStyle = canvasPattern; + } + this.context.fillRect(0, 0, 400, 350) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290.ets new file mode 100644 index 000000000..20c21a2c7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290.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 UIComponentCanvasModifier1290 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let grad = offContext.createRadialGradient(200,200,100,200,200,50) + grad.addColorStop(0,'white' ) + grad.addColorStop(1, 'red') + offContext.fillStyle = grad + offContext.fillRect(0, 0, 400, 400) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300.ets new file mode 100644 index 000000000..10490ad79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1300 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + let grad = this.context.createRadialGradient(200,200,100, 200,200,0) + grad.addColorStop(0, 'white'); + grad.addColorStop(0, 'red'); + this.context.fillStyle = grad; + this.context.fillRect(0, 0, 400, 400); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310.ets new file mode 100644 index 000000000..8c2590729 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1310 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + let grad = this.context.createRadialGradient(200,200,100, 200,200,-50) + grad.addColorStop(0, 'white'); + grad.addColorStop(1, 'red'); + this.context.fillStyle = grad; + this.context.fillRect(0, 0, 400, 400); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340.ets new file mode 100644 index 000000000..3bcbccc3d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1340 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#F5DC62') + .onReady(() =>{ + let grad = this.context.createRadialGradient(200,200,50, 200,200,100) + grad.addColorStop(0, 'white'); + grad.addColorStop(0, 'red'); + this.context.fillStyle = grad; + this.context.fillRect(0, 0, 400, 400); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370.ets new file mode 100644 index 000000000..d936bac68 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370.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 UIComponentCanvasModifier1370 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = -5 + offContext.strokeStyle = '#0000ff' + offContext.moveTo(15, 80) + offContext.lineTo(280, 160) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390.ets new file mode 100644 index 000000000..7ea656b58 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390.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 UIComponentCanvasModifier1390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + ctx.lineWidth = 8; + ctx.beginPath(); + ctx.lineCap = 'butt'; + ctx.moveTo(30, 50); + ctx.lineTo(220, 50); + ctx.stroke(); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470.ets new file mode 100644 index 000000000..82a4058db --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470.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 UIComponentCanvasAttribute1470 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500.ets new file mode 100644 index 000000000..9dd47ab0c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500.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 UIComponentCanvasModifier1500 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'miter' + offContext.moveTo(50, 50) + offContext.lineTo(80, 150) + offContext.lineTo(110, 50) + offContext.miterLimit = 1 + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520.ets new file mode 100644 index 000000000..8c37c2171 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1520 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() =>{ + this.context.fillRect(0, 0, 200, 200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550.ets new file mode 100644 index 000000000..3bf8e7598 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550.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 UIComponentCanvasModifier1550 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowOffsetX = 0 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560.ets new file mode 100644 index 000000000..ec8f618b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560.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 UIComponentCanvasModifier1560 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetY = 10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570.ets new file mode 100644 index 000000000..ee8438a0f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570.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 UIComponentCanvasModifier1570 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 10 + offContext.shadowOffsetY = 20 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590.ets new file mode 100644 index 000000000..74a3ce746 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1590 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600.ets new file mode 100644 index 000000000..50b8ebb8d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1600 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 0 + offContext.shadowOffsetX = 10 + offContext.shadowOffsetY = 10 + offContext.shadowColor = 'rgb(0,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700.ets new file mode 100644 index 000000000..0fa59a8fc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700.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 UIComponentCanvasModifier1700 { + // xxx.ets + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + @State pixelmaps: Array = []; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 30 + offContext.shadowColor = 'rgb(-255,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + + } + .width('100%') + .height('100%') + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710.ets new file mode 100644 index 000000000..5088d2ad6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710.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 UIComponentCanvasModifier1710 { + // xxx.ets + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + @State pixelmaps: Array = []; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = 30 + offContext.shadowColor = 'rgb(256,0,0)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(20, 20, 100, 80) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + + } + .width('100%') + .height('100%') + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720.ets new file mode 100644 index 000000000..8b3f2b6ae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1720 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() =>{ + this.context.shadowBlur = 30 + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(20, 20, 100, 80) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760.ets new file mode 100644 index 000000000..23de924cd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1760 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillRect(-100, -100, 200, 200) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780.ets new file mode 100644 index 000000000..0190a5cf2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1780 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() =>{ + this.context.fillStyle = 'rgb(255,0,0)' + this.context.fillRect(100, 100, -100, 80) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840.ets new file mode 100644 index 000000000..894602437 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1840 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.strokeRect(-100, -100, 200, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860.ets new file mode 100644 index 000000000..1adaaff82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860.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 UIComponentCanvasModifier1860 { + // xxx.ets + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + @State pixelmaps: Array = []; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.strokeRect(100,100,-100,100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + + } + .width('100%') + .height('100%') + } + +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870.ets new file mode 100644 index 000000000..d9a6af4fa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset1870 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.lineWidth = 10; + this.context.strokeRect(100, 100, 100, -100); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900.ets new file mode 100644 index 000000000..f6490e590 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier1900 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(0,0,400,400) + this.context.clearRect(0,0,50,50) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920.ets new file mode 100644 index 000000000..7831baf4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1920 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(0,0, 400, 400) + this.context.clearRect(20.,20,0,50) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940.ets new file mode 100644 index 000000000..053fe0994 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1940 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(400) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(0,0,400,400) + this.context.clearRect(60,60,-50,-50) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960.ets new file mode 100644 index 000000000..35654b15b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier1960 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() => { + this.context.fillStyle = 'rgb(0,0,255)' + this.context.fillRect(0, 0, 400, 400) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970.ets new file mode 100644 index 000000000..57b1ae53b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970.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 UIComponentCanvasModifier1970 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 6 + offContext.strokeStyle = '#0000ff' + offContext.moveTo(15, 80) + offContext.lineTo(280, 160) + offContext.stroke() + let img1 = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img1) + + offContext.beginPath() + offContext.lineWidth = 15 + offContext.strokeStyle = '#ffff0000' + offContext.moveTo(50, 80) + offContext.lineTo(80, 160) + offContext.stroke() + let img2 = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img2) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980.ets new file mode 100644 index 000000000..836048a41 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980.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 UIComponentCanvasModifier1980 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineWidth = 6 + offContext.strokeStyle = '#0000ff' + offContext.moveTo(15, 80) + offContext.lineTo(280, 160) + offContext.stroke() + let img = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img) + offContext.lineWidth = 15 + offContext.strokeStyle = '#ffff0000' + offContext.moveTo(50, 80) + offContext.lineTo(80, 160) + offContext.stroke() + let img1 = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img1) + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010.ets new file mode 100644 index 000000000..ac5ada450 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute2010 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.moveTo(150, 25) + offContext.lineTo(250, 100) + offContext.lineTo(50, 100) + offContext.closePath() + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040.ets new file mode 100644 index 000000000..62f8287f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040.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 UIComponentCanvasModifier2040 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let region = new Path2D() + region.moveTo(30, 90) + region.lineTo(110, 20) + region.lineTo(240, 130) + region.lineTo(60, 130) + region.lineTo(190, 20) + region.lineTo(270, 90) + region.closePath() + this.context.rect(20, 20, 100, 100) + // Fill path + this.context.fillStyle = '#00ff00' + this.context.fill(region, "evenodd") + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050.ets new file mode 100644 index 000000000..1fe955baa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset2050 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.lineWidth = 10; + this.context.rect(20, 20, 100, 100); + this.context.fill('nonzero'); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100.ets new file mode 100644 index 000000000..b69be4638 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2100 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private path2Db: Path2D = new Path2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.path2Db.moveTo(200, 100) + this.path2Db.lineTo(300, 100) + this.path2Db.closePath() + this.context.stroke(this.path2Db) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140.ets new file mode 100644 index 000000000..2bef7789c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset2140 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.lineWidth = 10; + this.context.rect(100, 100, 100, 100); + this.context.fillRect(100, 100, 100, 100); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220.ets new file mode 100644 index 000000000..43ed6a5c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220.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 UIComponentCanvasAttribute2220 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'round' + offContext.moveTo(50, 50) + offContext.quadraticCurveTo(200, 200, 300, 20) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230.ets new file mode 100644 index 000000000..a0ca6c079 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2230 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.beginPath() + this.context.moveTo(50, 50) + this.context.quadraticCurveTo(200, 200, 200, 200) + this.context.stroke() + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250.ets new file mode 100644 index 000000000..bb3f2a00f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2250 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private path2Db: Path2D = new Path2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() => { + this.path2Db.moveTo(50, 50) + this.path2Db.quadraticCurveTo(300, 100, 50, 50) + this.context.stroke(this.path2Db) + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270.ets new file mode 100644 index 000000000..9f70a5f87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2270 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + private path2Db: Path2D = new Path2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height(500) + .backgroundColor('#ffff00') + .onReady(() => { + this.path2Db.moveTo(50, 50) + this.path2Db.bezierCurveTo(0, 100, 0, 100, 200, 20) + this.context.stroke(this.path2Db) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320.ets new file mode 100644 index 000000000..f18ce6979 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2320 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private path2Db: Path2D = new Path2D() + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() => { + this.context.beginPath() + this.context.arc(100, 75, 50, 2.14, -5, true) + this.context.stroke() + }) + }.padding(50) + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390.ets new file mode 100644 index 000000000..a5875f1c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390.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 UIComponentCanvasModifier2390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.moveTo(70, 50) + this.context.lineTo(220, 50) + this.context.lineTo(320, 150) + this.context.stroke() + this.context.beginPath() + this.context.moveTo(70, 50) + this.context.arcTo(-220, -50, 150, 150, 40) + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420.ets new file mode 100644 index 000000000..3ffb3f7b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2420 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .onReady(() =>{ + this.context.rect(80, 10, 20, 130) + this.context.rect(40, 50, 100, 50) + this.context.clip('evenodd') + this.context.fillRect(0, 0, 200, 200) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440.ets new file mode 100644 index 000000000..659eb08e3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier2440 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.rect(80,10,20,130) + offContext.rect(40,50,100,50) + offContext.stroke() + offContext.clip() + offContext.fillStyle = "rgb(255,0,0)" + offContext.fillRect(0, 0, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450.ets new file mode 100644 index 000000000..bb65f49f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450.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 UIComponentCanvasModifier2450 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px monospace' + offContext.moveTo(140, 10) + offContext.lineTo(140, 90) + offContext.textAlign = 'start' + offContext.fillText('textAlign=start', 140, 60) + offContext.fillText('Hello World!', 140, 90) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510.ets new file mode 100644 index 000000000..c8085d9f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510.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 UIComponentCanvasModifier2510 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(20, 120); + this.context.lineTo(200, 120); + this.context.stroke(); + this.context.font = '50px sans-serif'; + this.context.textBaseline = 'alphabetic'; + this.context.fillText('Hello global!', 55, 120); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600.ets new file mode 100644 index 000000000..b7bfaa0d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2600 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px sans-serif' + offContext.fillText("Hello world", 50, 100, 300) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630.ets new file mode 100644 index 000000000..d63e0a3e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2630 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px sans-serif' + offContext.fillText("Hello World!", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640.ets new file mode 100644 index 000000000..55664096f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2640 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px serif' + offContext.fillText("Hello World!", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650.ets new file mode 100644 index 000000000..2050ab5f3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier2650 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px monospace' + offContext.fillText("Hello World!", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660.ets new file mode 100644 index 000000000..f30cf7bf1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier2660 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '-50px sans-serif' + offContext.fillText("Hello world", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680.ets new file mode 100644 index 000000000..5a081bd43 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2680 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(400) + .height(400) + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = 'italic bold 50px sans-serif' + offContext.fillText("Hello World", 50, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740.ets new file mode 100644 index 000000000..e40bc2e12 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute2740 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.stroke() + this.context.font = 'italic bold -50px sans-serif' + this.context.fillText("Hello World!", 50, 100) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770.ets new file mode 100644 index 000000000..b83403a4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2770 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.font = 'sans-serif bold italic 50px' + this.context.fillText("Hello world", 50, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810.ets new file mode 100644 index 000000000..956bb51e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810.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 UIComponentCanvasModifier2810 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px sans-serif' + offContext.fillText("Hello World!", 20, 100) + offContext.fillText("height:" + this.context.measureText("Hello World!").height, 20, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820.ets new file mode 100644 index 000000000..0f2b7ced2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier2820 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px sans-serif' + offContext.fillText("Hello World!", 20, 100) + offContext.fillText("width:" + this.context.measureText("Hello World!").width, 20, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830.ets new file mode 100644 index 000000000..85c6e6e7b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830.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 UIComponentCanvasModifier2830 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(0, 100); + this.context.lineTo(100, 100); + this.context.stroke(); + this.context.font = '60px sans-serif'; + let width = this.context.measureText(this.text).actualBoundingBoxAscent + this.context.fillText('textAlign', 10, 100, width); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840.ets new file mode 100644 index 000000000..abef373a2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840.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 UIComponentCanvasModifier2840 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(140, 10); + this.context.lineTo(140, 160); + this.context.stroke(); + this.context.font = '60px sans-serif'; + let width = this.context.measureText(this.text).fontBoundingBoxDescent + this.context.fillText('textAlign', 140, 120, width); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850.ets new file mode 100644 index 000000000..eaff80658 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850.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 UIComponentCanvasModifier2850 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(140, 10); + this.context.lineTo(140, 160); + this.context.stroke(); + this.context.font = '60px sans-serif'; + let width = this.context.measureText(this.text).actualBoundingBoxLeft + this.context.fillText('textAlign', 140, 120, width); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860.ets new file mode 100644 index 000000000..e7bbb22c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier2860 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let width = this.context.measureText(this.text).actualBoundingBoxRight + this.context.rect(100,100,width,100) + this.context.stroke(); + this.context.font = '60px sans-serif'; + this.context.fillText('Hello World!', 100, 100, width); + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900.ets new file mode 100644 index 000000000..f955ba947 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900.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 UIComponentCanvasModifier2900 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(10, 140); + this.context.lineTo(160, 140); + this.context.stroke(); + this.context.font = '60px sans-serif'; + let width = this.context.measureText(this.text).fontBoundingBoxAscent + this.context.fillText('textAlign', 140, 120, width); + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920.ets new file mode 100644 index 000000000..13a363ce2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920.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 UIComponentCanvasModifier2920 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private text: string = 'Hello World!' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(140, 10); + this.context.lineTo(140, 160); + this.context.stroke(); + this.context.font = '60px sans-serif'; + let width = this.context.measureText(this.text).hangingBaseline + this.context.fillText('textAlign', 140, 120, width); + + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930.ets new file mode 100644 index 000000000..20f8017f2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930.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 UIComponentCanvasModifier2930 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '50px sans-serif' + offContext.fillText("Hello World!", 20, 100) + offContext.fillText("ideographicBaseline:" + this.context.measureText("Hello World!").ideographicBaseline, 20, 200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940.ets new file mode 100644 index 000000000..9993a464b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940.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 UIComponentCanvasModifier2940 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.font = '-50px sans-serif' + offContext.fillText("Hello world", 50, 100) + offContext.direction = 'rtl'; + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960.ets new file mode 100644 index 000000000..194184ee7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier2960 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.lineJoin = 'miter' + offContext.miterLimit = -1 + offContext.moveTo(50, 50) + offContext.lineTo(80, 150) + offContext.lineTo(110, 50) + offContext.stroke() + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970.ets new file mode 100644 index 000000000..d5c8d8577 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasAttribute2970 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'miter' + offContext.moveTo(50, 50) + offContext.lineTo(80, 150) + offContext.lineTo(110, 50) + offContext.stroke() + offContext.miterLimit = 0 + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000.ets new file mode 100644 index 000000000..dc8f16737 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3000 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img,-20,-20) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030.ets new file mode 100644 index 000000000..36f4e62c0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030.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 UIComponentCanvasModifier3030 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this. + settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img:ImageBitmap = new ImageBitmap("resources/base/media/cat.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.drawImage(this.img, -20, -20, 100, 100,0,0,300,300) + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070.ets new file mode 100644 index 000000000..bdff59b36 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070.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 UIComponentCanvasModifier3070 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this. + settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img:ImageBitmap = new ImageBitmap("resources/base/media/cat.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let offctx = offContext + offctx.imageSmoothingEnabled = true + offctx.imageSmoothingQuality = 'low' + offctx.drawImage(this.img, 0, 0, 400, 200) + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090.ets new file mode 100644 index 000000000..effc118c8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier3090 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img:ImageBitmap = new ImageBitmap("resources/base/media/cat.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.context + ctx.imageSmoothingEnabled = true + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(this.img, 0, 0, 400, 200) + }) + .margin(10) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120.ets new file mode 100644 index 000000000..9881adc1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3120 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'grayscale(0.5)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130.ets new file mode 100644 index 000000000..2c98ac405 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier3130 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .grayscale(1) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle='rgb(0,0,255)' + this.context.fillRect(0,0,400,400) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150.ets new file mode 100644 index 000000000..8a76d17ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150.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 UIComponentCanvasModifier3150 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(400, 400) + private img:ImageBitmap = new ImageBitmap("resources/base/media/cat.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign. + Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let offctx = offContext + let img = this.img + + offctx.filter = 'grayscale()'; + offctx.drawImage(img, 100, 0, 100, 100); + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180.ets new file mode 100644 index 000000000..0a20acb8f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180.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 UIComponentCanvasModifier3180 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + + ctx.filter = 'sepia(1)'; + ctx.drawImage(img, 0, 0, 100, 100); + + let result = ctx.toDataURL() + console.info(result) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210.ets new file mode 100644 index 000000000..59fdae454 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +@Entry +@Component +struct UIComponentCanvasModifier3210 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign. + Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = 'rgb(0,255,255)' + offContext.fillRect(20,20,200,200) + + offContext.filter = 'sepia()'; + offContext.fillRect(230,20,200,200) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220.ets new file mode 100644 index 000000000..404097193 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier3220 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.filter = 'saturate()'; + this.context.fillStyle='rgb(0,0,255)' + this.context.fillRect(0,0,400,400) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230.ets new file mode 100644 index 000000000..859323e13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230.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 UIComponentCanvasModifier3230 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign. + Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let offctx = offContext + let img = this.img + offctx.drawImage(img, 0, 0, 100, 100); + + offctx.filter = 'saturate(0)'; + offctx.drawImage(img, 0, 100, 100, 100); + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270.ets new file mode 100644 index 000000000..4999ba694 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3270 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'hue-rotate(0degree)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290.ets new file mode 100644 index 000000000..e75b53de4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290.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 UIComponentCanvasModifier3290 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img:ImageBitmap = new ImageBitmap("resources/base/media/cat.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign. + Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let offctx = offContext + let img = this.img + + offctx.drawImage(img, 0, 0, 100, 100); + + offctx.filter = 'hue-rotate(180deg)'; + offctx.drawImage(img, 100, 100, 100, 100); + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300.ets new file mode 100644 index 000000000..293521fb1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300.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 UIComponentCanvasModifier3300 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + private img:ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign. + Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + let offctx = offContext + let img = this.img + + offctx.drawImage(img, 0, 0, 100, 100); + + + + + + offctx.filter = 'hue-rotate(360degree)'; + offctx.drawImage(img, 100, 100, 100, 100); + + + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320.ets new file mode 100644 index 000000000..8a0eba035 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3320 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .backgroundColor('#ffff00') + .height(500) + .invert(0) + .onReady(() =>{ + this.context.rect(80, 10, 20, 130) + this.context.rect(40, 50, 100, 50) + this.context.fillRect(0, 0, 200, 200) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350.ets new file mode 100644 index 000000000..54aec4b2f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350.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 UIComponentCanvasModifier3350 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(100) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'invert(2)' + this.context.fillRect(0, 30, 100, 100) + }) + + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'invert(1)' + this.context.fillRect(0, 140, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390.ets new file mode 100644 index 000000000..9558b4cd2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(100) + .blur(5) + .opacity(0.5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'invert(2)' + this.context.fillRect(0, 30, 100, 100) + }) + + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430.ets new file mode 100644 index 000000000..710212cb0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3430 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'brightness(0)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440.ets new file mode 100644 index 000000000..819ad6e0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440.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 UIComponentCanvasModifier3440 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + + ctx.filter = 'brightness(0.3)'; + ctx.drawImage(img, 0, 0, 100, 100); + + let result = ctx.toDataURL() + console.info(result) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450.ets new file mode 100644 index 000000000..2f7c81afa --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3450 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'brightness(0.5)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480.ets new file mode 100644 index 000000000..509fb3cb3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3480 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .contrast(0) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'brightness(0.5)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490.ets new file mode 100644 index 000000000..4033d9974 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3490 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#0097D4' + offContext.fillRect(10, 30, 100, 100) + let img = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img) + offContext.fillStyle = '#0097D4' + offContext.filter = 'contrast(0.5)' + offContext.fillRect(10, 130, 100, 100) + let img1 = offContext.transferToImageBitmap() + this.context.transferFromImageBitmap(img1) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510.ets new file mode 100644 index 000000000..ca3543e48 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510.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 UIComponentCanvasModifier3510 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'contrast(3)' + this.context.fillRect(0, 30, 100, 100) + + this.context.fillStyle = '#0097D4' + this.context.fillRect(0, 140, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520.ets new file mode 100644 index 000000000..0f451b476 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520.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 UIComponentCanvasModifier3520 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + + ctx.filter = 'blur()'; + ctx.drawImage(img, 0, 0, 100, 100); + + let result = ctx.toDataURL() + console.info(result) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540.ets new file mode 100644 index 000000000..7c5b2c5ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3540 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(3) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'contrast(3)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550.ets new file mode 100644 index 000000000..0252e69c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3550 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(200) + .height(300) + .blur(5) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.fillStyle = '#0097D4' + this.context.filter = 'contrast(3)' + this.context.fillRect(0, 30, 100, 100) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580.ets new file mode 100644 index 000000000..53a842d82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580.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 UIComponentCanvasModifier3580 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(400, 400) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offContext = this.offCanvas.getContext("2d", this.settings) + offContext.shadowBlur = -10 + offContext.shadowColor = 'rgb(0,0,255)' + offContext.fillStyle = 'rgb(255,0,0)' + offContext.fillRect(30, 30, 100, 100) + let image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width(400) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660.ets new file mode 100644 index 000000000..1b0b54087 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3660 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 0, 0, 130, 130) + let imagedata = this.context.getImageData(50, 50, 50, 50) + this.context.putImageData(imagedata, 150, 150) + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700.ets new file mode 100644 index 000000000..18c15d878 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700.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 UIComponentCanvasModifier3700 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img:ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + private offCanvas: OffscreenCanvas = new OffscreenCanvas(600, 600) + @State txt:string = '' + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.txt) + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img,0,0,130,130) + let imagedata = this.context.getImageData(50,50,130,130) + console.info('the image width is :'+imagedata.width) + this.txt = imagedata.width.toString() + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720.ets new file mode 100644 index 000000000..ceb10f8c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3720 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 0, 0, 10, 10) + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730.ets new file mode 100644 index 000000000..4d75229a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentCanvasModifier3730 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 0, 0, 0, 10) + }) + } + .width('100%') + .height('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740.ets new file mode 100644 index 000000000..28e418762 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740.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 UIComponentCanvasModifier3740 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("resources/base/media/icon.png") + @State txt: string = '' + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.txt) + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 50, 50, -10, 300) + let imagedata = this.context.getImageData(50, 50, -10, 300) + this.txt = imagedata.width.toString() + }) + } + .width('100%') + .height('100%') + } +} + diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770.ets new file mode 100644 index 000000000..5c5305876 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770.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 UIComponentCanvasModifier3770 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context1: OffscreenCanvas = new OffscreenCanvas(-300, 0); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let offContext = this.context1.getContext("2d", this.settings) + offContext.beginPath() + offContext.lineWidth = 15 + offContext.lineJoin = 'bevel' + offContext.moveTo(50, 50) + offContext.lineTo(150, 150) + offContext.lineTo(250, 50) + offContext.stroke() + let image = this.context1.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780.ets new file mode 100644 index 000000000..8a8ec77d0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasModifier3780 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.arc(100, 75, 50, 0, 6.28) + this.context.setLineDash([10,5]) + this.context.lineDashOffset = 10.0 + this.context.stroke() + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390.ets new file mode 100644 index 000000000..5f076c5f7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0390 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle = Color.Red; + this.context.fillRect(20, 20, 150, 100); + this.context.reset(); + this.context.fillRect(20, 150, 150, 100); + }) + } + .width('100%') + .height('100%') + }; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400.ets new file mode 100644 index 000000000..7c740d88c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0400 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineWidth = 0; + this.context.reset(); + this.context.strokeRect(25,25,85,105); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410.ets new file mode 100644 index 000000000..869b5241b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0410 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineWidth = -10; + this.context.reset(); + this.context.strokeRect(25,25,85,105); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420.ets new file mode 100644 index 000000000..cdd669a93 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0420 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineWidth = 10; + this.context.reset(); + this.context.strokeRect(25,25,85,105); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430.ets new file mode 100644 index 000000000..86cdd52b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0430 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.strokeStyle = Color.Red; + + this.context.reset(); + + this.context.lineWidth = 10; + this.context.strokeRect(25, 25, 85, 105); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440.ets new file mode 100644 index 000000000..53b9d867a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440.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 UIComponentCanvasReset0440 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineCap = 'round'; + + this.context.reset(); + + this.context.lineWidth = 10; + this.context.beginPath(); + this.context.moveTo(30, 50); + this.context.lineTo(220, 50); + this.context.stroke(); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450.ets new file mode 100644 index 000000000..e21329a9d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450.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 UIComponentCanvasReset0450 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineJoin = 'round'; + this.context.reset(); + this.context.beginPath(); + this.context.lineWidth = 8; + this.context.moveTo(30, 30); + this.context.lineTo(120, 60); + this.context.lineTo(30, 110); + this.context.stroke(); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460.ets new file mode 100644 index 000000000..612813232 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0460 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.font = '30px sans-serif' + this.context.fillText("Hello World!", 20, 100) + this.context.reset(); + this.context.fillText("Hello World!", 20, 100) + }) + } + .width('100%') + .height('100%') + }; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470.ets new file mode 100644 index 000000000..2b9524dee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0470 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.textAlign = 'center'; + + this.context.reset(); + + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(140, 10); + this.context.lineTo(140, 160); + this.context.stroke(); + this.context.font = '18px sans-serif'; + this.context.fillText('textAlign', 140, 120); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480.ets new file mode 100644 index 000000000..caeaa750a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480.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 UIComponentCanvasReset0480 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.textBaseline = 'hanging'; + + this.context.reset(); + + this.context.strokeStyle = '#0000ff'; + this.context.moveTo(0, 120); + this.context.lineTo(400, 120); + this.context.stroke(); + this.context.font = '20px sans-serif'; + this.context.fillText('Hanging', 295, 120); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490.ets new file mode 100644 index 000000000..02f8cb286 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0490 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle = 'rgb(0,0,255)'; + this.context.fillRect(0, 0, 50, 50); + this.context.globalAlpha = 0.2; + this.context.reset(); + this.context.fillStyle = 'rgb(0,0,255)'; + this.context.fillRect(50, 50, 50, 50); + }) + } + .width('100%') + .height('100%') + }; +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500.ets new file mode 100644 index 000000000..d0fb26df1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0500 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.lineDashOffset = 10; + this.context.reset(); + this.context.arc(100, 75, 50, 0, 6.28); + this.context.setLineDash([10,20]); + + this.context.stroke(); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510.ets new file mode 100644 index 000000000..490b3de2f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510.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 UIComponentCanvasReset0510 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(120, 20, 50, 50); + this.context.globalCompositeOperation = 'destination-out'; + this.context.fillStyle = 'rgb(0,0,255)'; + this.context.fillRect(150, 50, 50, 50); + this.context.reset(); + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 50, 50); + this.context.fillStyle = 'rgb(0,0,255)'; + this.context.fillRect(50, 50, 50, 50); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520.ets new file mode 100644 index 000000000..8efe6c8f6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0520 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.shadowBlur = 30; + + this.context.reset(); + + this.context.shadowColor = 'rgb(0,0,0)'; + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 100, 80); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530.ets new file mode 100644 index 000000000..d3e7df174 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0530 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#FFFFFF') + .onReady(() =>{ + + this.context.shadowColor = 'rgb(0,0,255)'; + this.context.reset(); + this.context.shadowBlur = 30; + + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 100, 80); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540.ets new file mode 100644 index 000000000..a8feadad3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540.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 UIComponentCanvasReset0540 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.shadowOffsetX = 30; + + this.context.reset(); + + this.context.shadowBlur = 10; + this.context.shadowColor = 'rgb(0,0,0)'; + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 100, 80); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550.ets new file mode 100644 index 000000000..f54c7ad4d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550.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 UIComponentCanvasReset0550 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.shadowOffsetY = 30; + + this.context.reset(); + + this.context.shadowBlur = 10; + this.context.shadowColor = 'rgb(0,0,0)'; + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(20, 20, 100, 80); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560.ets new file mode 100644 index 000000000..b886896b2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560.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 UIComponentCanvasReset0560 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context; + let img = this.img; + ctx.imageSmoothingQuality = 'high'; + ctx.imageSmoothingEnabled = false; + this.context.reset(); + ctx.drawImage(img, 200, 100, 100, 100); + let result = ctx.toDataURL(); + console.info(result); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570.ets new file mode 100644 index 000000000..197fb97b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570.ets @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0570 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('direction is inherit'); + Canvas(this.context) + .width('100%') + .height(150) + .backgroundColor('#0000ff') + .onReady(() => { + this.context.strokeStyle = '#000000' + this.context.moveTo(140, 10) + this.context.lineTo(140, 100) + this.context.stroke() + this.context.direction = 'inherit'; + this.context.font = '18px sans-serif' + this.context.textAlign = 'start' + this.context.fillText('textAlign=start', 140, 60) + this.context.textAlign = 'end' + this.context.fillText('textAlign=end', 140, 80) + }); + + Text('direction is rtl'); + Canvas(this.context1) + .width('100%') + .height(150) + .backgroundColor('#ffff00') + .onReady(() => { + this.context1.strokeStyle = '#000000' + this.context1.moveTo(140, 10) + this.context1.lineTo(140, 100) + this.context1.stroke() + this.context1.direction = 'rtl'; + this.context1.font = '18px sans-serif' + this.context1.textAlign = 'start' + this.context1.fillText('textAlign=start', 140, 60) + this.context1.textAlign = 'end' + this.context1.fillText('textAlign=end', 140, 80) + }); + + Text('direction is rtl, then reset rtl'); + Canvas(this.context2) + .width('100%') + .height(150) + .backgroundColor('#ff0000') + .onReady(() => { + this.context2.strokeStyle = '#000000' + this.context2.moveTo(140, 10) + this.context2.lineTo(140, 100) + this.context2.stroke() + this.context2.direction = 'rtl'; + this.context2.font = '18px sans-serif' + this.context2.textAlign = 'start' + this.context2.fillText('textAlign=start', 140, 60) + this.context2.textAlign = 'end' + this.context2.fillText('textAlign=end', 140, 80) + + this.context2.reset() + + this.context2.strokeStyle = '#000000' + this.context2.moveTo(140, 10) + this.context2.lineTo(140, 100) + this.context2.stroke() + this.context2.font = '18px sans-serif' + this.context2.textAlign = 'start' + this.context2.fillText('textAlign=start', 140, 60) + this.context2.textAlign = 'end' + this.context2.fillText('textAlign=end', 140, 80) + }); + + } + .width('100%') + .height('100%'); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580.ets new file mode 100644 index 000000000..8abdb988b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0580 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let height1 = this.context.height; + this.context.fillRect(0, 0, 300, height1/2); + + this.context.reset(); + + let height2 = this.context.height; + this.context.fillRect(0, 0, 300, height2/2); + }); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590.ets new file mode 100644 index 000000000..516a7994a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0590 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let width1 = this.context.width; + this.context.fillRect(0, 0, width1/2, 300); + + this.context.reset(); + + let width2 = this.context.width; + this.context.fillRect(0, 0, width2/2, 300); + }); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600.ets new file mode 100644 index 000000000..1641e00d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600.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 UIComponentCanvasReset0600 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + ctx.imageSmoothingQuality = 'high'; + this.context.reset(); + ctx.drawImage(img, 200, 100, 100, 100); + let result = ctx.toDataURL(); + console.info(result); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610.ets new file mode 100644 index 000000000..0a69860ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610.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 UIComponentCanvasReset0610 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + let ctx = this.context + let img = this.img + ctx.filter = 'invert(100%)'; + this.context.reset(); + ctx.drawImage(img, 200, 100, 100, 100); + let result = ctx.toDataURL(); + console.info(result); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620.ets new file mode 100644 index 000000000..ad8a65470 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620.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 UIComponentCanvasReset0620 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.moveTo(20, 20); + + this.context.reset(); + + this.context.lineTo(90, 90); + this.context.strokeStyle = '#0000ff'; + this.context.stroke(); + + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630.ets new file mode 100644 index 000000000..b32b395b1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0630 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.beginPath(); + this.context.lineTo(90, 90); + + this.context.reset(); + + this.context.moveTo(30, 30); + this.context.lineTo(0, 0); + this.context.strokeStyle = '#0000ff'; + this.context.closePath(); + this.context.stroke(); + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640.ets new file mode 100644 index 000000000..f3b6dd473 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0640 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.rotate(45 * Math.PI / 180); + this.context.reset(); + this.context.fillRect(70, 20, 50, 50); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650.ets new file mode 100644 index 000000000..15bf4ffc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650.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 UIComponentCanvasReset0650 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('not reset scale()'); + Canvas(this.context) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.strokeRect(30, 30, 50, 50); + this.context.scale(2, 2); // Scale to 200% + this.context.strokeRect(30, 30, 50, 50); + }); + Text('reset scale()'); + Canvas(this.context1) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context1.strokeRect(30, 30, 50, 50); + this.context1.scale(2, 2); // Scale to 200% + this.context1.reset(); + this.context1.strokeRect(30, 30, 50, 50); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660.ets new file mode 100644 index 000000000..b3fbdbccb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660.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 UIComponentCanvasReset0660 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('translate(70,70)'); + Canvas(this.context1) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context1.translate(70, 70); + this.context1.fillRect(10, 10, 50, 50); + }) + Text('reset() translate(70,70)'); + Canvas(this.context2) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context2.fillRect(10, 10, 50, 50); + this.context2.translate(70, 70); + this.context2.reset(); + this.context2.fillRect(10, 10, 50, 50); + }) + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670.ets new file mode 100644 index 000000000..7877dd260 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0670 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.transform(1, 0.5, -0.5, 1, 10, 10); + + this.context.reset(); + + this.context.fillStyle = 'rgb(255,0,0)'; + this.context.fillRect(100, 100, 100, 100); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680.ets new file mode 100644 index 000000000..38f88c050 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0680 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.setTransform(1,0.5, -0.5, 1, 10, 10); + + this.context.reset(); + + this.context.fillStyle = 'rgb(0,0,255)'; + this.context.fillRect(50, 50, 100, 100); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690.ets new file mode 100644 index 000000000..699fe3eb6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690.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 UIComponentCanvasReset0690 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context1: CanvasRenderingContext2D = new CanvasRenderingContext2D(this. settings); + private context2: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('context1'); + Canvas(this.context1) + .width('230vp') + .height('160vp') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context1.fillRect(100, 20, 50, 50); + this.context1.setTransform(1, 0.5, -0.5, 1, 10, 10); + + this.context1.reset(); + + let storedTransform = this.context1.getTransform(); + this.context1.setTransform(storedTransform); + this.context1.fillRect(100, 20, 50, 50); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700.ets new file mode 100644 index 000000000..9b73eb267 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0700 { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg") + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 100, 100, 130, 130); + this.context.reset(); + let pixelmap = this.context.getPixelMap(150, 150, 130, 130); + this.context.setPixelMap(pixelmap); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710.ets new file mode 100644 index 000000000..07d3e7d01 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710.ets @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0710 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img: ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() => { + this.context.drawImage(this.img, 0, 0, 130, 130); + this.context.reset(); + let imagedata = this.context.getImageData(50, 50, 130, 130); + this.context.putImageData(imagedata, 150, 150); + }); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720.ets new file mode 100644 index 000000000..bcbf16f6a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720.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 UIComponentCanvasReset0720 { + @State message: string = ''; + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Row() { + Column() { + Row(){ + Button('getlinedash') + .width(150) + .height(150) + .onClick(() => { + let res = this.context.getLineDash(); + this.message = JSON.stringify(res); + }).id('UIComponentCanvasReset0720_001'); + + Button('clearlinedash') + .width(150) + .height(150) + .onClick(() => { + this.message = ''; + }).id('UIComponentCanvasReset0720_002'); + } + + Text(this.message); + + Canvas(this.context) + .width('100%') + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + this.context.reset(); + this.context.arc(100, 75, 50, 0, 6.28); + this.context.stroke(); + }) + } + .width('100%') + } + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730.ets new file mode 100644 index 000000000..cc035b7a9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0730 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + @State resultURL: string = ""; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(100) + .height(100) + .onReady(() =>{ + this.context.fillStyle = "#00ff00"; + this.context.fillRect(0,0,100,100); + this.context.reset(); + this.resultURL = this.context.toDataURL("image/jpg", 0.92); + }) + Text(this.resultURL); + } + .width('100%') + .height('100%') + .backgroundColor('#ffff00'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740.ets new file mode 100644 index 000000000..082616e51 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0740 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.font = '50px sans-serif'; + this.context.fillText("Hello World!", 20, 100); + this.context.reset(); + this.context.fillText("width:" + this.context.measureText("Hello World!").width, 20, 200); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750.ets new file mode 100644 index 000000000..9840fe345 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentCanvasReset0750 { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + this.context.setLineDash([10,20]); + + this.context.reset(); + + this.context.arc(100, 75, 50, 0, 6.28); + this.context.stroke(); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010.ets new file mode 100644 index 000000000..e3d6e4260 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010.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 UIComponentColumnMirrorImage0010 { + @State direction1: Direction = Direction.Auto; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('direction::auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0010_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Start) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.End) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020.ets new file mode 100644 index 000000000..0ef963f0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0020 { + @State direction1: Direction = Direction.Ltr; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('direction::Rtl').width('50%') + .onClick(() => { + if (this.direction1 == Direction.Rtl) { + this.direction1 = Direction.Ltr; + } + else { + this.direction1 = Direction.Rtl; + } + }).id('UIComponentColumnMirrorImage0020_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Start) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.End) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030.ets new file mode 100644 index 000000000..dc654aa07 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030.ets @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0030 { + @State direction1: Direction = Direction.Rtl; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('direction::ltr').width('50%') + .onClick(() => { + if (this.direction1 == Direction.Rtl) { + this.direction1 = Direction.Ltr; + } + else { + this.direction1 = Direction.Rtl; + } + }).id('UIComponentColumnMirrorImage0030_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Start) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.End) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040.ets new file mode 100644 index 000000000..5fd421ff8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0040 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }); + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }); + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }); + + }.width('100%').padding({ top: 5 }); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050.ets new file mode 100644 index 000000000..6745d5af9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050.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 UIComponentColumnMirrorImage0050 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + + Button('direction::Auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0050_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060.ets new file mode 100644 index 000000000..a0c573975 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060.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 UIComponentColumnMirrorImage0060 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + + Button('direction::Rtl').width('50%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0060_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070.ets new file mode 100644 index 000000000..baa7aade5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070.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 UIComponentColumnMirrorImage0070 { + @State direction1: Direction = Direction.Rtl; + + build() { + Column({ space: 5 }) { + + Button('direction::Ltr').width('50%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0070_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080.ets new file mode 100644 index 000000000..537dad9c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080.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 UIComponentColumnMirrorImage0080 { + build() { + Column({ space: 5 }) { + + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center) + + Text('justifyContent(Start)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start); + + Text('justifyContent(End)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly); + + }.width('100%').padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090.ets new file mode 100644 index 000000000..de2852a8c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090.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 UIComponentColumnMirrorImage0090 { + @State direction1: Direction = Direction.Auto; + + build() { + Column({ space: 5 }) { + Button('direction::auto').width('50%') + .onClick(()=>{ + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0090_001') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100.ets new file mode 100644 index 000000000..abee8684a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0100 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + Button('direction::RTL').width('50%') + .onClick(() => { + if (this.direction1 == Direction.Ltr) { + this.direction1 = Direction.Rtl; + } + else { + this.direction1 = Direction.Ltr; + } + }).id('UIComponentColumnMirrorImage0100_001') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110.ets new file mode 100644 index 000000000..cb33ef373 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0110 { + @State direction1: Direction = Direction.Rtl; + + build() { + Column({ space: 5 }) { + Button('direction::LTR').width('50%') + .onClick(() => { + if (this.direction1 == Direction.Ltr) { + this.direction1 = Direction.Rtl; + } + else { + this.direction1 = Direction.Ltr; + } + }).id('UIComponentColumnMirrorImage0110_001') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120.ets new file mode 100644 index 000000000..1ede255a7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120.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 UIComponentColumnMirrorImage0120 { + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }) + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }) + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }) + + }.width('100%').padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130.ets new file mode 100644 index 000000000..43272c3b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130.ets @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; + +@Entry +@Component +struct UIComponentColumnMirrorImage0130 { + @State color: string = '#DB7093'; + @State text: string = 'Portrait'; + @State direction1: Direction = Direction.Auto; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('(orientation: landscape)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { // 若设备为横屏状态,更改相应的页面布局 + this.color = '#FFD700'; + this.text = 'Landscape'; + } else { + this.color = '#DB7093'; + this.text = 'Portrait'; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column() { + Button('direction::auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0130_001'); + Text('Landscape') + .fontSize(30) + .fontColor(this.color) + .backgroundColor(Color.Orange) + .onClick(() => { + this.changeOrientation(true); + }).id('UIComponentColumnMirrorImage0130_002'); + Text('Portrait') + .fontSize(30) + .fontColor(this.color) + .backgroundColor(Color.Orange) + .onClick(() => { + this.changeOrientation(false); + }).id('UIComponentColumnMirrorImage0130_003'); + + Text('alignItems(Start)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + } + .width('100%').height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140.ets new file mode 100644 index 000000000..a72efdec9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140.ets @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0140 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 10 }) { + + Button('direction::Auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0140_001'); + + Column() { + Text('alignItems(Start)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .direction(this.direction1); + + Text('alignItems(End)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .direction(this.direction1); + + Text('alignItems(Center)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .direction(this.direction1); + + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default flexShrink')// 默认值为1 + .width('40%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('flexBasis(100)') + .flexBasis(100)// 这里表示宽度为100vp + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(80) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(80) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(80).backgroundColor(0xAFEEEE).direction(this.direction1); + + Row() { + // 权重1,占主轴剩余空间1/3 + Text('layoutWeight(1)') + .size({ width: '30%', height: 80 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 80 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 80 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + }.size({ width: '90%', height: 80 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.width('100%').height('auto').direction(this.direction1); + + + }.direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150.ets new file mode 100644 index 000000000..b8496acfb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150.ets @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0150 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 10 }) { + + Button('direction::Ltr').width('50%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0150_001'); + + Column() { + Text('alignItems(Start)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .direction(this.direction1); + + Text('alignItems(End)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .direction(this.direction1); + + Text('alignItems(Center)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .direction(this.direction1); + + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default flexShrink')// 默认值为1 + .width('40%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('flexBasis(100)') + .flexBasis(100)// 这里表示宽度为100vp + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(80) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(80) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(80).backgroundColor(0xAFEEEE).direction(this.direction1); + + Row() { + // 权重1,占主轴剩余空间1/3 + Text('layoutWeight(1)') + .size({ width: '30%', height: 80 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 80 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 80 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + }.size({ width: '90%', height: 80 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.width('100%').height('auto').direction(this.direction1); + + + }.direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160.ets new file mode 100644 index 000000000..ccb5908b6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160.ets @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0160 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 10 }) { + + Button('direction::Ltr').width('50%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0160_001'); + + Column() { + Text('alignItems(Start)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .direction(this.direction1); + + Text('alignItems(End)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .direction(this.direction1); + + Text('alignItems(Center)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .direction(this.direction1); + + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default flexShrink')// 默认值为1 + .width('40%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('flexBasis(100)') + .flexBasis(100)// 这里表示宽度为100vp + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(80) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(80) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(80).backgroundColor(0xAFEEEE).direction(this.direction1); + + Row() { + // 权重1,占主轴剩余空间1/3 + Text('layoutWeight(1)') + .size({ width: '30%', height: 80 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 80 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 80 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + }.size({ width: '90%', height: 80 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.width('100%').height('auto').direction(this.direction1); + + + }.direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170.ets new file mode 100644 index 000000000..9776f6f45 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170.ets @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0170 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 10 }) { + + Column() { + Text('alignItems(Start)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + ; + + Text('alignItems(End)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + ; + + Text('alignItems(Center)').width('90%'); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + ; + + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + ; + Text('default flexShrink')// 默认值为1 + .width('40%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + ; + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + ; + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + ; + + Flex() { + Text('flexBasis(100)') + .flexBasis(100)// 这里表示宽度为100vp + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + ; + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(100) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + ; + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + ; + + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(80) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + ; + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(80) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + ; + }.width('90%').height(80).backgroundColor(0xAFEEEE); + + Row() { + // 权重1,占主轴剩余空间1/3 + Text('layoutWeight(1)') + .size({ width: '30%', height: 80 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 80 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 80 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + }.size({ width: '90%', height: 80 }).backgroundColor(0xAFEEEE); + + }.width('100%').height('auto'); + + + }; + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180.ets new file mode 100644 index 000000000..719c62b77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180.ets @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0180 { + @State direction1: Direction = Direction.Rtl; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Button('direction:Auto').width('30%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0180_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default')// 默认值为1 + .width('40%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(20) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Flex() { + Text('flexBasis(100)') + .flexBasis(110)// 这里表示宽度为100vp + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(40) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(20).backgroundColor(0xAFEEEE).direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190.ets new file mode 100644 index 000000000..508e52b23 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190.ets @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0190 { + @State direction1: Direction = Direction.Rtl; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Button('direction:Rtl').width('30%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0190_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default')// 默认值为1 + .width('40%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(20) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Flex() { + Text('flexBasis(100)') + .flexBasis(110)// 这里表示宽度为100vp + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(40) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(20).backgroundColor(0xAFEEEE).direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200.ets new file mode 100644 index 000000000..358e3942a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200.ets @@ -0,0 +1,148 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0200 { + @State direction1: Direction = Direction.Ltr; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Button('direction:Ltr').width('30%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0200_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default')// 默认值为1 + .width('40%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(20) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Flex() { + Text('flexBasis(100)') + .flexBasis(110)// 这里表示宽度为100vp + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(40) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(20).backgroundColor(0xAFEEEE).direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210.ets new file mode 100644 index 000000000..2350cccb1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210.ets @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0210 { + @State direction1: Direction = Direction.Ltr; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + Flex({ direction: FlexDirection.Row }) { + Text('flexShrink(0)') + .flexShrink(0) + .width('50%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('default')// 默认值为1 + .width('40%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('flexShrink(1)') + .flexShrink(1) + .width('40%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(20) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + Flex() { + Text('flexBasis(100)') + .flexBasis(110)// 这里表示宽度为100vp + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text(`flexBasis('auto')`) + .flexBasis('auto')// 这里表示宽度保持原本设置的60%的宽度 + .width('60%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + .width('90%') + .height(40) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + Flex() { + Text('displayPriority(1)') + .displayPriority(1) + .width('70%') + .height(20) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .direction(this.direction1); + Text('displayPriority(2)') + .displayPriority(2) + .width('70%') + .height(20) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .direction(this.direction1); + }.width('90%').height(20).backgroundColor(0xAFEEEE).direction(this.direction1); + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + Row() { + // 权重1,占主轴剩余空间1/3 + Text('lw(1)') + .size({ width: '30%', height: 10 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) + .layoutWeight(1).fontSize(10) + // 权重2,占主轴剩余空间2/3 + Text('layoutWeight(2)') + .size({ width: '30%', height: 10 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .layoutWeight(2).fontSize(10) + // 未设置layoutWeight属性,组件按照自身尺寸渲染 + Text('no layoutWeight') + .size({ width: '30%', height: 10 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center).fontSize(10) + }.size({ width: '90%', height: 10 }).backgroundColor(0xAFEEEE).direction(this.direction1); + + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230.ets new file mode 100644 index 000000000..485b822cb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230.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 UIComponentColumnMirrorImage0230 { + @State direction1: Direction = Direction.Rtl; + + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%').position({ x: 10, y: 10 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .padding(5) + .border({ width: 1 }) + .position({ x: 10, y: 40 }) + .direction(this.direction1); + + Text('alignItems(End)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .padding(5) + .border({ width: 2 }) + .position({ x: 10, y: 160 }) + .direction(this.direction1); + + Text('alignItems(Center)').width('90%').position({ x: 10, y: 250 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .padding(5) + .border({ width: 3 }) + .position({ x: 10, y: 290 }) + .direction(this.direction1); + + Button('direction::Auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0230_001').position({ x: 10, y: 500 }); + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240.ets new file mode 100644 index 000000000..006483c0e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240.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 UIComponentColumnMirrorImage0240 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%').position({ x: 10, y: 10 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .padding(5) + .border({ width: 1 }) + .position({ x: 10, y: 40 }) + .direction(this.direction1); + + Text('alignItems(End)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .padding(5) + .border({ width: 2 }) + .position({ x: 10, y: 160 }) + .direction(this.direction1); + + Text('alignItems(Center)').width('90%').position({ x: 10, y: 250 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .padding(5) + .border({ width: 3 }) + .position({ x: 10, y: 290 }) + .direction(this.direction1); + + Button('direction::Rtl').width('50%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0240_001').position({ x: 10, y: 500 }); + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250.ets new file mode 100644 index 000000000..402cab35b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250.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 UIComponentColumnMirrorImage0250 { + @State direction1: Direction = Direction.Rtl; + + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%').position({ x: 10, y: 10 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE); + Column().width('50%').height(30).backgroundColor(0x00FFFF); + } + .alignItems(HorizontalAlign.Start) + .width('90%') + .padding(5) + .border({ width: 1 }) + .position({ x: 10, y: 40 }) + .direction(this.direction1); + + Text('alignItems(End)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.End) + .width('90%') + .padding(5) + .border({ width: 2 }) + .position({ x: 10, y: 160 }) + .direction(this.direction1); + + Text('alignItems(Center)').width('90%').position({ x: 10, y: 250 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + } + .alignItems(HorizontalAlign.Center) + .width('90%') + .padding(5) + .border({ width: 3 }) + .position({ x: 10, y: 290 }) + .direction(this.direction1); + + Button('direction::Ltr').width('50%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0250_001').position({ x: 10, y: 500 }); + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260.ets new file mode 100644 index 000000000..b90d3da74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0260 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%').position({ x: 10, y: 10 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').padding(5).border({ width: 2 }).position({ x: 10, y: 40 }); + + Text('alignItems(End)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').padding(5).border({ width: 2 }).position({ x: 10, y: 160 }); + + Text('alignItems(Center)').width('90%').position({ x: 10, y: 250 }); + Column() { + Column().width('50%').height(30).backgroundColor(0xAFEEEE) + Column().width('50%').height(30).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').padding(5).border({ width: 2 }).position({ x: 10, y: 290 }); + + }.width('100%').padding({ top: 5 }); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270.ets new file mode 100644 index 000000000..939645b5c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0270 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + Button('direction:Auto').width('30%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0270_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%').position({ x: 10, y: 40 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Center) + .direction(this.direction1) + .position({ x: 10, y: 60 }) + .direction(this.direction1); + + Text('justifyContent(Start)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Start) + .direction(this.direction1) + .position({ x: 10, y: 150 }) + .direction(this.direction1); + + Text('justifyContent(End)').width('90%').position({ x: 10, y: 220 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.End) + .direction(this.direction1) + .position({ x: 10, y: 240 }) + .direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%').position({ x: 10, y: 310 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + .direction(this.direction1) + .position({ x: 10, y: 330 }) + .direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%').position({ x: 10, y: 400 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceAround) + .direction(this.direction1) + .position({ x: 10, y: 420 }) + .direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%').position({ x: 10, y: 490 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceEvenly) + .direction(this.direction1) + .position({ x: 10, y: 510 }) + .direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280.ets new file mode 100644 index 000000000..80d5a41c5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0280 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + Button('direction:Rtl').width('30%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0280_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%').position({ x: 10, y: 40 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Center) + .direction(this.direction1) + .position({ x: 10, y: 60 }) + .direction(this.direction1); + + Text('justifyContent(Start)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Start) + .direction(this.direction1) + .position({ x: 10, y: 150 }) + .direction(this.direction1); + + Text('justifyContent(End)').width('90%').position({ x: 10, y: 220 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.End) + .direction(this.direction1) + .position({ x: 10, y: 240 }) + .direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%').position({ x: 10, y: 310 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + .direction(this.direction1) + .position({ x: 10, y: 330 }) + .direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%').position({ x: 10, y: 400 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceAround) + .direction(this.direction1) + .position({ x: 10, y: 420 }) + .direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%').position({ x: 10, y: 490 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceEvenly) + .direction(this.direction1) + .position({ x: 10, y: 510 }) + .direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290.ets new file mode 100644 index 000000000..b614cad00 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0290 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column({ space: 5 }) { + Button('direction:Ltr').width('30%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0290_001'); + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%').position({ x: 10, y: 40 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Center) + .direction(this.direction1) + .position({ x: 10, y: 60 }) + .direction(this.direction1); + + Text('justifyContent(Start)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Start) + .direction(this.direction1) + .position({ x: 10, y: 150 }) + .direction(this.direction1); + + Text('justifyContent(End)').width('90%').position({ x: 10, y: 220 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.End) + .direction(this.direction1) + .position({ x: 10, y: 240 }) + .direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%').position({ x: 10, y: 310 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + .direction(this.direction1) + .position({ x: 10, y: 330 }) + .direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%').position({ x: 10, y: 400 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceAround) + .direction(this.direction1) + .position({ x: 10, y: 420 }) + .direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%').position({ x: 10, y: 490 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceEvenly) + .direction(this.direction1) + .position({ x: 10, y: 510 }) + .direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300.ets new file mode 100644 index 000000000..cb1365d3b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0300 { + @State direction1: Direction = Direction.Rtl; + + build() { + Column({ space: 5 }) { + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%').position({ x: 10, y: 40 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Center) + .direction(this.direction1) + .position({ x: 10, y: 60 }); + + Text('justifyContent(Start)').width('90%').position({ x: 10, y: 130 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.Start) + .direction(this.direction1) + .position({ x: 10, y: 150 }); + + Text('justifyContent(End)').width('90%').position({ x: 10, y: 220 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.End) + .direction(this.direction1) + .position({ x: 10, y: 240 }); + + Text('justifyContent(SpaceBetween)').width('90%').position({ x: 10, y: 310 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceBetween) + .direction(this.direction1) + .position({ x: 10, y: 330 }); + + Text('justifyContent(SpaceAround)').width('90%').position({ x: 10, y: 400 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceAround) + .direction(this.direction1) + .position({ x: 10, y: 420 }); + + Text('justifyContent(SpaceEvenly)').width('90%').position({ x: 10, y: 490 }); + Column() { + Column().width('90%').height(20).backgroundColor(0xAFEEEE) + Column().width('90%').height(20).backgroundColor(0x00FFFF) + } + .height(60) + .border({ width: 1 }) + .padding(5) + .justifyContent(FlexAlign.SpaceEvenly) + .direction(this.direction1) + .position({ x: 10, y: 510 }); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310.ets new file mode 100644 index 000000000..6c7c9b4fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0310 { + @State direction1: Direction = Direction.Auto; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('add data').width('50%') + .onClick(() => { + this.arr.push(this.data); + this.data++; + }).id('UIComponentColumnMirrorImage0310_001'); + Button('del data').width('50%') + .onClick(() => { + this.arr.pop(); + this.data--; + }).id('UIComponentColumnMirrorImage0310_002'); + + Button('direction::Auto').width('50%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0310_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Start); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.End); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Center); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320.ets new file mode 100644 index 000000000..bddbb7675 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0320 { + @State direction1: Direction = Direction.Ltr; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('add data').width('50%') + .onClick(() => { + this.arr.push(this.data); + this.data++; + }).id('UIComponentColumnMirrorImage0320_001'); + Button('del data').width('50%') + .onClick(() => { + this.arr.pop(); + this.data--; + }).id('UIComponentColumnMirrorImage0320_002'); + + Button('direction::Rtl').width('50%') + .onClick(() => { + if (this.direction1 == Direction.Rtl) { + this.direction1 = Direction.Ltr; + } + else { + this.direction1 = Direction.Rtl; + } + }).id('UIComponentColumnMirrorImage0320_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Start) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.End) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%') + .height(20) + .fontSize(16) + .textAlign(TextAlign.Center) + .direction(this.direction1); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330.ets new file mode 100644 index 000000000..996d22761 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330.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. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0330 { + @State direction1: Direction = Direction.Auto; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + + Button('add data').width('50%') + .onClick(() => { + this.arr.push(this.data); + this.data++; + }).id('UIComponentColumnMirrorImage0330_001'); + Button('del data').width('50%') + .onClick(() => { + this.arr.pop(); + this.data--; + }).id('UIComponentColumnMirrorImage0330_002'); + + Button('direction::Ltr').width('50%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0330_003') + + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Start); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.End); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).direction(this.direction1); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Center); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340.ets new file mode 100644 index 000000000..3a8273d30 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340.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 UIComponentColumnMirrorImage0340 { + @State direction1: Direction = Direction.Ltr; + @State arr: Array = [0, 1, 2]; + @State data: number = 3; + + build() { + Column({ space: 5 }) { + Button('add data').width('50%') + .onClick(() => { + this.arr.push(this.data); + this.data++; + }).id('UIComponentColumnMirrorImage0340_001'); + Button('del data').width('50%') + .onClick(() => { + this.arr.pop(); + this.data--; + }).id('UIComponentColumnMirrorImage0340_002'); + // 设置子元素水平方向对齐方式 + Text('alignItems(Start)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Start); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }); + + Text('alignItems(End)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.End); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }); + + Text('alignItems(Center)').width('90%') + Column() { + List({ space: 2, initialIndex: 0 }) { + ForEach(this.arr, (item: number) => { + ListItem() { + Text('' + item) + .width('100%').height(20).fontSize(16).textAlign(TextAlign.Center); + } + }, (item: string) => item) + } + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }); + + }.width('100%').padding({ top: 5 }); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350.ets new file mode 100644 index 000000000..ee7fe7de6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350.ets @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0350 { + @State direction1: Direction = Direction.Ltr; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Row() { + Button('add data').width('30%') + .onClick(() => { + this.seq++; + }).id('UIComponentColumnMirrorImage0350_001'); + Button('del data').width('30%') + .onClick(() => { + this.seq--; + }).id('UIComponentColumnMirrorImage0350_002'); + Button('direction:auto').width('30%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentColumnMirrorImage0350_003'); + } + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360.ets new file mode 100644 index 000000000..5e612c184 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360.ets @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0360 { + @State direction1: Direction = Direction.Rtl; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Row() { + Button('add data').width('30%') + .onClick(() => { + this.seq++; + }).id('UIComponentColumnMirrorImage0360_001'); + Button('del data').width('30%') + .onClick(() => { + this.seq--; + }).id('UIComponentColumnMirrorImage0360_002'); + Button('direction:Rtl').width('30%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentColumnMirrorImage0360_003'); + } + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370.ets new file mode 100644 index 000000000..bc41de6fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370.ets @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0370 { + @State direction1: Direction = Direction.Rtl; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Row() { + Button('add data').width('30%') + .onClick(() => { + this.seq++; + }).id('UIComponentColumnMirrorImage0370_001'); + Button('del data').width('30%') + .onClick(() => { + this.seq--; + }).id('UIComponentColumnMirrorImage0370_002'); + Button('direction:Ltr').width('30%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentColumnMirrorImage0370_003'); + } + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380.ets new file mode 100644 index 000000000..2e4c2597b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380.ets @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentColumnMirrorImage0380 { + @State direction1: Direction = Direction.Ltr; + @State seq: number = 2; + + build() { + Column({ space: 5 }) { + Row() { + Button('add data').width('30%') + .onClick(() => { + this.seq++; + }).id('UIComponentColumnMirrorImage0380_001'); + Button('del data').width('30%') + .onClick(() => { + this.seq--; + }).id('UIComponentColumnMirrorImage0380_002'); + } + + // 设置子元素垂直方向的对齐方式 + Text('justifyContent(Center)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Center).direction(this.direction1); + + Text('justifyContent(Start)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.Start).direction(this.direction1); + + Text('justifyContent(End)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.End).direction(this.direction1); + + Text('justifyContent(SpaceBetween)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceBetween).direction(this.direction1); + + Text('justifyContent(SpaceAround)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceAround).direction(this.direction1); + + Text('justifyContent(SpaceEvenly)').width('90%') + Column() { + if (this.seq >= 3) { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + Column().width('90%').height(10).backgroundColor(0xFF0000) + } + else { + Column().width('90%').height(10).backgroundColor(0xAFEEEE) + Column().width('90%').height(10).backgroundColor(0x00FFFF) + } + }.height(60).border({ width: 1 }).justifyContent(FlexAlign.SpaceEvenly).direction(this.direction1); + + }.width('100%').padding({ top: 5 }).direction(this.direction1); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010.ets new file mode 100644 index 000000000..b28930901 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010.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 UIComponentFlexSpace0010 { + @State distance: number = 10; + + build() { + Column() { + Column() { + Row() { + Button('cross = 10').width('25%') + .onClick(() => { + this.distance = 10; + }).id('UIComponentFlexSpace0010_001'); + Button('cross = 0').width('25%') + .onClick(() => { + this.distance = 0; + }).id('UIComponentFlexSpace0010_002'); + Button('cross = -10').width('25%') + .onClick(() => { + this.distance = -10; + }).id('UIComponentFlexSpace0010_003'); + Button('cross = 3276789').width('25%') + .onClick(() => { + this.distance = 3276789; + }).id('UIComponentFlexSpace0010_004'); + } + Text('Not set Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ space: {main: LengthMetrics.vp(this.distance)} }) { // 子组件单行布局 + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020.ets new file mode 100644 index 000000000..c0817c38b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0020 { + + build() { + Column() { + Column() { + Text('Not set Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ space: {main: LengthMetrics.vp(undefined)} }) { // 子组件单行布局 + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030.ets new file mode 100644 index 000000000..ea34cbdd2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0030 { + + build() { + Column() { + Column() { + Text('Not set Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ space: {main: LengthMetrics.percent(20)} }) { // 子组件单行布局 + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040.ets new file mode 100644 index 000000000..18ef28232 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0040 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.Row, + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(25).backgroundColor(0xD2B48C); + Text('3').width('40%').height(25).backgroundColor(0xD2B48C); + Text('4').width('40%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050.ets new file mode 100644 index 000000000..7cae5851f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0050 { + build() { + Column() { + Column() { + Text('No set Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ space: {cross: LengthMetrics.px(10)} }) { // 子组件单行布局 + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060.ets new file mode 100644 index 000000000..fdb52f2da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060.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 UIComponentFlexSpace0060 { + @State distance: number = 10; + + build() { + Column() { + Column() { + Row() { + Button('cross = 10').width('25%') + .onClick(() => { + this.distance = 10; + }).id('UIComponentFlexSpace0060_001'); + Button('cross = 0').width('25%') + .onClick(() => { + this.distance = 0; + }).id('UIComponentFlexSpace0060_002'); + Button('cross = -10').width('25%') + .onClick(() => { + this.distance = -10; + }).id('UIComponentFlexSpace0060_003'); + Button('cross = 3276789').width('25%') + .onClick(() => { + this.distance = 3276789; + }).id('UIComponentFlexSpace0060_004'); + } + Text('Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ wrap: FlexWrap.Wrap, space: {cross: LengthMetrics.vp(this.distance)} }) { // 子组件单行布局 + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070.ets new file mode 100644 index 000000000..ff41908da --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0070 { + @State distance: number = 10; + + build() { + Column() { + Column() { + + Text('Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ wrap: FlexWrap.Wrap, space: {cross: LengthMetrics.vp(undefined)} }) { + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080.ets new file mode 100644 index 000000000..e054a4f5a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0080 { + @State distance: number = 10; + + build() { + Column() { + Column() { + + Text('Wrap').fontSize(30).fontColor(0xCCCCCC).width('90%') + Flex({ wrap: FlexWrap.Wrap, space: {cross: LengthMetrics.percent(20)} }) { + Text('1').width('50%').height(50).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(50).backgroundColor(0xD2B48C) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3) + } + .width('90%') + .backgroundColor(0xAFEEEE); + + }.width('100%').margin({ top: 5 }); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090.ets new file mode 100644 index 000000000..c3599ebf3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0090 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.Wrap, + direction: FlexDirection.Row, + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(25).backgroundColor(0xD2B48C); + Text('3').width('40%').height(25).backgroundColor(0xD2B48C); + Text('4').width('40%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100.ets new file mode 100644 index 000000000..35a3e138e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0100 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.Row, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(25).backgroundColor(0xD2B48C); + Text('3').width('40%').height(25).backgroundColor(0xD2B48C); + Text('4').width('40%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110.ets new file mode 100644 index 000000000..6083f8f10 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0110 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.RowReverse, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(25).backgroundColor(0xD2B48C); + Text('3').width('10%').height(25).backgroundColor(0xD2B48C); + Text('4').width('10%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120.ets new file mode 100644 index 000000000..11fad90b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120.ets @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0120 { + @State justifyContent1 : FlexAlign = FlexAlign.Start; + build() { + Column() { + Column() { + Row() { + Button('Align.Start').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.Start; + }).id('UIComponentFlexSpace0120_001'); + Button('Align.Center').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.Center; + }).id('UIComponentFlexSpace0120_002'); + Button('Align.End').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.End; + }).id('UIComponentFlexSpace0120_003'); + } + Row() { + Button('Align.SpaceBetween').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.SpaceBetween; + }).id('UIComponentFlexSpace0120_004'); + Button('Align.SpaceAround').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.SpaceAround; + }).id('UIComponentFlexSpace0120_005'); + Button('Align.SpaceEvenly').width('33%') + .onClick(() => { + this.justifyContent1 = FlexAlign.SpaceEvenly; + }).id('UIComponentFlexSpace0120_006'); + } + Text('NoWrap').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.RowReverse, + justifyContent: this.justifyContent1, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(25).backgroundColor(0xD2B48C); + Text('3').width('10%').height(25).backgroundColor(0xD2B48C); + Text('4').width('10%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130.ets new file mode 100644 index 000000000..9fcc3a46c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130.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 UIComponentFlexSpace0130 { + @State newAlignItems: ItemAlign = ItemAlign.End; + + build() { + Column() { + Column() { + Button('change width/height').width('50%') + .onClick(() => { + if (this.newAlignItems == ItemAlign.End) { + this.newAlignItems = ItemAlign.Start; + } + else { + this.newAlignItems = ItemAlign.End; + } + }).id('UIComponentFlexSpace0130_001'); + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: this.newAlignItems, + direction: FlexDirection.ColumnReverse, + space: { main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(50).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(50).backgroundColor(0xD2B48C); + Text('3').width('10%').height(50).backgroundColor(0xD2B48C); + Text('4').width('10%').height(50).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140.ets new file mode 100644 index 000000000..d811c26bd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {LengthMetrics} from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0140 { + + build() { + Column() { + Column() { + Text('WrapReverse').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ wrap: FlexWrap.WrapReverse, direction:FlexDirection.Row, space: {main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5)} }) { // 子组件反向多行布局 + Text('1').width('40%').height(50).backgroundColor(0xF5DEB3).margin(10); + Text('2').width('40%').height(50).backgroundColor(0xD2B48C).margin(10); + Text('3').width('40%').height(50).backgroundColor(0xD2B48C).margin(10); + } + .width('90%') + .height(120) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }); + + }.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/UIComponentFlexSpace/UIComponentFlexSpace0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0150.ets new file mode 100644 index 000000000..69b480341 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0150.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0150 { + @State newWidth: string = '40%'; + @State newHeight: number = 50; + + build() { + Column() { + Column() { + Button('change width/height').width('50%') + .onClick(() => { + if (this.newWidth == '40%') { + this.newWidth = '41%'; + this.newHeight = 51; + } + else { + this.newWidth = '40%'; + this.newHeight = 50; + } + }).id('UIComponentFlexSpace0150_001'); + + Text('WrapReverse').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + wrap: FlexWrap.WrapReverse, + direction: FlexDirection.Row, + space: { main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5) } + }) { // 子组件反向多行布局 + Text('1').width(this.newWidth).height(this.newHeight).backgroundColor(0xF5DEB3); + Text('2').width(this.newWidth).height(this.newHeight).backgroundColor(0xD2B48C); + Text('3').width(this.newWidth).height(this.newHeight).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160.ets new file mode 100644 index 000000000..97f8c364c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160.ets @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0160 { + @State color: string = '#DB7093'; + @State text: string = 'Portrait'; + @State direction1: Direction = Direction.Auto; + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('(orientation: landscape)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { // 若设备为横屏状态,更改相应的页面布局 + this.color = '#FFD700'; + this.text = 'Landscape'; + } else { + this.color = '#DB7093'; + this.text = 'Portrait'; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column() { + + Text('Landscape') + .fontSize(30) + .fontColor(this.color) + .backgroundColor(Color.Orange) + .onClick(() => { + this.changeOrientation(true); + }) + .id('UIComponentFlexSpace0160_001'); + Text('Portrait') + .fontSize(30) + .fontColor(this.color) + .backgroundColor(Color.Orange) + .onClick(() => { + this.changeOrientation(false); + }) + .id('UIComponentFlexSpace0160_002'); + Text('WrapReverse').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + wrap: FlexWrap.WrapReverse, + direction: FlexDirection.Row, + space: { main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5) } + }) { // 子组件反向多行布局 + Text('1').width('40%').height(50).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(50).backgroundColor(0xD2B48C); + Text('3').width('40%').height(50).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE); + } + .width('100%').height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170.ets new file mode 100644 index 000000000..e66716000 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0170 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.Column, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(25).backgroundColor(0xD2B48C); + Text('3').width('10%').height(25).backgroundColor(0xD2B48C); + Text('4').width('10%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180.ets new file mode 100644 index 000000000..9694682d6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180.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. + */ + +import { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentFlexSpace0180 { + build() { + Column() { + Column() { + + Text('NoWrap').fontSize(9).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.Wrap, + direction: FlexDirection.Column, + space: { main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(25).backgroundColor(0xD2B48C); + Text('3').width('10%').height(25).backgroundColor(0xD2B48C); + Text('4').width('10%').height(25).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010.ets new file mode 100644 index 000000000..2dccd1d1d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010.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 UIComponentLayoutFlexDirection0010 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0010_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0010_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0010_003'); + } + + Text('ItemAlign.Auto').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.Auto, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020.ets new file mode 100644 index 000000000..1a4b14b49 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020.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 UIComponentLayoutFlexDirection0020 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0020_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0020_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0020_003'); + } + + Text('ItemAlign.Center').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.Center, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030.ets new file mode 100644 index 000000000..73f9f3484 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030.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 UIComponentLayoutFlexDirection0030 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0030_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0030_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0030_003'); + } + + Text('ItemAlign.End').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.End, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040.ets new file mode 100644 index 000000000..2c4a624d9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040.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 UIComponentLayoutFlexDirection0040 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0040_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0040_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0040_003'); + } + + Text('ItemAlign.Start').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.Start, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050.ets new file mode 100644 index 000000000..5d51dafe0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050.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 UIComponentLayoutFlexDirection0050 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0050_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0050_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0050_003'); + } + + Text('FlexDirection.Column').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.Column, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(35).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060.ets new file mode 100644 index 000000000..feadeb4cc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060.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 UIComponentLayoutFlexDirection0060 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0060_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0060_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0060_003'); + } + + Text('FlexDirection.ColumnReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.ColumnReverse, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(35).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070.ets new file mode 100644 index 000000000..584d91095 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070.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 UIComponentLayoutFlexDirection0070 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0070_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0070_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0070_003'); + } + + Text('FlexDirection.Row').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.Row, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(35).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080.ets new file mode 100644 index 000000000..d74a7e980 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080.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 UIComponentLayoutFlexDirection0080 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0080_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0080_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0080_003'); + } + + Text('FlexDirection.RowReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction: FlexDirection.RowReverse, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('40%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(35).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090.ets new file mode 100644 index 000000000..f4113306c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090.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 UIComponentLayoutFlexDirection0090 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0090_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0090_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0090_003'); + } + + Text('FlexAlign.Center').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Center + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100.ets new file mode 100644 index 000000000..2d9d9ae0a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100.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 UIComponentLayoutFlexDirection0100 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0100_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0100_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0100_003'); + } + + Text('FlexAlign.End').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.End + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110.ets new file mode 100644 index 000000000..9a5f9fa21 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110.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 UIComponentLayoutFlexDirection0110 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0110_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0110_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0110_003'); + } + + Text('FlexAlign.SpaceAround').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceAround + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120.ets new file mode 100644 index 000000000..e48c6f99b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120.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 UIComponentLayoutFlexDirection0120 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0120_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0120_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0120_003'); + } + + Text('FlexAlign.SpaceBetween').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceBetween + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130.ets new file mode 100644 index 000000000..feaa4bdbc --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130.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 UIComponentLayoutFlexDirection0130 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0130_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0130_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0130_003'); + } + + Text('FlexAlign.SpaceEvenly').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceEvenly + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140.ets new file mode 100644 index 000000000..40922ad3e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140.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 UIComponentLayoutFlexDirection0140 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0140_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0140_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0140_003'); + } + + Text('FlexAlign.Start').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150.ets new file mode 100644 index 000000000..6eb1c9c74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150.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 UIComponentLayoutFlexDirection0150 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0150_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0150_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0150_003'); + } + + Text('FlexWrap.NoWrap').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160.ets new file mode 100644 index 000000000..235ba07ff --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160.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 UIComponentLayoutFlexDirection0160 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0160_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0160_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0160_003'); + } + + Text('FlexWrap.Wrap').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.Wrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170.ets new file mode 100644 index 000000000..29711c871 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170.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 UIComponentLayoutFlexDirection0170 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0170_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0170_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0170_003'); + } + + Text('FlexWrap.WrapReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.WrapReverse, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180.ets new file mode 100644 index 000000000..c4846506c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180.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 UIComponentLayoutFlexDirection0180 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0180_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0180_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0180_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190.ets new file mode 100644 index 000000000..2d294fdbe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190.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 UIComponentLayoutFlexDirection0190 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0190_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0190_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0190_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1') + .size({ width: '40%', height: '30%' }).backgroundColor(0xbbb2cb) + .zIndex(2) + Text('2') + .size({ width: '70%', height: '50%' }).backgroundColor(0xd2cab3).align(Alignment.TopStart) + .zIndex(1) + Text('3') + .size({ width: '90%', height: '80%' }).backgroundColor(0xc1cbac).align(Alignment.TopStart) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200.ets new file mode 100644 index 000000000..56f617aa9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200.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 UIComponentLayoutFlexDirection0200 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0200_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0200_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0200_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3).aspectRatio(1.5) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .aspectRatio(1.5) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210.ets new file mode 100644 index 000000000..f83b8a733 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentLayoutFlexDirection0210 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0210_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0210_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0210_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .pixelRound({ + start:PixelRoundCalcPolicy.FORCE_CEIL, + top:PixelRoundCalcPolicy.FORCE_CEIL + }) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220.ets new file mode 100644 index 000000000..87fe641d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220.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 UIComponentLayoutFlexDirection0220 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0220_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0220_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0220_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('50%').height(30).backgroundColor(0xF5DEB3).displayPriority(1) + Text('2').width('50%').height(40).backgroundColor(0xD2B48C).displayPriority(2) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3).displayPriority(3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230.ets new file mode 100644 index 000000000..d4f418140 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230.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 UIComponentLayoutFlexDirection0230 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0230_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0230_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0230_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240.ets new file mode 100644 index 000000000..001dee8f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240.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 UIComponentLayoutFlexDirection0240 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0240_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0240_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0240_003'); + } + + Text('ItemAlign.Auto').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.Auto, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250.ets new file mode 100644 index 000000000..8aebfcd0f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250.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 UIComponentLayoutFlexDirection0250 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0250_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0250_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0250_003'); + } + + Text('ItemAlign.Center').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Center, + alignItems: ItemAlign.Center, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260.ets new file mode 100644 index 000000000..1c4451574 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260.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 UIComponentLayoutFlexDirection0260 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0260_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0260_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0260_003'); + } + + Text('ItemAlign.End').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.End, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270.ets new file mode 100644 index 000000000..ab9c7de88 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270.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 UIComponentLayoutFlexDirection0270 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0270_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0270_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0270_003'); + } + + Text('ItemAlign.Start').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + alignItems: ItemAlign.Start, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(25).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280.ets new file mode 100644 index 000000000..1157e394d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280.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 UIComponentLayoutFlexDirection0280 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0280_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0280_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0280_003'); + } + + Text('FlexDirection.Column').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction:FlexDirection.Column, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(35).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(35).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290.ets new file mode 100644 index 000000000..f434bd55e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290.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 UIComponentLayoutFlexDirection0290 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0290_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0290_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0290_003'); + } + + Text('FlexDirection.ColumnReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction:FlexDirection.ColumnReverse, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(35).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(35).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300.ets new file mode 100644 index 000000000..059a0e575 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300.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 UIComponentLayoutFlexDirection0300 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0300_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0300_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0300_003'); + } + + Text('FlexDirection.Row').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction:FlexDirection.Row, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(35).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(35).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310.ets new file mode 100644 index 000000000..9557e16f7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310.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 UIComponentLayoutFlexDirection0310 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0310_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0310_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0310_003'); + } + + Text('FlexDirection.RowReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + direction:FlexDirection.RowReverse, + space: { main: LengthMetrics.vp(5) } + }) { + Text('1').width('10%').height(35).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(35).backgroundColor(0xD2B48C); + Text('3').width('10%').height(35).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320.ets new file mode 100644 index 000000000..7ed691dec --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320.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 UIComponentLayoutFlexDirection0320 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0320_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0320_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0320_003'); + } + + Text('FlexAlign.Center').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Center + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330.ets new file mode 100644 index 000000000..b0bec00b0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330.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 UIComponentLayoutFlexDirection0330 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0330_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0330_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0330_003'); + } + + Text('FlexAlign.End').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.End + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340.ets new file mode 100644 index 000000000..1e02a4056 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340.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 UIComponentLayoutFlexDirection0340 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0340_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0340_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0340_003'); + } + + Text('FlexAlign.SpaceAround').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceAround + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350.ets new file mode 100644 index 000000000..3d42cc171 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350.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 UIComponentLayoutFlexDirection0350 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0350_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0350_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0350_003'); + } + + Text('FlexAlign.SpaceBetween').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceBetween + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360.ets new file mode 100644 index 000000000..7d205b89b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360.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 UIComponentLayoutFlexDirection0360 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0360_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0360_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0360_003'); + } + + Text('FlexAlign.Start').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370.ets new file mode 100644 index 000000000..76c364eb2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370.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 UIComponentLayoutFlexDirection0370 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0370_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0370_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0370_003'); + } + + Text('FlexAlign.SpaceEvenly').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.SpaceEvenly + }) { + Text('1').width('10%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('10%').height(45).backgroundColor(0xD2B48C); + Text('3').width('10%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380.ets new file mode 100644 index 000000000..1b0e61ec8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380.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 UIComponentLayoutFlexDirection0380 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0380_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0380_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0380_003'); + } + + Text('FlexWrap.NoWrap').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390.ets new file mode 100644 index 000000000..c3d5c36c6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390.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 UIComponentLayoutFlexDirection0390 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0390_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0390_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0390_003'); + } + + Text('FlexWrap.Wrap').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.Wrap, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400.ets new file mode 100644 index 000000000..276f20246 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400.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 UIComponentLayoutFlexDirection0400 { + @State direction1: Direction = Direction.Ltr; + + build() { + Column() { + Column() { + Row() { + Button('Direction.Auto').width('33%') + .onClick(() => { + this.direction1 = Direction.Auto; + }).id('UIComponentLayoutFlexDirection0400_001'); + Button('Direction.Rtl').width('33%') + .onClick(() => { + this.direction1 = Direction.Rtl; + }).id('UIComponentLayoutFlexDirection0400_002'); + Button('Direction.Ltr').width('33%') + .onClick(() => { + this.direction1 = Direction.Ltr; + }).id('UIComponentLayoutFlexDirection0400_003'); + } + + Text('FlexWrap.WrapReverse').fontSize(20).fontColor(0xCCCCCC).width('90%'); + Flex({ + wrap: FlexWrap.WrapReverse, + justifyContent: FlexAlign.Start + }) { + Text('1').width('40%').height(45).backgroundColor(0xF5DEB3); + Text('2').width('40%').height(45).backgroundColor(0xD2B48C); + Text('3').width('40%').height(45).backgroundColor(0xFF0000); + } + .width('90%') + .height(200) + .backgroundColor(0xAFEEEE) + .direction(this.direction1); + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410.ets new file mode 100644 index 000000000..946dc731b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410.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 UIComponentLayoutFlexDirection0410 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0410_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0410_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0410_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420.ets new file mode 100644 index 000000000..893e1780c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420.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 UIComponentLayoutFlexDirection0420 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0420_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0420_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0420_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1') + .size({ width: '40%', height: '30%' }).backgroundColor(0xbbb2cb) + .zIndex(2) + Text('2') + .size({ width: '70%', height: '50%' }).backgroundColor(0xd2cab3).align(Alignment.TopStart) + .zIndex(1) + Text('3') + .size({ width: '90%', height: '80%' }).backgroundColor(0xc1cbac).align(Alignment.TopStart) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430.ets new file mode 100644 index 000000000..0b44d0a77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430.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 UIComponentLayoutFlexDirection0430 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0430_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0430_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0430_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3).aspectRatio(1.5) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .aspectRatio(1.5) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440.ets new file mode 100644 index 000000000..de873d710 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440.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 UIComponentLayoutFlexDirection0440 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0440_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0440_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0440_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('50%').height(30).backgroundColor(0xF5DEB3).displayPriority(1) + Text('2').width('50%').height(40).backgroundColor(0xD2B48C).displayPriority(2) + Text('3').width('50%').height(50).backgroundColor(0xF5DEB3).displayPriority(3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450.ets new file mode 100644 index 000000000..fa5e0cb71 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentLayoutFlexDirection0450 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0450_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0450_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0450_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .pixelRound({ + start:PixelRoundCalcPolicy.FORCE_CEIL, + top:PixelRoundCalcPolicy.FORCE_CEIL + }) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460.ets new file mode 100644 index 000000000..e75ff7c5e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460.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 UIComponentLayoutFlexDirection0460 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0460_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0460_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0460_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470.ets new file mode 100644 index 000000000..c6b6cc323 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470.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 UIComponentLayoutFlexDirection0470 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0470_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0470_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0470_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480.ets new file mode 100644 index 000000000..727449c9f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480.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 UIComponentLayoutFlexDirection0480 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0480_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0480_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0480_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Center }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490.ets new file mode 100644 index 000000000..df5d46103 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490.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 UIComponentLayoutFlexDirection0490 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0490_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0490_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0490_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.End }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500.ets new file mode 100644 index 000000000..7893c617a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500.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 UIComponentLayoutFlexDirection0500 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0500_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0500_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0500_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Start }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510.ets new file mode 100644 index 000000000..4892887b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510.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 UIComponentLayoutFlexDirection0510 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0510_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0510_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0510_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, direction: FlexDirection.Column }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520.ets new file mode 100644 index 000000000..afaa3bbbb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520.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 UIComponentLayoutFlexDirection0520 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0520_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0520_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0520_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, direction: FlexDirection.ColumnReverse }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530.ets new file mode 100644 index 000000000..36144b273 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530.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 UIComponentLayoutFlexDirection0530 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0530_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0530_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0530_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, direction: FlexDirection.Row }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540.ets new file mode 100644 index 000000000..dffae3c20 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540.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 UIComponentLayoutFlexDirection0540 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0540_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0540_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0540_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, direction: FlexDirection.RowReverse }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550.ets new file mode 100644 index 000000000..66b7b9b0d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550.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 UIComponentLayoutFlexDirection0550 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0550_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0550_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0550_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.Center }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560.ets new file mode 100644 index 000000000..d43f88d25 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560.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 UIComponentLayoutFlexDirection0560 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0560_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0560_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0560_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.End }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570.ets new file mode 100644 index 000000000..8247ce36b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570.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 UIComponentLayoutFlexDirection0570 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0570_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0570_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0570_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.SpaceAround }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580.ets new file mode 100644 index 000000000..d981fe08d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580.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 UIComponentLayoutFlexDirection0580 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0580_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0580_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0580_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.SpaceBetween }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590.ets new file mode 100644 index 000000000..30704e456 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590.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 UIComponentLayoutFlexDirection0590 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0590_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0590_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0590_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.Start }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600.ets new file mode 100644 index 000000000..c33836a82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600.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 UIComponentLayoutFlexDirection0600 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0600_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0600_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0600_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, justifyContent: FlexAlign.SpaceEvenly }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610.ets new file mode 100644 index 000000000..8b69784e0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610.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 UIComponentLayoutFlexDirection0610 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0610_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0610_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0610_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620.ets new file mode 100644 index 000000000..b40e5a231 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620.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 UIComponentLayoutFlexDirection0620 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0620_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0620_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0620_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, wrap: FlexWrap.Wrap }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630.ets new file mode 100644 index 000000000..c40779072 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630.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 UIComponentLayoutFlexDirection0630 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0630_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0630_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0630_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto, wrap: FlexWrap.WrapReverse }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640.ets new file mode 100644 index 000000000..cd762b0f9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640.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 UIComponentLayoutFlexDirection0640 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0640_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0640_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0640_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650.ets new file mode 100644 index 000000000..20543287e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650.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 UIComponentLayoutFlexDirection0650 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0650_001') + .onClick(() => { + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0650_002') + .onClick(() => { + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0650_003') + .onClick(() => { + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex() { + Text('1') + .size({ width: '40%', height: '30%' }).backgroundColor(0xbbb2cb) + .zIndex(2) + Text('2') + .size({ width: '70%', height: '50%' }).backgroundColor(0xd2cab3).align(Alignment.TopStart) + .zIndex(1) + Text('3') + .size({ width: '90%', height: '80%' }).backgroundColor(0xc1cbac).align(Alignment.TopStart) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660.ets new file mode 100644 index 000000000..f471a54fb --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660.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 UIComponentLayoutFlexDirection0660 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0660_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0660_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0660_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3).aspectRatio(1.5) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .aspectRatio(1.5) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670.ets new file mode 100644 index 000000000..73799ec28 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670.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 UIComponentLayoutFlexDirection0670 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0670_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0670_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0670_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3).displayPriority(1) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C).displayPriority(2) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3).displayPriority(3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680.ets new file mode 100644 index 000000000..3593169e3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentLayoutFlexDirection0680 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0680_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0680_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0680_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .pixelRound({ + start:PixelRoundCalcPolicy.FORCE_CEIL, + top:PixelRoundCalcPolicy.FORCE_CEIL + }) + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690.ets new file mode 100644 index 000000000..091d9f9f7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690.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 UIComponentLayoutFlexDirection0690 { + @State flexDirection:Direction = Direction.Auto; + build() { + Column() { + Button('AUTO') + .id('UIComponentLayoutFlexDirection0690_001') + .onClick(()=>{ + this.flexDirection = Direction.Auto; + }) + Button('RTL') + .id('UIComponentLayoutFlexDirection0690_002') + .onClick(()=>{ + this.flexDirection = Direction.Rtl; + }) + Button('LTR') + .id('UIComponentLayoutFlexDirection0690_003') + .onClick(()=>{ + this.flexDirection = Direction.Ltr; + }) + Column({ space: 5 }) { + Flex({ alignItems: ItemAlign.Auto }) { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + } + .direction(this.flexDirection) + .size({ width: '90%', height: 80 }) + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010.ets new file mode 100644 index 000000000..33a2d8e2c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010.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 UIComponentLayoutFlexLayout0010 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + }.width(100).height(100).displayPriority(1) + + Flex() { + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + }.width(100).height(100).displayPriority(0.5) + + Flex() { + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + }.width(100).height(100).displayPriority(0.5) + + Flex() { + Text('4').width('33%').height(30).backgroundColor(0xD2B48C) + }.width(100).height(100).displayPriority(1) + }.width(300) + .height(200) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020.ets new file mode 100644 index 000000000..bb0750076 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020.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 UIComponentLayoutFlexLayout0020 { + @State flexDirection: Direction = Direction.Auto; + + build() { + Column() { + Flex() { + Text('1').width('33%').height(30).backgroundColor(0xF5DEB3) + }.width(100).height(30).displayPriority(1) + + Flex() { + Text('2').width('33%').height(40).backgroundColor(0xD2B48C) + }.width(100).height(30).displayPriority(2) + + Flex() { + Text('3').width('33%').height(50).backgroundColor(0xF5DEB3) + }.width(100).height(30).displayPriority(3) + + Flex() { + Text('4').width('33%').height(30).backgroundColor(0xD2B48C) + }.width(100).height(30).displayPriority(4) + }.width(300) + .height(200) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030.ets new file mode 100644 index 000000000..82fa24b5f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030.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 { LengthMetrics } from '@kit.ArkUI'; + +@Entry +@Component +struct UIComponentLayoutFlexLayout0030 { + @State newWidth: string = '40%'; + @State newHeight: number = 50; + + build() { + Column() { + Column() { + + Text('WrapReverse').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + wrap: FlexWrap.Wrap, + direction: FlexDirection.Column, + space: { main: LengthMetrics.vp(5), cross: LengthMetrics.vp(5) } + }) { // 子组件反向多行布局 + Text('1').width(this.newWidth).height(this.newHeight).backgroundColor(0xF5DEB3); + Text('2').width(this.newWidth).height(this.newHeight).backgroundColor(0xD2B48C); + Text('3').width(this.newWidth).height(this.newHeight).backgroundColor(0xD2B48C); + } + .width('90%') + .height(120) + .backgroundColor(0xAFEEEE) + }.width('100%'); + }.width('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090.ets new file mode 100644 index 000000000..670c32a4f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090.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 UIComponentOtherRowsplitandcolumnsplitAnimation0090 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0090_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0090_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100.ets new file mode 100644 index 000000000..ac011e326 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100.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 UIComponentOtherRowsplitandcolumnsplitAnimation0100 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0100_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0100_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110.ets new file mode 100644 index 000000000..52ccee2f4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110.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 UIComponentOtherRowsplitandcolumnsplitAnimation0110 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0110_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0110_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120.ets new file mode 100644 index 000000000..fddf2bc0a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120.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 UIComponentOtherRowsplitandcolumnsplitAnimation0120 { + @State resizeable: boolean = false; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0120_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0120_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130.ets new file mode 100644 index 000000000..4d8119424 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130.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 UIComponentOtherRowsplitandcolumnsplitAnimation0130 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0130_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0130_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140.ets new file mode 100644 index 000000000..0cf2dbdc6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140.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 UIComponentOtherRowsplitandcolumnsplitAnimation0140 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0140_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0140_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150.ets new file mode 100644 index 000000000..90a24ac4c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150.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 UIComponentOtherRowsplitandcolumnsplitAnimation0150 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0150_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0150_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160.ets new file mode 100644 index 000000000..d1e08208c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160.ets @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { mediaquery, window } from '@kit.ArkUI'; +import { common } from '@kit.AbilityKit'; +import { promptAction } from '@kit.ArkUI' +import { BusinessError } from '@kit.BasicServicesKit'; + +@Entry +@Component +struct UIComponentOtherRowsplitandcolumnsplitAnimation0160 { + @State color: string = '#DB7093'; + @State resizeable: boolean = true; + @State text: string = 'Portrait'; + @State postion1: BarPosition = BarPosition.Start; + @State currentIndex: number = 0; + @State height1: number = 60; + @State direction1: Direction = Direction.Auto; + private controller: TabsController = new TabsController(); + // 当设备横屏时条件成立 + listener: mediaquery.MediaQueryListener = this.getUIContext() + .getMediaQuery() + .matchMediaSync('(orientation: landscape)'); + + // 当满足媒体查询条件时,触发回调 + onPortrait(mediaQueryResult: mediaquery.MediaQueryResult) { + if (mediaQueryResult.matches as boolean) { // 若设备为横屏状态,更改相应的页面布局 + this.color = '#FFD700'; + this.text = 'Landscape'; + } else { + this.color = '#DB7093'; + this.text = 'Portrait'; + } + } + + aboutToAppear() { + // 绑定当前应用实例 + // 绑定回调函数 + this.listener.on('change', (mediaQueryResult: mediaquery.MediaQueryResult) => { + this.onPortrait(mediaQueryResult) + }); + } + + aboutToDisappear() { + // 解绑listener中注册的回调函数 + this.listener.off('change'); + } + + // 改变设备横竖屏状态函数 + private changeOrientation(isLandscape: boolean) { + // 获取UIAbility实例的上下文信息 + let context: common.UIAbilityContext = this.getUIContext().getHostContext() as common.UIAbilityContext; + // 调用该接口手动改变设备横竖屏状态 + window.getLastWindow(context).then((lastWindow) => { + lastWindow.setPreferredOrientation(isLandscape ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT) + }); + } + + build() { + Column() { + Button('Landscape') + .onClick(() => { + this.changeOrientation(true); + }).id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_001'); + Button('Portrait') + .onClick(() => { + this.changeOrientation(false); + }).id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_002'); + + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + Divider().color(Color.Red); + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0160_003'); + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center); + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')); + } + .width('100%').height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170.ets new file mode 100644 index 000000000..98269c9f8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170.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 UIComponentOtherRowsplitandcolumnsplitAnimation0170 { + @State resizeable: boolean = true; + + build() { + Column() { + Button('resizeable') + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0170_002') + .onClick(() => { + this.resizeable = !this.resizeable; + }) + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + Divider().color(Color.Red); + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentOtherRowsplitandcolumnsplitAnimation0170_001'); + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center); + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center); + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020.ets new file mode 100644 index 000000000..7c6c81b44 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020.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 UIComponentPositionOffset0020 { + @State topOffset: Dimension = 0; + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top: this.topOffset}); + + Button('top=0') + .id('UIComponentPositionOffset0020_001') + .onClick(()=>{ + this.topOffset = 0; + }) + Button('top=50px') + .id('UIComponentPositionOffset0020_002') + .onClick(()=>{ + this.topOffset = '50px'; + }) + Button('top=60vp') + .id('UIComponentPositionOffset0020_003') + .onClick(()=>{ + this.topOffset = '60vp'; + }) + Button('top=70fp') + .id('UIComponentPositionOffset0020_004') + .onClick(()=>{ + this.topOffset = '70fp'; + }) + Button('top=80lpx') + .id('UIComponentPositionOffset0020_005') + .onClick(()=>{ + this.topOffset = '80lpx'; + }) + Button('top=60%') + .id('UIComponentPositionOffset0020_006') + .onClick(()=>{ + this.topOffset = '60%'; + }) + Button('top=$r(app.string.string_value_100)') + .id('UIComponentPositionOffset0020_007') + .onClick(()=>{ + this.topOffset = $r("app.string.string_value_100"); + }) + Button('top=-50') + .id('UIComponentPositionOffset0020_008') + .onClick(()=>{ + this.topOffset = -50; + }) + + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030.ets new file mode 100644 index 000000000..fccbfe996 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030.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 UIComponentPositionOffset0030 { + @State rightOffset: Dimension = 0; + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({right: this.rightOffset}); + + Button('right=0') + .id('UIComponentPositionOffset0030_001') + .onClick(()=>{ + this.rightOffset = 0; + }) + Button('right=50px') + .id('UIComponentPositionOffset0030_002') + .onClick(()=>{ + this.rightOffset = '50px'; + }) + Button('right=60vp') + .id('UIComponentPositionOffset0030_003') + .onClick(()=>{ + this.rightOffset = '60vp'; + }) + Button('right=70fp') + .id('UIComponentPositionOffset0030_004') + .onClick(()=>{ + this.rightOffset = '70fp'; + }) + Button('right=80lpx') + .id('UIComponentPositionOffset0030_005') + .onClick(()=>{ + this.rightOffset = '80lpx'; + }) + Button('right=60%') + .id('UIComponentPositionOffset0030_006') + .onClick(()=>{ + this.rightOffset = '60%'; + }) + Button('right=$r(app.string.string_value_100)') + .id('UIComponentPositionOffset0030_007') + .onClick(()=>{ + this.rightOffset = $r("app.string.string_value_100"); + }) + Button('right=-50') + .id('UIComponentPositionOffset0030_008') + .onClick(()=>{ + this.rightOffset = -50; + }) + + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040.ets new file mode 100644 index 000000000..e97448db7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040.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 UIComponentPositionOffset0040 { + @State bottomOffset: Dimension = 0; + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({bottom: this.bottomOffset}); + + Button('bottom=0') + .id('UIComponentPositionOffset0040_001') + .onClick(()=>{ + this.bottomOffset = 0; + }) + Button('bottom=50px') + .id('UIComponentPositionOffset0040_002') + .onClick(()=>{ + this.bottomOffset = '50px'; + }) + Button('bottom=60vp') + .id('UIComponentPositionOffset0040_003') + .onClick(()=>{ + this.bottomOffset = '60vp'; + }) + Button('bottom=70fp') + .id('UIComponentPositionOffset0040_004') + .onClick(()=>{ + this.bottomOffset = '70fp'; + }) + Button('bottom=80lpx') + .id('UIComponentPositionOffset0040_005') + .onClick(()=>{ + this.bottomOffset = '80lpx'; + }) + Button('bottom=60%') + .id('UIComponentPositionOffset0040_006') + .onClick(()=>{ + this.bottomOffset = '60%'; + }) + Button('bottom=$r(app.string.string_value_100)') + .id('UIComponentPositionOffset0040_007') + .onClick(()=>{ + this.bottomOffset = $r("app.string.string_value_100"); + }) + Button('bottom=-50') + .id('UIComponentPositionOffset0040_008') + .onClick(()=>{ + this.bottomOffset = -50; + }) + + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050.ets new file mode 100644 index 000000000..2b0baf759 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050.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 UIComponentPositionOffset0050 { + @State leftOffset: Dimension = 0; + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({left: this.leftOffset}); + + Button('left=0') + .id('UIComponentPositionOffset0050_001') + .onClick(()=>{ + this.leftOffset = 0; + }) + Button('left=50px') + .id('UIComponentPositionOffset0050_002') + .onClick(()=>{ + this.leftOffset = '50px'; + }) + Button('left=60vp') + .id('UIComponentPositionOffset0050_003') + .onClick(()=>{ + this.leftOffset = '60vp'; + }) + Button('left=70fp') + .id('UIComponentPositionOffset0050_004') + .onClick(()=>{ + this.leftOffset = '70fp'; + }) + Button('left=80lpx') + .id('UIComponentPositionOffset0050_005') + .onClick(()=>{ + this.leftOffset = '80lpx'; + }) + Button('left=60%') + .id('UIComponentPositionOffset0050_006') + .onClick(()=>{ + this.leftOffset = '60%'; + }) + Button('left=$r(app.string.string_value_100)') + .id('UIComponentPositionOffset0050_007') + .onClick(()=>{ + this.leftOffset = $r("app.string.string_value_100"); + }) + Button('left=-50') + .id('UIComponentPositionOffset0050_008') + .onClick(()=>{ + this.leftOffset = -50; + }) + + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060.ets new file mode 100644 index 000000000..ddb087b33 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060.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 UIComponentPositionOffset0060 { + @State topOffset: Dimension = 0; + @State bottomOffset: Dimension = 0; + @State topNum: number = 0; + @State bottomNum: number = 0; + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top: this.topOffset, bottom: this.bottomOffset}); + + Button('top change') + .id('UIComponentPositionOffset0060_001') + .onClick(()=>{ + this.topNum++; + if(this.topNum >= 8) + { + this.topNum = 0; + } + + if(this.topNum == 0) + { + this.topOffset = 0; + } + if(this.topNum == 1) + { + this.topOffset = '50px'; + } + if(this.topNum == 2) + { + this.topOffset = '60vp'; + } + if(this.topNum == 3) + { + this.topOffset = '70fp'; + } + if(this.topNum == 4) + { + this.topOffset = '80lpx'; + } + if(this.topNum == 5) + { + this.topOffset = '60%'; + } + if(this.topNum == 6) + { + this.topOffset = $r("app.string.string_value_100"); + } + if(this.topNum == 7) + { + this.topOffset = -50; + } + }) + + + Button('bottom change') + .id('UIComponentPositionOffset0060_002') + .onClick(()=>{ + this.bottomNum++; + if(this.bottomNum >= 8) + { + this.bottomNum = 0; + } + + if(this.bottomNum == 0) + { + this.bottomOffset = 0; + } + if(this.bottomNum == 1) + { + this.bottomOffset = '50px'; + } + if(this.bottomNum == 2) + { + this.bottomOffset = '60vp'; + } + if(this.bottomNum == 3) + { + this.bottomOffset = '70fp'; + } + if(this.bottomNum == 4) + { + this.bottomOffset = '80lpx'; + } + if(this.bottomNum == 5) + { + this.bottomOffset = '60%'; + } + if(this.bottomNum == 6) + { + this.bottomOffset = $r("app.string.string_value_100"); + } + if(this.bottomNum == 7) + { + this.bottomOffset = -50; + } + + }) + Text(this.topOffset.toString()).id('UIComponentPositionOffset0060_003'); + Text(this.bottomOffset.toString()).id('UIComponentPositionOffset0060_004'); + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070.ets new file mode 100644 index 000000000..8197c1d47 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070.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 UIComponentPositionOffset0070 { + @State leftOffset: Dimension = 0; + @State rightOffset: Dimension = 0; + @State leftNum: number = 0; + @State rightNum: number = 0; + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({left: this.leftOffset, right: this.rightOffset}); + + Button('left change') + .id('UIComponentPositionOffset0070_001') + .onClick(()=>{ + this.leftNum++; + if(this.leftNum >= 8) + { + this.leftNum = 0; + } + + if(this.leftNum == 0) + { + this.leftOffset = 0; + } + if(this.leftNum == 1) + { + this.leftOffset = '50px'; + } + if(this.leftNum == 2) + { + this.leftOffset = '60vp'; + } + if(this.leftNum == 3) + { + this.leftOffset = '70fp'; + } + if(this.leftNum == 4) + { + this.leftOffset = '80lpx'; + } + if(this.leftNum == 5) + { + this.leftOffset = '60%'; + } + if(this.leftNum == 6) + { + this.leftOffset = $r("app.string.string_value_100"); + } + if(this.leftNum == 7) + { + this.leftOffset = -50; + } + }) + + + Button('right change') + .id('UIComponentPositionOffset0070_002') + .onClick(()=>{ + this.rightNum++; + if(this.rightNum >= 8) + { + this.rightNum = 0; + } + + if(this.rightNum == 0) + { + this.rightOffset = 0; + } + if(this.rightNum == 1) + { + this.rightOffset = '50px'; + } + if(this.rightNum == 2) + { + this.rightOffset = '60vp'; + } + if(this.rightNum == 3) + { + this.rightOffset = '70fp'; + } + if(this.rightNum == 4) + { + this.rightOffset = '80lpx'; + } + if(this.rightNum == 5) + { + this.rightOffset = '60%'; + } + if(this.rightNum == 6) + { + this.rightOffset = $r("app.string.string_value_100"); + } + if(this.rightNum == 7) + { + this.rightOffset = -50; + } + + }) + Text(this.leftOffset.toString()).id('UIComponentPositionOffset0070_003'); + Text(this.rightOffset.toString()).id('UIComponentPositionOffset0070_004'); + }.width(300).height(300) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090.ets new file mode 100644 index 000000000..a715118ba --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0090 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:vp2px(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100.ets new file mode 100644 index 000000000..c1312ec0c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0100 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:px2vp(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110.ets new file mode 100644 index 000000000..9b31665b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0110 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:fp2px(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120.ets new file mode 100644 index 000000000..63deb28dd --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0120 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:px2fp(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130.ets new file mode 100644 index 000000000..68a7bcdd4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0130 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:lpx2px(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140.ets new file mode 100644 index 000000000..285aa005a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140.ets @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0140 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({top:px2lpx(100)}) + }.width(300).height(300) +} +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150.ets new file mode 100644 index 000000000..7be2d715a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150.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 UIComponentPositionOffset0150 { + @State textMarging: number = 20; + @State columnPadding: number =20; + + build() { + Column({ space: 10 }) { + Text('HUAWEI').width(100).height(100).fontSize(50).fontColor(0xFF0000).width('90%').margin(this.textMarging) + .position({right: 100, bottom: 100}); + + Button('padding +10/-10') + .onClick(()=>{ + if(this.columnPadding == 20) + { + this.columnPadding = this.columnPadding + 10; + } + else + { + this.columnPadding = this.columnPadding - 10; + } + }).id('UIComponentPositionOffset0150_001'); + + Button('margin +10/-10') + .onClick(()=>{ + if(this.textMarging == 20) + { + this.textMarging = this.textMarging + 10; + } + else + { + this.textMarging = this.textMarging - 10; + } + }).id('UIComponentPositionOffset0150_002'); + }.width(300).height(400).padding(this.columnPadding) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160.ets new file mode 100644 index 000000000..20a7c3da0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160.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 UIComponentPositionOffset0160 { + @State textWidth: number = 100; + @State textHeight: number = 100; + @State columnWidth: number = 300; + @State columnHeight: number = 400; + @State leftNum: number = 0; + @State rightNum: number = 0; + build() { + Column({ space: 10 }) { + Text('align').width(this.textWidth).height(this.textHeight).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({right: 100, bottom: 100}); + + Button('width +10/-10') + .onClick(()=>{ + if(this.columnWidth == 300) + { + this.columnWidth = this.columnWidth + 10; + } + else + { + this.columnWidth = this.columnWidth - 10; + } + }).id('UIComponentPositionOffset0160_001'); + + Button('height +10/-10') + .onClick(()=>{ + if(this.columnHeight == 400) + { + this.columnHeight = this.columnHeight + 10; + } + else + { + this.columnHeight = this.columnHeight - 10; + } + }).id('UIComponentPositionOffset0160_002'); + + Button('textWidth +10/-10') + .onClick(()=>{ + if(this.textWidth == 100) + { + this.textWidth = this.textWidth + 10; + } + else + { + this.textWidth = this.textWidth - 10; + } + }).id('UIComponentPositionOffset0160_003'); + + Button('textHeight +10/-10') + .onClick(()=>{ + if(this.textHeight == 100) + { + this.textHeight = this.textHeight + 10; + } + else + { + this.textHeight = this.textHeight - 10; + } + }).id('UIComponentPositionOffset0160_004'); + + }.width(this.columnWidth).height(this.columnHeight) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170.ets new file mode 100644 index 000000000..2dc518b08 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0170 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .position({ top: 100, left: 100 }) + } + .width('auto') + .height('auto') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180.ets new file mode 100644 index 000000000..43522fb38 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0180 { + + build() { + Column({ space: 10 }) { + Button(){ + Text('UIComponent') + .width(100) + .height(100) + } + .width('auto') + .height('auto') + .position({top: 100, left: 100}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190.ets new file mode 100644 index 000000000..940c04f74 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0190 { + + build() { + Column({ space: 10 }) { + Button(){ + Text('UIComponent') + .width(100) + .height(100) + } + .width('auto') + .height('auto') + .position({top: '30%', left: '30%'}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200.ets new file mode 100644 index 000000000..a02290b35 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0200 { + build() { + Column({ space: 10 }) { + TextArea() + .width('auto') + .height('auto') + .position({ top: 100, left: 100 }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210.ets new file mode 100644 index 000000000..d15df37c2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0210 { + build() { + Column({ space: 10 }) { + TextArea() + .width('auto') + .height('auto') + .position({ top: '30%', left: '30%' }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220.ets new file mode 100644 index 000000000..3ee485225 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0220 { + build() { + Column({ space: 10 }) { + TextArea() + .width('auto') + .height('auto') + .position({ top: 100, left: 100 }) + } + .width('auto') + .height('auto') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230.ets new file mode 100644 index 000000000..9161d3540 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0230 { + + build() { + Column({ space: 10 }) { + Button(){ + TextArea() + .width('auto') + .height('auto') + } + .width('auto') + .height('auto') + .position({top: 100, left: 100}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240.ets new file mode 100644 index 000000000..e6e395287 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240.ets @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0240 { + + build() { + Column({ space: 10 }) { + Button(){ + TextArea() + .width('auto') + .height('auto') + } + .width('auto') + .height('auto') + .position({top: '30%', left: '30%'}) + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250.ets new file mode 100644 index 000000000..c5c7aef40 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0250 { + build() { + Row() { + Text('text1') + .width(100) + .height(100) + .position({left:100, top:100}) + Text('text2') + .width(100) + .height(100) + .position({left:150, top:150}) + Text('text3') + .width(100) + .height(100) + .position({left:150, top:150}) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260.ets new file mode 100644 index 000000000..cd3165363 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260.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 UIComponentPositionOffset0260 { + @State top1: number = 20; + @State left1: number =20; + build() { + Flex() { + Button('Button1') + .onClick(() => { + }) + .width(100) + .height(100) + .backgroundColor(Color.Red) + .position({left: 100,top:100}) + .id('UIComponentPositionOffset0260_001'); + + Button('Button2') + .onClick(() => { + }) + .width(100) + .height(100) + .backgroundColor(Color.Green) + .position({left:150,top:150}) + .id('UIComponentPositionOffset0260_002'); + + Button('Button3') + .onClick(() => { + }) + .width(100) + .height(100) + .backgroundColor(Color.Blue) + .position({left:150,top:150}) + .id('UIComponentPositionOffset0260_003'); + + }.width(300).height(400); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270.ets new file mode 100644 index 000000000..bd7611861 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270.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 UIComponentPositionOffset0270 { + controller: TextInputController = new TextInputController(); + @State inputValue: string = ""; + @State height1: string | number = '80%'; + @State supportAvoidance: boolean = true; + + // 自定义键盘组件 + @Builder + CustomKeyboardBuilder() { + Column() { + Row() { + Button('x').onClick(() => { + // 关闭自定义键盘 + this.controller.stopEditing() + }).margin(10).id('UIComponentPositionOffset0270_003'); + } + + Grid() { + ForEach([1, 2, 3, 4, 5, 6, 7, 8, 9, '*', 0, '#'], (item: number | string) => { + GridItem() { + Button(item + "") + .width(110).onClick(() => { + this.inputValue += item + }) + } + }) + }.maxCount(3).columnsGap(10).rowsGap(10).padding(5) + }.backgroundColor(Color.Gray) + } + + build() { + Column() { + Row() { + Button("20%") + .fontSize(24) + .onClick(() => { + this.height1 = "20%" + }) + Button("80%") + .fontSize(24) + .margin({ left: 20 }) + .onClick(() => { + this.height1 = "80%" + }) + .id('UIComponentPositionOffset0270_001'); + } + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Bottom) + .height(this.height1) + .width("100%") + .padding({ bottom: 50 }); + + TextInput({ controller: this.controller, text: this.inputValue })// 绑定自定义键盘 + .customKeyboard(this.CustomKeyboardBuilder(), { supportAvoidance: this.supportAvoidance }) + .margin(10) + .border({ width: 1 }) + .id('UIComponentPositionOffset0270_002'); + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280.ets new file mode 100644 index 000000000..312787be1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280.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 UIComponentPositionOffset0280 { + @State top1: number = 20; + @State left1: number =20; + build() { + Flex() { + Button('top +10/-10') + .onClick(() => { + if(this.top1 == 20) + { + this.top1 = this.top1 + 10; + } + else + { + this.top1 = this.top1 - 10; + } + }).id('UIComponentPositionOffset0280_001'); + + Button('left +10/-10') + .onClick(() => { + if(this.left1 == 20) + { + this.left1 = this.left1 + 10; + } + else + { + this.left1 = this.left1 - 10; + } + }).id('UIComponentPositionOffset0280_002'); + + Row() { + Text('HUAWEI') + .width(100) + .height(100) + .fontSize(50) + .fontColor(0xFF0000) + .width('90%') + .position({ right: 100, bottom: 100 }); + }.width(0).height(0).position({ top:this.top1,left:this.left1 }) + }.width(300).height(400); + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290.ets new file mode 100644 index 000000000..480159d11 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES 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 UIComponentPositionOffset0290 { + build() { + RelativeContainer() { + Flex() { + Text('HUAWEI').width(100).height(100).fontColor(0xFF0000) + .position({ top: 100, left: 100 }); + }.width(300).height(400); + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300.ets new file mode 100644 index 000000000..b0d64977d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0300 { + build() { + RelativeContainer() { + Row() { + Text('Row') + } + .width(100) + .height(100) + } + .width(300) + .height(400) + .position({ left: 100, top: 100 }) + .alignRules({ + top: {anchor: "__container__", align: VerticalAlign.Top}, + left: {anchor: "__container__", align: HorizontalAlign.Start} + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310.ets new file mode 100644 index 000000000..8d1a394b9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310.ets @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0310 { + build() { + Row() { + Text('文本') + .backgroundColor(Color.Black) + .fontColor(Color.White) + .offset({ + top: '100abc' as Dimension + }) + .width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320.ets new file mode 100644 index 000000000..a990921b3 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0320 { + build() { + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + right: '100abc' as Dimension + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330.ets new file mode 100644 index 000000000..1d50a3371 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0330 { + build() { + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + bottom: '100abc' as Dimension + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340.ets new file mode 100644 index 000000000..2f0c307d2 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0340 { + build() { + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + left: '100abc' as Dimension + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350.ets new file mode 100644 index 000000000..fad44ab46 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350.ets @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0350 { + offsetList: (ResourceStr | number) [] = ['50px', '60vp', '70fp', '801px', '60%', $r('app.string.string_value_100'), '100abc', -50 ]; + @State index: number = 0; + build() { + Column({ space: 10 }) { + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + top: this.offsetList[this.index] as Dimension, + bottom: this.offsetList[this.index] as Dimension + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + top: '100abc' as Dimension, + bottom: -50 + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + + Button('切换').onClick((event: ClickEvent) => { + this.index++ + }).id('PositionOffset0350_001') + } + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360.ets new file mode 100644 index 000000000..77a1d27ed --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360.ets @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0360 { + offsetList: (ResourceStr | number) [] = ['50px', '60vp', '70fp', '801px', '60%', $r('app.string.string_value_100'), '100abc', -50 ]; + @State index: number = 0; + build() { + Column({ space: 10 }) { + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + left: this.offsetList[this.index] as Dimension, + right: this.offsetList[this.index] as Dimension + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + + Row() { + Text('文本').backgroundColor(Color.Black).fontColor(Color.White).offset({ + left: '100abc' as Dimension, + right: -100 + }).width(100) + .height(100) + } + .width('100%') + .height(200) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + + Button('切换').onClick((event: ClickEvent) => { + this.index++ + }).id('PositionOffset0350_001') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380.ets new file mode 100644 index 000000000..1f43e5397 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0380 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: vp2px(100)}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390.ets new file mode 100644 index 000000000..bf9ac7adf --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0390 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: px2vp(100)}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400.ets new file mode 100644 index 000000000..b2d8e2776 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0400 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: fp2px(100)}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410.ets new file mode 100644 index 000000000..f0eee09d1 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0410 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: px2fp(100)}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420.ets new file mode 100644 index 000000000..e6bab7fd7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420.ets @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0420 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: lpx2px(100)}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430.ets new file mode 100644 index 000000000..8ed9b694b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0430 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: px2lpx(100)}) + .backgroundColor(Color.Black) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440.ets new file mode 100644 index 000000000..668ccb868 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440.ets @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentPositionOffset0440 { + + build() { + Column({ space: 10 }) { + Text('align').width(100).height(100).fontSize(50).fontColor(0xCCCCCC).width('90%') + .position({left:100,top:100}) + .offset({right:100,bottom:100}); + }.width(300).height(400) + } + } diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450.ets new file mode 100644 index 000000000..8f16e85b5 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450.ets @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0450 { + + build() { + Column({ space: 10 }) { + Column() { + Text('文本') + .backgroundColor(Color.Black) + .fontColor(Color.White) + .position({ + left: '100abc' as Dimension, + top: '100abc' as Dimension + }) + .offset({ + right: 100, + bottom: 100 + }) + .width(100) + .height(100) + } + .width(300) + .height(400) + .margin({ + top: 150 + }) + .border({ + width: 2, + color: Color.Black + }) + .backgroundColor('#F1F3F5') + } + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460.ets new file mode 100644 index 000000000..25f92592a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0460 { + build() { + RelativeContainer() { + Text('Text') + .width(100) + .height(100) + .position({ left: 100, top: 100 }) + .offset({right: 100, bottom: 100}) + } + .width(300) + .height(400) + .position({ left: 100, top: 100 }) + .alignRules({ + top: { anchor: "__container__", align: VerticalAlign.Top }, + left: { anchor: "__container__", align: HorizontalAlign.Start } + }) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470.ets new file mode 100644 index 000000000..dbd22d2b4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0470 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .position({ top:100,left:100 }) + .position({ x:10,y:10 }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480.ets new file mode 100644 index 000000000..91f9ddd7b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0480 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .position({ x:10,y:10 }) + .position({ bottom:100,right:100 }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490.ets new file mode 100644 index 000000000..c87e240e7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0490 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .position({ top:50,left:100 }) + .position({ bottom:100, right:30 }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500.ets new file mode 100644 index 000000000..292002999 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0500 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .position({ top:50,right:80 }) + .position({ bottom:100,left:100 }) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510.ets new file mode 100644 index 000000000..9d3c57a51 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0510 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: 100, left: 100}) + .offset({x: 10, y: 10}) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520.ets new file mode 100644 index 000000000..02323d134 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520.ets @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0520 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({x: 10, y: 10}) + .offset({top: 100, left: 100}) + + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530.ets new file mode 100644 index 000000000..149ec2c02 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0530 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: 50, left: 100}) + .offset({top: 100, left: 30}) + } + .width(300) + .height(400) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540.ets new file mode 100644 index 000000000..16a80110a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0540 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({bottom: 50, right: 80}) + .offset({top: 100, left: 100}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550.ets new file mode 100644 index 000000000..702cc6164 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0550 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: 100, left: 100}) + .markAnchor({x: 30, y: 30}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560.ets new file mode 100644 index 000000000..475df5fee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560.ets @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct UIComponentPositionOffset0560 { + build() { + Column({ space: 10 }) { + Text('123') + .width(100) + .height(100) + .offset({top: 100, left: 100}) + .markAnchor({x: 200, y: 100}) + } + .width(300) + .height(300) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010.ets new file mode 100644 index 000000000..42329a52f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010.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 UIComponentRowColumnColumnSplitInteraction0010 { + @State resizeable: boolean = true; + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowColumnColumnSplitInteraction0010_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(this.resizeable) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010.ets new file mode 100644 index 000000000..5f95fa7d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010.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 UIComponentRowcolumnColumnsplitInterface0010 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitInterface0010_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(false) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + .border({ width: 1, color: '#00ff00' }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020.ets new file mode 100644 index 000000000..2a89c415a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020.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 UIComponentRowcolumnColumnsplitInterface0020 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitInterface0020_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + .border({ width: 1, color: '#00ff00' }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030.ets new file mode 100644 index 000000000..3476b25e4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentRowcolumnColumnsplitInterface0030 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitInterface0030_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(false) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030.ets new file mode 100644 index 000000000..a67b707fe --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentRowcolumnColumnsplitLayout0030 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0030_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width(200).height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050.ets new file mode 100644 index 000000000..c3e20ad1c --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentRowcolumnColumnsplitLayout0050 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + ColumnSplit() { + Text('1').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2').width(100).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0050_001') + Text('3').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(100).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width(200).height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070.ets new file mode 100644 index 000000000..cd939ff1e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070.ets @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentRowcolumnColumnsplitLayout0070 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + ColumnSplit() { + Text('1').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2').width(100).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0070_001') + Text('3').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(100).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(100).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width(100).height('60%') + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090.ets new file mode 100644 index 000000000..7faeaa574 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090.ets @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentRowcolumnColumnsplitLayout0090 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + ColumnSplit() { + Text('1') + .width(100) + .height(200) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0090_001') + } + .borderWidth(1) + .resizeable(true) + .width(100) + .height(100) + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110.ets new file mode 100644 index 000000000..e1f60ba9b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110.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 UIComponentRowcolumnColumnsplitLayout0110 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + ColumnSplit() { + Text('1') + .width(100) + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + Text('2') + .width(100) + .height(100) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0110_001') + } + .borderWidth(1) + .resizeable(true) + .width(100) + .height(200) + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130.ets new file mode 100644 index 000000000..6627a731d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130.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 UIComponentRowcolumnColumnsplitLayout0130 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + ColumnSplit() { + Text('1') + .width(100) + .height(200) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + Text('2') + .width(100) + .height(200) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0130_001') + } + .borderWidth(1) + .resizeable(true) + .width(100) + .height(200) + .backgroundColor($r('sys.color.background_primary')) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140.ets new file mode 100644 index 000000000..0563973a8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140.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 UIComponentRowcolumnColumnsplitLayout0140 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0140_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(false) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + .border({ width: 1, color: '#00ff00' }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150.ets new file mode 100644 index 000000000..bd7fa6e82 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150.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 UIComponentRowcolumnColumnsplitLayout0150 { + + build() { + Column() { + ColumnSplit() { + Text('1').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2') + .width(300) + .height(50) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) + .id('UIComponentRowcolumnColumnsplitLayout0150_001') + Text('3').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width(300).height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width(300).height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width(200) + .height('60%') + .backgroundColor($r('sys.color.background_primary')) + .border({ width: 1, color: '#00ff00' }) + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010.ets new file mode 100644 index 000000000..92336e58e --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010.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 plugin from "./plugin_component" +interface Info{ + errcode:number, + msg:string +} +@Entry +@Component +struct UIComponentSpecialComponentsPluginComponentInterface0010 { + @State message: string = 'not callback().' + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.message); + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold); + Button('Register Request Listener') + .fontSize(30) + .width(400) + .height(100) + .margin({top:20}) + .onClick(()=>{ + plugin.onListener() + console.log("Button('Register Request Listener')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0010_001'); + Button('Request') + .fontSize(50) + .width(400) + .height(100) + .margin({ top: 20 }) + .onClick(() => { + plugin.Request() + console.log("Button('Request')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0010_002'); + PluginComponent({ + template: { source: 'pages/PluginProviderExample.ets&entry', bundleName: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } + }).size({ width: 500, height: 350 }) + .onComplete(() => { + console.log("onComplete"); + this.message='callback onComplete() '; + }) + .onError((info:Info) => { + console.log("onError" + info.errcode + ":" + info.msg) + }) + .id('UIComponentSpecialComponentsPluginComponentInterface0010'); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040.ets new file mode 100644 index 000000000..6d29d1bd9 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040.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. + */ + +import plugin from "./plugin_component" +interface Info{ + errcode:number, + msg:string +} +@Entry +@Component +struct UIComponentSpecialComponentsPluginComponentInterface0040 { + @State message: string = 'not value.' + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.message); + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold); + Button('Register Request Listener') + .fontSize(30) + .width(400) + .height(100) + .margin({top:20}) + .onClick(()=>{ + plugin.onListener() + console.log("Button('Register Request Listener')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0040_001'); + Button('Request') + .fontSize(50) + .width(400) + .height(100) + .margin({ top: 20 }) + .onClick(() => { + plugin.Request() + console.log("Button('Request')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0040_002'); + PluginComponent({ + template: { source: 'pages/PluginProviderExample.ets&entry', bundleName: '' }, + data: { 'countDownStartValue': 'new countDownStartValue' } + }).size({ width: 500, height: 350 }) + .onComplete(() => { + console.log("onComplete"); + + }) + .onError((info:Info) => { + console.log("onError" + info.errcode + ":" + info.msg); + if(info.msg.includes( 'App bundleName is empty')) { + this.message = "onError" + info.errcode + ":" + info.msg; + } + }) + .id('UIComponentSpecialComponentsPluginComponentInterface0040'); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050.ets new file mode 100644 index 000000000..f06502aac --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050.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. + */ + +import plugin from "./plugin_component" +interface Info{ + errcode:number, + msg:string +} +@Entry +@Component +struct UIComponentSpecialComponentsPluginComponentInterface0050 { + @State message: string = 'not value.' + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.message); + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold); + Button('Register Request Listener') + .fontSize(30) + .width(400) + .height(100) + .margin({top:20}) + .onClick(()=>{ + plugin.onListener() + console.log("Button('Register Request Listener')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0050_001'); + Button('Request') + .fontSize(50) + .width(400) + .height(100) + .margin({ top: 20 }) + .onClick(() => { + plugin.Request() + console.log("Button('Request')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0050_002'); + PluginComponent({ + template: { source: '', bundleName: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } + }).size({ width: 500, height: 350 }) + .onComplete(() => { + console.log("onComplete"); + + }) + .onError((info:Info) => { + console.log("onError" + info.errcode + ":" + info.msg); + if(info.msg.includes( 'Template source is empty')) { + this.message = "onError" + info.errcode + ":" + info.msg; + } + }) + .id('UIComponentSpecialComponentsPluginComponentInterface0050'); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060.ets new file mode 100644 index 000000000..002c46543 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060.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. + */ + +import plugin from "./plugin_component" +interface Info{ + errcode:number, + msg:string +} +@Entry +@Component +struct UIComponentSpecialComponentsPluginComponentInterface0060 { + @State message: string = 'not value.' + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(this.message); + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold); + Button('Register Request Listener') + .fontSize(30) + .width(400) + .height(100) + .margin({top:20}) + .onClick(()=>{ + plugin.onListener() + console.log("Button('Register Request Listener')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0060_001'); + Button('Request') + .fontSize(50) + .width(400) + .height(100) + .margin({ top: 20 }) + .onClick(() => { + plugin.Request() + console.log("Button('Request')") + }).id('UIComponentSpecialComponentsPluginComponentInterface0060_002'); + PluginComponent({ + template: { source: 'pages/PluginProviderExample.ets&entry', bundleName: 'com.example.plugin' }, + data: { 'countDownStartValue': 'new countDownStartValue' } + }).size({ width: 500, height: 350 }) + .onComplete(() => { + console.log("onComplete"); + + }) + .onError((info:Info) => { + console.log("onError" + info.errcode + ":" + info.msg); + if(info.msg.includes( 'get bundleName failed')) { + this.message = "onError" + info.errcode + ":" + info.msg; + } + }) + .id('UIComponentSpecialComponentsPluginComponentInterface0060'); + } + .width('100%') + .height('100%'); + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js new file mode 100644 index 000000000..2e34709af --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js @@ -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. + */ +//plugin_component.js +import pluginComponentManager from '@ohos.pluginComponent' + +function onPushListener(source, template, data, extraData) { + console.log("onPushListener template.source=" + template.source) + console.log("onPushListener template.ability=" + template.ability) + console.log("onPushListener data=" + JSON.stringify(data)) + console.log("onPushListener extraData=" + JSON.stringify(extraData)) +} + +function onRequestListener(source, name, data) +{ + console.log("onRequestListener name=" + name); + console.log("onRequestListener data=" + JSON.stringify(data)); + return {template:"plugintemplate", data:data}; +} + +export default { + //register listener + onListener() { + pluginComponentManager.on("push", onPushListener) + pluginComponentManager.on("request", onRequestListener) + }, + Push() { + // ṩ¼ + pluginComponentManager.push( + { + owner: { + bundleName: "com.example.myapplication", + abilityName: "com.example.myapplication.MainAbility", + }, + target: { + bundleName: "com.example.plugin", + abilityName: "com.example.myapplication.PluginProviderExample", + }, + name: "PluginProviderExample", + data: { + "key_1": "plugin component test", + "key_2": 34234 + }, + extraData: { + "extra_str": "this is push event" + }, + jsonPath: "", + }, + (err, data) => { + console.log("push_callback: push ok!"); + } + ) + }, + Request() { + // ʹ÷¼ + pluginComponentManager.request({ + owner: { + bundleName: "com.example.myapplication", + abilityName: "com.example.myapplication.MainAbility", + }, + target: { + bundleName: "com.example.plugin", + abilityName: "com.example.myapplication.PluginProviderExample", + }, + name: "PluginProviderExample", + data: { + "key_1": "plugin component test", + "key_2": 34234 + }, + jsonPath: "", + }, + (err, data) => { + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) + console.log("request_callback: data=" + JSON.stringify(data.data)) + console.log("request_callback: extraData=" + JSON.stringify(data.extraData)) + } + ) + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010.ets new file mode 100644 index 000000000..83fe4e13d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010.ets @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020.ets new file mode 100644 index 000000000..922fdceae --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor('#33ff0000') + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030.ets new file mode 100644 index 000000000..189a55429 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(Color.Red) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040.ets new file mode 100644 index 000000000..df2198c5b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(Color.Yellow) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050.ets new file mode 100644 index 000000000..44981fcd6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor('#DDff0000') + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060.ets new file mode 100644 index 000000000..4fcd6d251 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(Color.Transparent) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070.ets new file mode 100644 index 000000000..764823581 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor('xyz') + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080.ets new file mode 100644 index 000000000..5048ab7d4 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(null) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090.ets new file mode 100644 index 000000000..5fa899d13 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090.ets @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090{ + @State isLock: boolean = true; + @State xc_width: number = 500; + @State xc_height: number = 700; + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(undefined) + .onLoad(() => { + let surfaceRotation: SurfaceRotationOptions = { lock: this.isLock }; + this.myXComponentController.setXComponentSurfaceRotation(surfaceRotation); + console.log("Surface getXComponentSurfaceRotation lock = " + + this.myXComponentController.getXComponentSurfaceRotation().lock); + }); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010.ets new file mode 100644 index 000000000..1b2af3c79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0010 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 300; + @State xc_height: number = 400; + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0010_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0010_003'); + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0010_001') + .onLoad(() => { + }); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020.ets new file mode 100644 index 000000000..397b88cea --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0020 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 300; + @State xc_height: number = 400; + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0020_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0020_003'); + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0020_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = {offsetX:0, offsetY:0,surfaceWidth: 500, surfaceHeight: 500 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + }); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040.ets new file mode 100644 index 000000000..00551b5de --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0040 { + myXComponentController: XComponentController = new XComponentController(); + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0040_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0040_003'); + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(300) + .height(300) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0040_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { offsetX:0, offsetY:30, surfaceWidth: 200, surfaceHeight: 200 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050.ets new file mode 100644 index 000000000..84708044d --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0050 { + myXComponentController: XComponentController = new XComponentController(); + @State rectInfo: string = 'no_value'; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Row(){ + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += ',offsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += ',surfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += ',surfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0050_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = 'no_value'; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0050_003'); + } + + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(200) + .height(200) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0050_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { offsetX:800, offsetY:100, surfaceWidth: 200, surfaceHeight: 200 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060.ets new file mode 100644 index 000000000..dbbea2b77 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceInterface0060 { + myXComponentController: XComponentController = new XComponentController(); + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0060_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0060_003'); + + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0060_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { offsetX:600, offsetY:100, surfaceWidth: 200, surfaceHeight: 300 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + Text(this.rectInfo); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070.ets new file mode 100644 index 000000000..81d1620a0 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0070 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 200; + @State xc_height: number = 300; + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0070_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0070_003'); + + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0070_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { surfaceWidth: -10, surfaceHeight: -20 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + Text(this.rectInfo); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080.ets new file mode 100644 index 000000000..413eb485a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceInterface0080 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 200; + @State xc_height: number = 300; + @State rectInfo: string = ''; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0080_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0080_003'); + + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0080_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = {offsetX:0, offsetY:0, surfaceWidth: 500, surfaceHeight: 500 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + Text(this.rectInfo); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090.ets new file mode 100644 index 000000000..338ad5246 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0090 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 200; + @State xc_height: number = 300; + @State rectInfo: string = ''; + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0090_002'); + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0090_003'); + + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0090_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { surfaceWidth: 0, surfaceHeight: 0 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + Text(this.rectInfo); + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100.ets new file mode 100644 index 000000000..939fdbbb8 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100.ets @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceInterface0100 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 300; + @State xc_height: number = 400; + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0100_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0100_003'); + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.TEXTURE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(Color.Red) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0100_001') + .onLoad(() => { + }); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110.ets new file mode 100644 index 000000000..5299f5924 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0110 { + myXComponentController: XComponentController = new XComponentController(); + @State xc_width: number = 300; + @State xc_height: number = 300; + @State rectInfo: string = ''; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += '\noffsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += '\nsurfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += '\nsurfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0110_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = ''; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0110_003'); + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.TEXTURE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(this.xc_width) + .height(this.xc_height) + .backgroundColor(Color.Red) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0110_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = {offsetX:0, offsetY:0,surfaceWidth: 300, surfaceHeight: 300 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + }); + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140.ets new file mode 100644 index 000000000..16a4ce2e6 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140.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 UIComponentSpecialComponentsXcomponentSurfaceInterface0140 { + myXComponentController: XComponentController = new XComponentController(); + @State rectInfo: string = 'no_value'; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Row(){ + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += ',offsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += ',surfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += ',surfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0140_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = 'no_value'; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0140_003'); + } + + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.TEXTURE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(200) + .height(200) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0140_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { offsetX:800, offsetY:100, surfaceWidth: 200, surfaceHeight: 200 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180.ets new file mode 100644 index 000000000..9f75d5506 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180.ets @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceInterface0180 { + myXComponentController: XComponentController = new XComponentController(); + @State rectInfo: string = 'no_value'; + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + Row(){ + Button('GetRect') + .onClick(() => { + this.rectInfo = 'offsetX = ' + this.myXComponentController.getXComponentSurfaceRect().offsetX; + this.rectInfo += ',offsetY = ' + this.myXComponentController.getXComponentSurfaceRect().offsetY; + this.rectInfo += ',surfaceWidth = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceWidth; + this.rectInfo += ',surfaceHeight = ' + this.myXComponentController.getXComponentSurfaceRect().surfaceHeight; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0180_002'); + + Button('ClearRect') + .onClick(() => { + this.rectInfo = 'no_value'; + }).id('UIComponentSpecialComponentsXcomponentSurfaceInterface0180_003'); + } + + Text(this.rectInfo); + XComponent({ + id: 'xComponentId', + type: XComponentType.TEXTURE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width(200) + .height(200) + .backgroundColor(Color.Red) + .id('UIComponentSpecialComponentsXcomponentSurfaceInterface0180_001') + .onLoad(() => { + let surfaceRect1: SurfaceRect = { surfaceWidth: 0, surfaceHeight: 300 }; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + + }); + + + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190.ets new file mode 100644 index 000000000..bde0ca176 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190.ets @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentSpecialComponentsXcomponentSurfaceInterface0190{ + myXComponentController: XComponentController = new XComponentController(); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { + XComponent({ + id: 'xComponentId', + type: XComponentType.SURFACE, + libraryname: 'nativerender', + controller: this.myXComponentController + }) + .width('auto') + .height('auto') + .onLoad(() => { + let surfaceRect1: SurfaceRect = {surfaceWidth:300,surfaceHeight:300}; + this.myXComponentController.setXComponentSurfaceRect(surfaceRect1); + console.log("zhengjinhua= " +this.myXComponentController.getXComponentSurfaceRect().surfaceWidth); + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290.ets new file mode 100644 index 000000000..2a9ac7a0a --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0290 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + Button('ThemeColorMode') + .id('UIComponentUISupportColor0290_001') + .onClick(() => { + this.colorMode = ThemeColorMode.LIGHT; + }) + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300.ets new file mode 100644 index 000000000..3ffb6edc7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0300 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + Button('ThemeColorMode') + .id('UIComponentUISupportColor0300_001') + .onClick(() => { + this.colorMode = ThemeColorMode.DARK; + }) + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310.ets new file mode 100644 index 000000000..52fd5277f --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0310 { + @State colorMode: ThemeColorMode = ThemeColorMode.DARK; + + build() { + Column() { + Button('ThemeColorMode') + .id('UIComponentUISupportColor0310_001') + .onClick(() => { + this.colorMode = ThemeColorMode.LIGHT; + }) + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320.ets new file mode 100644 index 000000000..549fde590 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320.ets @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0320 { + @State colorMode: ThemeColorMode = ThemeColorMode.DARK; + + build() { + Column() { + Button('ThemeColorMode') + .id('UIComponentUISupportColor0320_001') + .onClick(() => { + this.colorMode = ThemeColorMode.DARK; + }) + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330.ets new file mode 100644 index 000000000..fac33d36b --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0330 { + @State colorMode: ThemeColorMode = ThemeColorMode.LIGHT; + + build() { + Column() { + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340.ets new file mode 100644 index 000000000..61410da87 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0340 { + @State colorMode: ThemeColorMode = ThemeColorMode.DARK; + + build() { + Column() { + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350.ets new file mode 100644 index 000000000..724e65cf7 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350.ets @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License') + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Entry +@Component +struct UIComponentUIsupportColor0350 { + @State colorMode: ThemeColorMode = ThemeColorMode.SYSTEM; + + build() { + Column() { + WithTheme({ colorMode: this.colorMode }) { + Column() { + ColumnSplit() { + Text('11111').width('100%').height(50).textAlign(TextAlign.Center) + } + .borderWidth(1) + .resizeable(true) + .width('90%').height('60%') + }.width('100%') + .backgroundColor($r('sys.color.background_primary')) + } + }.width('100%') + } +} \ No newline at end of file diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360.ets new file mode 100644 index 000000000..adbe63218 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360.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 UIComponentUIsupportColor0360 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.LIGHT; + @State colorValue: Color = Color.Black; + @State textValue: string = 'light mode'; + + build() { + Column() { + + Button('change mode') + .onClick(() => { + //this.rectInfo = ''; + if (this.colorModeValue == ThemeColorMode.DARK) { + this.colorModeValue = ThemeColorMode.LIGHT; + this.colorValue = Color.Black; + this.textValue = 'light mode'; + } + else { + this.colorModeValue = ThemeColorMode.LIGHT; + this.colorValue = Color.Black; + this.textValue = 'light mode'; + } + }).id('UIComponentUIsupportColor0360_001'); + + // 设置组件为深色模式 + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue) + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370.ets new file mode 100644 index 000000000..4ed918e04 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370.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 UIComponentUIsupportColor0370 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.LIGHT; + @State colorValue: Color = Color.Black; + @State textValue: string = 'light mode'; + + build() { + Column() { + + Button('change mode') + .onClick(() => { + //this.rectInfo = ''; + if (this.colorModeValue == ThemeColorMode.DARK) { + this.colorModeValue = ThemeColorMode.LIGHT; + this.colorValue = Color.Black; + this.textValue = 'light mode'; + } + else { + this.colorModeValue = ThemeColorMode.DARK; + this.colorValue = Color.White; + this.textValue = 'dark mode'; + } + }).id('UIComponentUIsupportColor0370_001'); + + // 设置组件为深色模式 + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue) + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380.ets new file mode 100644 index 000000000..ca1475807 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380.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 UIComponentUIsupportColor0380 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.DARK; + @State colorValue: Color = Color.White; + @State textValue: string = 'dark mode'; + + build() { + Column() { + + Button('change mode') + .onClick(() => { + //this.rectInfo = ''; + if (this.colorModeValue == ThemeColorMode.DARK) { + this.colorModeValue = ThemeColorMode.LIGHT; + this.colorValue = Color.Black; + this.textValue = 'light mode'; + } + else { + this.colorModeValue = ThemeColorMode.DARK; + this.colorValue = Color.White; + this.textValue = 'dark mode'; + } + }).id('UIComponentUIsupportColor0380_001'); + + // 设置组件为深色模式 + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue) + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390.ets new file mode 100644 index 000000000..ef284a994 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390.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 UIComponentUIsupportColor0390 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.DARK; + @State colorValue: Color = Color.White; + @State textValue: string = 'dark mode'; + + build() { + Column() { + + Button('change mode') + .onClick(() => { + //this.rectInfo = ''; + if (this.colorModeValue == ThemeColorMode.DARK) { + this.colorModeValue = ThemeColorMode.DARK; + this.colorValue = Color.White; + this.textValue = 'dark mode'; + } + else { + this.colorModeValue = ThemeColorMode.DARK; + this.colorValue = Color.White; + this.textValue = 'dark mode'; + } + }).id('UIComponentUIsupportColor0390_001'); + + // 设置组件为深色模式 + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue) + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400.ets new file mode 100644 index 000000000..a209a4d45 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400.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 UIComponentUIsupportColor0400 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.LIGHT; + @State colorValue: Color = Color.Black; + @State textValue: string = 'light mode'; + + build() { + Column() { + + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue); + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410.ets new file mode 100644 index 000000000..8446c46ee --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410.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 UIComponentUIsupportColor0410 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.DARK; + @State colorValue: Color = Color.White; + @State textValue: string = 'dark mode'; + + build() { + Column() { + + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue); + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420.ets new file mode 100644 index 000000000..073616a79 --- /dev/null +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420.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 UIComponentUIsupportColor0420 { + @State colorModeValue: ThemeColorMode = ThemeColorMode.SYSTEM; + @State colorValue: Color = Color.White; + @State textValue: string = 'dark mode'; + + aboutToAppear(): void { + if (this.colorModeValue == ThemeColorMode.DARK) { + this.colorValue = Color.White; + this.textValue = 'dark mode'; + } + else { + this.colorValue = Color.Black; + this.textValue = 'light mode'; + } + } + + build() { + Column() { + WithTheme({ colorMode: this.colorModeValue }) { + Column() { + Divider().strokeWidth(8).color(this.colorValue); + Text(this.textValue) + .fontSize(40) + .fontWeight(FontWeight.Bold); + } + .justifyContent(FlexAlign.Center) + .width('100%') + .height('33%') + .backgroundColor($r('sys.color.background_primary')); + }; + } + .height('100%') + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.END, SafeAreaEdge.BOTTOM, SafeAreaEdge.START]) + } +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json index ce65c09bf..307085eab 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/resources/base/element/string.json @@ -243,6 +243,10 @@ { "name": "20string", "value": "20" + }, + { + "name": "string_value_100", + "value": "100" } ] } \ No newline at end of file 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 5cc05ce92..e023e1a27 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 @@ -1801,6 +1801,716 @@ "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface007", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface008", "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface009", - "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010" + "testability/pages/UIComponentPopupBoxFullDialogInterface/UIComponentPopupBoxFullDialogInterface0010", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0570", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0390", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0460", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0490", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0510", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0580", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0440", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0500", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0450", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0410", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0400", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0420", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0520", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0530", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0540", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0550", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0430", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0470", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0480", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0590", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0740", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0620", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0630", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0640", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0650", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0730", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0750", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0680", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0670", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0690", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0700", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0710", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0660", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0720", + + "testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0010", + "testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0060", + "testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0040", + "testability/pages/UIComponentSpecialComponentsPluginComponentInterface/UIComponentSpecialComponentsPluginComponentInterface0050", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0010", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0080", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0090", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0020", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0050", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0030", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0040", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0060", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor0070", + + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0190", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0090", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0080", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0070", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0060", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0050", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0040", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0010", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0020", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0100", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0110", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0140", + "testability/pages/UIComponentSpecialComponentsXcomponentSurfaceInterface/UIComponentSpecialComponentsXcomponentSurfaceInterface0180", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0190", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0200", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0180", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0170", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0160", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0070", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0080", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0050", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0040", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0030", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0060", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0150", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0120", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0140", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0110", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0130", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0100", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0210", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0090", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0010", + "testability/pages/UIAttributesStatestylesInterfaceSupportstage/UIAttributesStatestylesInterfaceSupportstage0020", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0440", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0110", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0120", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0130", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0140", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0100", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0090", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0040", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0050", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0020", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0030", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0060", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0070", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0160", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0150", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0270", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0280", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0260", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0290", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0230", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0240", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0180", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0170", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0190", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0200", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0210", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0220", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0250", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0300", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0380", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0390", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0400", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0410", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0420", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0430", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0460", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0530", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0540", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0550", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0560", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0510", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0520", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0490", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0500", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0470", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0480", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0010", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0020", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0030", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0040", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0050", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0060", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0070", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0080", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0100", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0110", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0120", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0130", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0140", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0150", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0160", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0170", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0180", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0190", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0200", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0210", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0220", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0230", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0240", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0250", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0260", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0270", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0280", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0290", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0300", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0310", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0320", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0330", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0340", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0350", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0360", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0060", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0070", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0080", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0090", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0100", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0110", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0120", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0130", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0140", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0150", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0160", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0170", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0180", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0190", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0200", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0210", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0220", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0230", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0240", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0250", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0260", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0270", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0280", + + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0380", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0360", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0370", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0390", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0400", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0410", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0420", + + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0120", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0130", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0090", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0110", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0100", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0040", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0340", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0310", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0330", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0320", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0010", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0030", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0020", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0260", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0230", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0250", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0240", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0140", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0170", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0160", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0150", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0080", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0050", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0070", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0060", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0380", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0350", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0370", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0360", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0210", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0180", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0200", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0190", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0300", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0270", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0290", + "testability/pages/UIComponentColumnMirrorImage/UIComponentColumnMirrorImage0280", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0050", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0060", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0070", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0080", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0010", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0020", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0030", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0140", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0160", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0150", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0130", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0180", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0170", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0110", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0120", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0100", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0040", + "testability/pages/UIComponentFlexSpace/UIComponentFlexSpace0090", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0010", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0020", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0030", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0040", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0050", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0060", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0070", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0080", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0090", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0100", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0110", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0120", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0130", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0140", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0150", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0160", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0170", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0180", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0190", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0200", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0210", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0220", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0230", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0240", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0250", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0260", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0270", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0280", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0290", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0300", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0310", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0320", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0330", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0340", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0350", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0360", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0370", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0380", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0390", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0400", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0410", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0420", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0430", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0440", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0450", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0460", + + "testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0060", + + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0090", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0100", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0130", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0170", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0120", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0110", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0140", + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0160", + + "testability/pages/UIComponentRowColumnColumnSplitInteraction/UIComponentRowColumnColumnSplitInteraction0010", + + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0430", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0440", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0450", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0490", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0500", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0510", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0520", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0540", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0550", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0560", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0580", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0590", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0600", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0610", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0620", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0330", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0340", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0320", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0310", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0350", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0360", + "testability/pages/UIComponentPositionOffset/UIComponentPositionOffset0450", + + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1120", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1110", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1070", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1030", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1050", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1010", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1000", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0980", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0970", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0960", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0950", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0940", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0930", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0920", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0900", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0880", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0860", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0830", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0820", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0770", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0760", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0730", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0700", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0690", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0670", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0800", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0720", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0750", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1060", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1040", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0870", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0890", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0790", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1020", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0710", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0810", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1090", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0680", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1080", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0850", + + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1320", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1170", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1570", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface0350", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0080", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0090", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0370", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0380", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0390", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0410", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0460", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0470", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0480", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0010", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0030", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0020", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0040", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0200", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0250", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0260", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0190", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0290", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0240", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0270", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0220", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0230", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0280", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0210", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0180", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0120", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0170", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0150", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0140", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0160", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0130", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0110", + + "testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0160", + "testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0080", + "testability/pages/UIAttributesPositionSizeFeature/UIAttributesPositionSizeFeature0020", + + "testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070", + + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0090", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0370", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0380", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0390", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0400", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0410", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0420", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0430", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0440", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0450", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0460", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0470", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0480", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0490", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0500", + "testability/pages/UIAttributesPositionSizePosition/UIAttributesPositionSizePosition0510", + + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0010", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0020", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0030", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0040", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0050", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0290", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0300", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0310", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0320", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0330", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0340", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0350", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0360", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0370", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0380", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0390", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0400", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0410", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0420", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0430", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0440", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0450", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0460", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0470", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0480", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0490", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0500", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0520", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0540", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0550", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0560", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0580", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0590", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0600", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0610", + "testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0620", + + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0070", + + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0610", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0560", + "testability/pages/UIComponentCanvasReset/UIComponentCanvasReset0600", + + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0470", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0480", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0490", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0500", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0510", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0520", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0530", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0540", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0550", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0560", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0570", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0580", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0590", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0600", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0610", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0620", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0630", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0640", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0650", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0660", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0670", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0680", + "testability/pages/UIComponentLayoutFlexDirection/UIComponentLayoutFlexDirection0690", + + "testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0010", + "testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0020", + + "testability/pages/UIComponentOtherRowsplitandcolumnsplitAnimation/UIComponentOtherRowsplitandcolumnsplitAnimation0150", + + "testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0010", + "testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0020", + "testability/pages/UIComponentRowcolumnColumnsplitInterface/UIComponentRowcolumnColumnsplitInterface0030", + + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0290", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0300", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0310", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0320", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0330", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0340", + "testability/pages/UIComponentUIsupportColor1/UIComponentUIsupportColor0350", + + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0060", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0310", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0330", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0400", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0420", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1150", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0380", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0570", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0630", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0670", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1020", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1560", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1600", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3070", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3270", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3350", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3450", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3510", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0980", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0620", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1030", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1370", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2820", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1980", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1260", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0170", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2650", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2660", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1840", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0160", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2600", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3700", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0630", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0570", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0300", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0320", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0340", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0350", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0360", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0660", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0650", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0640", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1130", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1140", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1160", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1910", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface1860", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3780", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3220", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3130", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3090", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2390", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2920", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1340", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1300", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0960", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0420", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0190", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1290", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2680", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1940", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0090", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3150", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3580", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0370", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0340", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0390", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2850", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2840", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1970", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0350", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1550", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1900", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2040", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2230", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2450", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2830", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3120", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3290", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3430", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3490", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3540", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1130", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0510", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1500", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2510", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2440", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3440", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3520", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3660", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3180", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0140", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1590", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2970", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1870", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3740", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2140", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1470", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2220", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2050", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2010", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2860", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2740", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3300", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3230", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1570", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2630", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0310", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1700", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1860", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3730", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1050", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3210", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0230", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2810", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2960", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2930", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2640", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0250", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3000", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1710", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0180", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0970", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0560", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1080", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1920", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3390", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1310", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2900", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3030", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3550", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0110", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0470", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2770", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0330", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1170", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3480", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0070", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2420", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1520", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0130", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3320", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1720", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1780", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1960", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0610", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2250", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1110", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2320", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3720", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1760", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0400", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2270", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute1100", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0780", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0840", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0740", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0990", + "testability/pages/UIComponentCanvasAttribute/UIComponentCanvasAttribute0910", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2550", + "testability/pages/UIComponentCanvasInterface/UIComponentCanvasInterface2560", + + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0030", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0050", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0070", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0090", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0130", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0140", + "testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0150", + + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier3770", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier1390", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier0580", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2940", + "testability/pages/UIComponentCanvasModifier/UIComponentCanvasModifier2100", + + "testability/pages/UIComponentCanvasCanvasRender/UIComponentCanvasCanvasRender0050", + + "testability/pages/UIComponentLayoutFlexLayout/UIComponentLayoutFlexLayout0030" ] } -- Gitee From 682a9f0c432a687aa8440dd852b0dda0676a7e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Mon, 30 Dec 2024 11:32:03 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix=20=E9=97=A8=E7=A6=81BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../plugin_component.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js index 2e34709af..49a2297ec 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js @@ -13,13 +13,13 @@ * limitations under the License. */ //plugin_component.js -import pluginComponentManager from '@ohos.pluginComponent' +import pluginComponentManager from '@ohos.pluginComponent'; function onPushListener(source, template, data, extraData) { - console.log("onPushListener template.source=" + template.source) - console.log("onPushListener template.ability=" + template.ability) - console.log("onPushListener data=" + JSON.stringify(data)) - console.log("onPushListener extraData=" + JSON.stringify(extraData)) + console.log("onPushListener template.source=" + template.source); + console.log("onPushListener template.ability=" + template.ability); + console.log("onPushListener data=" + JSON.stringify(data)); + console.log("onPushListener extraData=" + JSON.stringify(extraData)); } function onRequestListener(source, name, data) @@ -32,8 +32,8 @@ function onRequestListener(source, name, data) export default { //register listener onListener() { - pluginComponentManager.on("push", onPushListener) - pluginComponentManager.on("request", onRequestListener) + pluginComponentManager.on("push", onPushListener); + pluginComponentManager.on("request", onRequestListener); }, Push() { // ṩ¼ @@ -81,10 +81,10 @@ export default { jsonPath: "", }, (err, data) => { - console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) - console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) - console.log("request_callback: data=" + JSON.stringify(data.data)) - console.log("request_callback: extraData=" + JSON.stringify(data.extraData)) + console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability); + console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source); + console.log("request_callback: data=" + JSON.stringify(data.data)); + console.log("request_callback: extraData=" + JSON.stringify(data.extraData)); } ) } -- Gitee From ccfdd77fb4a69fc5281fa3767614fed04da05b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Mon, 30 Dec 2024 11:32:03 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix=20=E9=97=A8=E7=A6=81BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../plugin_component.js | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js index 2e34709af..bb97c4ac7 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/testability/pages/UIComponentSpecialComponentsPluginComponentInterface/plugin_component.js @@ -13,78 +13,78 @@ * limitations under the License. */ //plugin_component.js -import pluginComponentManager from '@ohos.pluginComponent' +import pluginComponentManager from '@ohos.pluginComponent'; function onPushListener(source, template, data, extraData) { - console.log("onPushListener template.source=" + template.source) - console.log("onPushListener template.ability=" + template.ability) - console.log("onPushListener data=" + JSON.stringify(data)) - console.log("onPushListener extraData=" + JSON.stringify(extraData)) + console.log('onPushListener template.source=' + template.source); + console.log('onPushListener template.ability=' + template.ability); + console.log('onPushListener data=' + JSON.stringify(data)); + console.log('onPushListener extraData=' + JSON.stringify(extraData)); } function onRequestListener(source, name, data) { - console.log("onRequestListener name=" + name); - console.log("onRequestListener data=" + JSON.stringify(data)); - return {template:"plugintemplate", data:data}; + console.log('onRequestListener name=' + name); + console.log('onRequestListener data=' + JSON.stringify(data)); + return {template:'plugintemplate', data:data}; } export default { //register listener onListener() { - pluginComponentManager.on("push", onPushListener) - pluginComponentManager.on("request", onRequestListener) + pluginComponentManager.on('push', onPushListener); + pluginComponentManager.on('request', onRequestListener); }, Push() { - // ṩ¼ + // ����ṩ�����������¼? pluginComponentManager.push( { owner: { - bundleName: "com.example.myapplication", - abilityName: "com.example.myapplication.MainAbility", + bundleName: 'com.example.myapplication', + abilityName: 'com.example.myapplication.MainAbility', }, target: { - bundleName: "com.example.plugin", - abilityName: "com.example.myapplication.PluginProviderExample", + bundleName: 'com.example.plugin', + abilityName: 'com.example.myapplication.PluginProviderExample', }, - name: "PluginProviderExample", + name: 'PluginProviderExample', data: { - "key_1": "plugin component test", - "key_2": 34234 + 'key_1': 'plugin component test', + 'key_2': 34234 }, extraData: { - "extra_str": "this is push event" + 'extra_str': 'this is push event' }, - jsonPath: "", + jsonPath: '', }, (err, data) => { - console.log("push_callback: push ok!"); + console.log('push_callback: push ok!'); } ) }, Request() { - // ʹ÷¼ + // ���ʹ�÷����������¼? pluginComponentManager.request({ owner: { - bundleName: "com.example.myapplication", - abilityName: "com.example.myapplication.MainAbility", + bundleName: 'com.example.myapplication', + abilityName: 'com.example.myapplication.MainAbility', }, target: { - bundleName: "com.example.plugin", - abilityName: "com.example.myapplication.PluginProviderExample", + bundleName: 'com.example.plugin', + abilityName: 'com.example.myapplication.PluginProviderExample', }, - name: "PluginProviderExample", + name: 'PluginProviderExample', data: { - "key_1": "plugin component test", - "key_2": 34234 + 'key_1': 'plugin component test', + 'key_2': 34234 }, - jsonPath: "", + jsonPath: '', }, (err, data) => { - console.log("request_callback: componentTemplate.ability=" + data.componentTemplate.ability) - console.log("request_callback: componentTemplate.source=" + data.componentTemplate.source) - console.log("request_callback: data=" + JSON.stringify(data.data)) - console.log("request_callback: extraData=" + JSON.stringify(data.extraData)) + console.log('request_callback: componentTemplate.ability=' + data.componentTemplate.ability); + console.log('request_callback: componentTemplate.source=' + data.componentTemplate.source); + console.log('request_callback: data=' + JSON.stringify(data.data)); + console.log('request_callback: extraData=' + JSON.stringify(data.extraData)); } ) } -- Gitee From 94e6019479b682f705f48e6f1b80a30fa77c69fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Wed, 8 Jan 2025 14:04:00 +0800 Subject: [PATCH 4/5] add beforeEach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../UIAttributesPositionSizeFeature.test.ets | 19 ++++++ ...ibutesPositionSizeLayoutPropertie.test.ets | 59 +++++++++++++++---- .../UIAttributesPositionSizePosition.test.ets | 19 ++++++ ...atestylesInterfaceNestedScrolling.test.ets | 19 ++++++ ...sStatestylesInterfaceSupportstage.test.ets | 19 ++++++ .../UIComponentCanvasAttribute.test.ets | 19 ++++++ .../UIComponentCanvasCanvasRender.test.ets | 18 ++++++ .../UIComponentCanvasInterface.test.ets | 19 ++++++ .../UIComponentCanvasModifier.test.ets | 19 ++++++ .../UIComponentCanvasReset.test.ets | 19 ++++++ .../UIComponentColumnMirrorImage.test.ets | 19 ++++++ .../UIComponentFlexSpace.test.ets | 19 ++++++ .../UIComponentLayoutFlexDirection.test.ets | 19 ++++++ .../UIComponentLayoutFlexLayout.test.ets | 20 +++++++ ...erRowsplitandcolumnsplitAnimation.test.ets | 19 ++++++ .../UIComponentPositionOffset.test.ets | 19 ++++++ ...ntRowColumnColumnSplitInteraction.test.ets | 20 +++++++ ...nentRowcolumnColumnsplitInterface.test.ets | 19 ++++++ ...mponentRowcolumnColumnsplitLayout.test.ets | 20 +++++++ ...omponentsPluginComponentInterface.test.ets | 19 ++++++ ...sXcomponentSurfaceBackgroundcolor.test.ets | 19 ++++++ ...ponentsXcomponentSurfaceInterface.test.ets | 19 ++++++ .../UIComponentUIsupportColor1.test.ets | 19 ++++++ 23 files changed, 467 insertions(+), 12 deletions(-) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets index 8970c6597..016ddfd95 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIAttributesPositionSizeFeature() { describe('UIAttributesPositionSizeFeature', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets index cf7225b30..1bd1fdadb 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets @@ -19,9 +19,44 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIAttributesPositionSizeFeature() { describe("UIAttributesPositionSizeLayoutPropertie", () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + + 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_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 * @tc.name SUB_ACE_ULATTRIBUTES_POSITION_SIZE_FEATURE_0160 @@ -30,15 +65,15 @@ export default function UIAttributesPositionSizeFeature() { it("SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070", 0, async (done: Function) => { Logger.error('TEST', `SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070 START`); Settings.createWindow('testability/pages/UIAttributesPositionSizeLayoutPropertie/UIAttributesPositionSizeLayoutPropertie0070'); -/*await Utils.sleep(1000); -let driver: Driver = Driver.create(); -let size = await driver.getDisplaySize(); -driver.swipe(size.x / 2, size.y / 2, 0, 0);*/ -await Utils.sleep(3000); -windowSnap.snapShot(); -await Utils.sleep(3000); -Logger.error('TEST', `SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070 finish.`); -done(); -}) -}) -} \ No newline at end of file + /*await Utils.sleep(1000); + let driver: Driver = Driver.create(); + let size = await driver.getDisplaySize(); + driver.swipe(size.x / 2, size.y / 2, 0, 0);*/ + await Utils.sleep(3000); + windowSnap.snapShot(); + await Utils.sleep(3000); + Logger.error('TEST', `SUB_ACE_UIATTRIBUTES_POSITION_SIZE_LAYOUTPROPERTIES_0070 finish.`); + done(); + }) + }) +} diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets index 199adb8e4..c76aea9ea 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIAttributesPositionSizePosition() { describe('UIAttributesPositionSizePosition', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets index d9c51cdf6..cc5e91947 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIAttributesStatestylesInterfaceNestedScrolling() { describe('UIAttributesStatestylesInterfaceNestedScrolling', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets index fd21aa926..d9566c7fa 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIAttributesStatestylesInterfaceSupportstage() { describe('UIAttributesStatestylesInterfaceSupportstage', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets index bc0fa35e8..96333ac70 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentCanvasAttribute() { describe('UIComponentCanvasAttribute', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets index dd0ea8ff5..b8c69fa43 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets @@ -18,10 +18,28 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentCanvasCanvasRender() { describe('UIComponentCanvasCanvasRender', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets index ede7337d5..047c4744e 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentCanvasInterface() { describe('UIComponentCanvasInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets index 8eb6c0ca8..abb5b34ef 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON, MouseButton, On } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentCanvasModifier() { describe('UIComponentCanvasModifier', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets index 405d608d4..e22f3919c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentCanvasReset() { describe('UIComponentCanvasReset', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets index 14950a50f..c4bfbed63 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentColumnMirrorImage() { describe('UIComponentColumnMirrorImage', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets index 1699ef671..4f0f32c6f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentFlexSpace() { describe('UIComponentFlexSpace', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets index 53cf4434a..f39871a3d 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentLayoutFlexDirection() { describe('UIComponentLayoutFlexDirection', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets index 065dc2014..65c1bfc39 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets @@ -17,10 +17,30 @@ import Settings from '../model/Settings' import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentLayoutFlexLayout() { describe('UIComponentLayoutFlexLayout', () => { + + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return; diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets index 500248d7d..4c97bf430 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot'; import Logger from '../model/Logger'; import Utils from '../model/Utils'; import { Component, Driver, ON } from '@ohos.UiTest'; +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentOtherRowsplitandcolumnsplitAnimation() { describe('UIComponentOtherRowsplitandcolumnsplitAnimation', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return; diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets index 8f816655a..c269df987 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentPositionOffset() { describe('UIComponentPositionOffset', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); // 设置系统当前Locale为 "zh-CN" + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); // 获取应用偏好语言 + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets index a804642e2..821b95257 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets @@ -18,10 +18,30 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentRowColumnColumnSplitInteraction() { describe('UIComponentRowColumnColumnSplitInteraction', () => { + + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets index 38fca95af..7d0b3c6bc 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot'; import Logger from '../model/Logger'; import Utils from '../model/Utils'; import { Component, Driver, ON } from '@ohos.UiTest'; +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentRowcolumnColumnsplitInterface() { describe('UIComponentRowcolumnColumnsplitInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return; diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets index 06b170b87..a15b25e90 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets @@ -18,10 +18,30 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver, ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentRowcolumnColumnsplitLayout() { describe('UIComponentRowcolumnColumnsplitLayout', () => { + + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return; diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets index e5fb55260..83918eef8 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentSpecialComponentsPluginComponentInterface() { describe('UIComponentSpecialComponentsPluginComponentInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets index 974b9ba27..8d2b4bd21 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor() { describe('UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets index 33d74ef53..2b5165b9c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentSpecialComponentsXcomponentSurfaceInterface() { describe('UIComponentSpecialComponentsXcomponentSurfaceInterface', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets index 802d5305e..3d8707664 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets @@ -18,10 +18,29 @@ import windowSnap from '../model/snapShot' import Logger from '../model/Logger' import Utils from '../model/Utils' import { Component, Driver ,ON } from '@ohos.UiTest' +import { uiAppearance } from '@kit.ArkUI' +import { i18n } from '@kit.LocalizationKit' export default function UIComponentUIsupportColor1() { describe('UIComponentUIsupportColor1', () => { + beforeEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting before Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting before Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting before dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + done(); + }) + afterEach(async (done: Function) => { if (Settings.windowClass == undefined) { return -- Gitee From c09c042f173f43038a3ff6ce8ab64a20f3ce71e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=9D=E8=BF=AA?= Date: Sat, 11 Jan 2025 10:48:59 +0800 Subject: [PATCH 5/5] run all afterEach divider UI again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈宝迪 --- .../UIAttributesPositionSizeFeature.test.ets | 17 +++++++++-- ...ibutesPositionSizeLayoutPropertie.test.ets | 22 +++++++++++--- .../UIAttributesPositionSizePosition.test.ets | 20 +++++++++++-- ...atestylesInterfaceNestedScrolling.test.ets | 29 ++++++++++++++----- ...sStatestylesInterfaceSupportstage.test.ets | 19 ++++++++++-- .../UIComponentCanvasAttribute.test.ets | 20 ++++++++++--- .../UIComponentCanvasCanvasRender.test.ets | 19 ++++++++++-- .../UIComponentCanvasInterface.test.ets | 19 ++++++++++-- .../UIComponentCanvasModifier.test.ets | 20 +++++++++++-- .../UIComponentCanvasReset.test.ets | 19 ++++++++++-- .../UIComponentColumnMirrorImage.test.ets | 19 ++++++++++-- .../UIComponentFlexSpace.test.ets | 19 ++++++++++-- .../UIComponentLayoutFlexDirection.test.ets | 19 ++++++++++-- .../UIComponentLayoutFlexLayout.test.ets | 24 +++++++++++---- ...erRowsplitandcolumnsplitAnimation.test.ets | 24 +++++++++++---- .../UIComponentPositionOffset.test.ets | 19 ++++++++++-- ...ntRowColumnColumnSplitInteraction.test.ets | 19 ++++++++++-- ...nentRowcolumnColumnsplitInterface.test.ets | 24 +++++++++++---- ...mponentRowcolumnColumnsplitLayout.test.ets | 28 +++++++++++++----- ...omponentsPluginComponentInterface.test.ets | 19 ++++++++++-- ...sXcomponentSurfaceBackgroundcolor.test.ets | 20 ++++++++++--- ...ponentsXcomponentSurfaceInterface.test.ets | 19 ++++++++++-- .../UIComponentUIsupportColor1.test.ets | 19 ++++++++++-- 23 files changed, 390 insertions(+), 86 deletions(-) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets index 016ddfd95..666ed4f2a 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeFeatureTest/UIAttributesPositionSizeFeature.test.ets @@ -40,12 +40,25 @@ export default function UIAttributesPositionSizeFeature() { console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); done(); }) - + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); + } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { return } - Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets index 1bd1fdadb..c916b6ff7 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizeLayoutPropertieTest/UIAttributesPositionSizeLayoutPropertie.test.ets @@ -22,7 +22,7 @@ import { Component, Driver, ON } from '@ohos.UiTest' import { uiAppearance } from '@kit.ArkUI' import { i18n } from '@kit.LocalizationKit' -export default function UIAttributesPositionSizeFeature() { +export default function UIAttributesPositionSizeLayoutPropertie() { describe("UIAttributesPositionSizeLayoutPropertie", () => { beforeEach(async (done: Function) => { if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { @@ -41,10 +41,24 @@ export default function UIAttributesPositionSizeFeature() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets index c76aea9ea..d2e905050 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesPositionSizePositionTest/UIAttributesPositionSizePosition.test.ets @@ -41,10 +41,24 @@ export default function UIAttributesPositionSizePosition() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets index cc5e91947..d0b415606 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceNestedScrollingTest/UIAttributesStatestylesInterfaceNestedScrolling.test.ets @@ -41,11 +41,24 @@ export default function UIAttributesStatestylesInterfaceNestedScrolling() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) @@ -1347,7 +1360,7 @@ export default function UIAttributesStatestylesInterfaceNestedScrolling() { it('SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510', 0, async (done: Function) => { Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0510 start.`); Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0510"); - await Utils.sleep(1000); + /*await Utils.sleep(1000); let driver: Driver = Driver.create(); await Utils.sleep(500); let watrerFlowCenter: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0510')); @@ -1355,7 +1368,7 @@ export default function UIAttributesStatestylesInterfaceNestedScrolling() { await Utils.sleep(500); await driver.swipe(pos.x, pos.y + 250, pos.x, pos.y - 250); await Utils.sleep(2000); - await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250); + await driver.swipe(pos.x, pos.y - 250, pos.x, pos.y + 250);*/ await Utils.sleep(2000); windowSnap.snapShot(); await Utils.sleep(3000); @@ -1449,9 +1462,9 @@ export default function UIAttributesStatestylesInterfaceNestedScrolling() { Logger.error('TEST', `SUB_ACE_ULATTRIBUTES_STATESTYLES_INTERFACE_NESTED_SCROLLING_0570 start.`); Settings.createWindow("testability/pages/UIAttributesStatestylesInterfaceNestedScrolling/UIAttributesStatestylesInterfaceNestedScrolling0570"); await Utils.sleep(1000); - let driver: Driver = Driver.create(); - await Utils.sleep(500); - let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0570_001')); + //let driver: Driver = Driver.create(); + //await Utils.sleep(500); + //let button: Component = await driver.findComponent(ON.id('UIAttributesStatestylesInterfaceNestedScrolling0570_001')); //await button.click(); windowSnap.snapShot(); await Utils.sleep(3000); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets index d9566c7fa..1bc1bdfef 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIAttributesStatestylesInterfaceSupportstageTest/UIAttributesStatestylesInterfaceSupportstage.test.ets @@ -41,11 +41,24 @@ export default function UIAttributesStatestylesInterfaceSupportstage() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets index 96333ac70..87e86805b 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasAttributeTest/UIComponentCanvasAttribute.test.ets @@ -41,11 +41,23 @@ export default function UIComponentCanvasAttribute() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } - + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets index b8c69fa43..aae58df41 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasCanvasRenderTest/UIComponentCanvasCanvasRender.test.ets @@ -40,11 +40,24 @@ export default function UIComponentCanvasCanvasRender() { console.log(`Switch before CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets index 047c4744e..e075a1e47 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasInterfaceTest/UIComponentCanvasInterface.test.ets @@ -41,11 +41,24 @@ export default function UIComponentCanvasInterface() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets index abb5b34ef..87cfbf4ca 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasModifierTest/UIComponentCanvasModifier.test.ets @@ -41,10 +41,24 @@ export default function UIComponentCanvasModifier() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets index e22f3919c..71c230ce6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentCanvasResetTest/UIComponentCanvasReset.test.ets @@ -41,11 +41,24 @@ export default function UIComponentCanvasReset() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets index c4bfbed63..d159dfcb9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentColumnMirrorImageTest/UIComponentColumnMirrorImage.test.ets @@ -41,11 +41,24 @@ export default function UIComponentColumnMirrorImage() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets index 4f0f32c6f..f53e8eee4 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentFlexSpaceTest/UIComponentFlexSpace.test.ets @@ -41,11 +41,24 @@ export default function UIComponentFlexSpace() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets index f39871a3d..f078714c9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexDirectionTest/UIComponentLayoutFlexDirection.test.ets @@ -41,11 +41,24 @@ export default function UIComponentLayoutFlexDirection() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets index 65c1bfc39..1895d7821 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentLayoutFlexLayoutTest/UIComponentLayoutFlexLayout.test.ets @@ -41,19 +41,33 @@ export default function UIComponentLayoutFlexLayout() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return; + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { - Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + 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(); + done() }) /* * @tc.number SUB_ACE_UI_COMPONENT_LAYOUT_FLEX_LAYOUT_0010 diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets index 4c97bf430..7a02bd4d9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentOtherRowsplitandcolumnsplitAnimationTest/UIComponentOtherRowsplitandcolumnsplitAnimation.test.ets @@ -41,19 +41,33 @@ export default function UIComponentOtherRowsplitandcolumnsplitAnimation() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return; + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { - Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + 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(); + done() }) it('SUB_ACE_UI_COMPONENT_OTHER_ROWSPLITANDCOLUMNSPLIT_ANIMATION_0090', 0, async (done: Function) => { diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets index c269df987..257d51f43 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentPositionOffsetTest/UIComponentPositionOffset.test.ets @@ -41,11 +41,24 @@ export default function UIComponentPositionOffset() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets index 821b95257..c4b62409c 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowColumnColumnSplitInteractionTest/UIComponentRowColumnColumnSplitInteraction.test.ets @@ -42,11 +42,24 @@ export default function UIComponentRowColumnColumnSplitInteraction() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets index 7d0b3c6bc..ddfdd37e9 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitInterfaceTest/UIComponentRowcolumnColumnsplitInterface.test.ets @@ -41,19 +41,33 @@ export default function UIComponentRowcolumnColumnsplitInterface() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return; + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { - Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + 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(); + done() }) /* * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_INTERFACE_0010 diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets index a15b25e90..7e4832b72 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentRowcolumnColumnsplitLayoutTest/UIComponentRowcolumnColumnsplitLayout.test.ets @@ -42,19 +42,33 @@ export default function UIComponentRowcolumnColumnsplitLayout() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return; + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { - Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`); + 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(); + done() }) /* * @tc.number SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0030 @@ -145,11 +159,11 @@ export default function UIComponentRowcolumnColumnsplitLayout() { Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 start.`); Settings.createWindow("testability/pages/UIComponentRowcolumnColumnsplitLayout/UIComponentRowcolumnColumnsplitLayout0110"); await Utils.sleep(1000); - let driver = Driver.create(); + /*let driver = Driver.create(); let text: Component = await driver.findComponent(ON.id('UIComponentRowcolumnColumnsplitLayout0110_001')); let center = await text.getBoundsCenter(); await driver.swipe(center.x, center.y - 50, center.x, center.y - 100) - await Utils.sleep(1000); + await Utils.sleep(1000);*/ windowSnap.snapShot(); await Utils.sleep(3000); Logger.error('TEST', `SUB_ACE_UI_COMPONENT_ROWCOLUMN_COLUMNSPLIT_LAYOUT_0110 finish.`); diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets index 83918eef8..f4df0abd6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsPluginComponentInterfaceTest/UIComponentSpecialComponentsPluginComponentInterface.test.ets @@ -41,11 +41,24 @@ export default function UIComponentSpecialComponentsPluginComponentInterface() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets index 8d2b4bd21..2471f7ac6 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolorTest/UIComponentSpecialComponentsXcomponentSurfaceBackgroundcolor.test.ets @@ -41,11 +41,24 @@ export default function UIComponentSpecialComponentsXcomponentSurfaceBackgroundc done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) @@ -56,7 +69,6 @@ export default function UIComponentSpecialComponentsXcomponentSurfaceBackgroundc await Utils.sleep(1000); done() }) - /* * @tc.number SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 * @tc.name SUB_ACE_UI_COMPONENT_SPECIALCOMPONENTS_XCOMPONENT_SURFACE_BACKGROUNDCOLOR_0010 diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets index 2b5165b9c..5e008a14f 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentSpecialComponentsXcomponentSurfaceInterfaceTest/UIComponentSpecialComponentsXcomponentSurfaceInterface.test.ets @@ -41,11 +41,24 @@ export default function UIComponentSpecialComponentsXcomponentSurfaceInterface() done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) diff --git a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets index 3d8707664..5ec170b8b 100644 --- a/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets +++ b/function/ui_compare_rh/uicompare/entry/src/ohosTest/ets/test/UIComponentUIsupportColor1Test/UIComponentUIsupportColor1.test.ets @@ -41,11 +41,24 @@ export default function UIComponentUIsupportColor1() { done(); }) - afterEach(async (done: Function) => { - if (Settings.windowClass == undefined) { - return + afterEach(async (done: Function) => { + if (uiAppearance.getDarkMode() == uiAppearance.DarkMode.ALWAYS_DARK) { + await uiAppearance.setDarkMode(uiAppearance.DarkMode.ALWAYS_LIGHT).then(() => { + console.info('Setting after Set dark-mode successfully.'); + }).catch((error: Error) => { + console.error('Setting after Set dark-mode failed, ' + error.message); + }); + Utils.sleep(1000); + } else { + console.info('Setting after dark-mode is uiAppearance.DarkMode.ALWAYS_LIGHT'); } + i18n.System.setAppPreferredLanguage('zh-Hans-CN'); + let appPreferredLanguage2: string = i18n.System.getAppPreferredLanguage(); + console.log(`Switch after CusLocales,appPreferredLanguage2=${appPreferredLanguage2}`); + if (Settings.windowClass == undefined) { + return + } Settings.windowClass.destroyWindow((err) => { if (err.code) { Logger.error('TEST', `Failed to destroy the window. Cause : ${JSON.stringify(err)}`) -- Gitee