diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.ets index 75f9e0de79dab40782ec3d1752e8837960c70684..1db97b3a832f69c44511e693b3c42af19100a3c8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.ets @@ -49,8 +49,6 @@ struct AlignSpaceEvenly_AddAllSpace { } .key("SpaceEvenly_AddAllSpace_01_Box") .width("100%") - .height(200) - .backgroundColor(0xAFEEE) .alignItems(HorizontalAlign.Start) } } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.ets index 1f8724dca36e33c431dcc02db73b17dd57bfc360..cc3d2b26e6d067272eeac8483ab317aff933d4c7 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.ets @@ -67,29 +67,6 @@ struct AlignSpaceEvenly_AddLayoutWeight { .width(500) .height(200) .backgroundColor(0xAFEEEE) - Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1') - .width(150) - .height(50) - .backgroundColor(0xF5DEB3) - .key("SpaceEvenly_AddLayoutWeight_021") - .layoutWeight(this.OneLayoutWeight1) - Text('2') - .width(150) - .height(100) - .backgroundColor(0xD2B48C) - .key("SpaceEvenly_AddLayoutWeight_022") - .layoutWeight(this.OneLayoutWeight2) - Text('3') - .width(150) - .height(150) - .backgroundColor(0xF5DEB3) - .key("SpaceEvenly_AddLayoutWeight_023") - } - .key("SpaceEvenly_AddLayoutWeight_02") - .width(500) - .height(200) - .backgroundColor(0xAFEEEE) } } } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.ets index 93ff8cb98acedadf029fc66677bfa924443da63d..21d5f5e1ea4c9fc8c6a59ffbd5e0bb87994c2fa1 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.ets @@ -48,8 +48,6 @@ struct AlignSpaceEvenly_AddMargin { } .key("SpaceEvenly_AddMargin_01_Box") .width("100%") - .height(200) - .backgroundColor(0xAFEEE) .alignItems(HorizontalAlign.Start) } } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets index 9480cecd75d4e5b9993b59819568ecb7b535f1b4..a3db54ab623eb79a3ec4d5a76e0d425140bd76c4 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddLayoutWeight.test.ets @@ -90,16 +90,17 @@ export default function AlignSpaceEvenly_AddLayoutWeight() { console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300] START'); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}); + globalThis.value.message.notify({name:'OneLayoutWeight3', value:0}); await CommonFunc.sleep(3000); - let strJson = getInspectorByKey('SpaceEvenly_AddLayoutWeight_02'); + let strJson = getInspectorByKey('SpaceEvenly_AddLayoutWeight_01'); let obj = JSON.parse(strJson); expect(obj.$type).assertEqual('Flex'); expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.SpaceEvenly'); - let SpaceEvenly_AddLayoutWeight_011 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_021'); - let SpaceEvenly_AddLayoutWeight_012 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_022'); - let SpaceEvenly_AddLayoutWeight_013 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_023'); - let SpaceEvenly_AddLayoutWeight_01 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_02'); + let SpaceEvenly_AddLayoutWeight_011 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_011'); + let SpaceEvenly_AddLayoutWeight_012 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_012'); + let SpaceEvenly_AddLayoutWeight_013 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_013'); + let SpaceEvenly_AddLayoutWeight_01 = CommonFunc.getComponentRect('SpaceEvenly_AddLayoutWeight_01'); expect(SpaceEvenly_AddLayoutWeight_011.top).assertEqual(SpaceEvenly_AddLayoutWeight_012.top); expect(SpaceEvenly_AddLayoutWeight_013.top).assertEqual(SpaceEvenly_AddLayoutWeight_012.top); expect(SpaceEvenly_AddLayoutWeight_011.top).assertEqual(SpaceEvenly_AddLayoutWeight_01.top); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets index b4756fb22689f2f005785bb5ba79a2dfe04ababd..8ce9b9843531028d2d56e1d20adb7d5dd4fdbf5b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.test.ets @@ -101,7 +101,7 @@ export default function AlignSpaceEvenly_AddOneMargin() { let SpaceEvenly_AddOneMargin_013 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_013'); let SpaceEvenly_AddOneMargin_01 = CommonFunc.getComponentRect('SpaceEvenly_AddOneMargin_01'); expect(SpaceEvenly_AddOneMargin_011.top - SpaceEvenly_AddOneMargin_01.top).assertEqual(vp2px(30)); - expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(30)); + expect(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left).assertEqual(vp2px(500/17)); expect(SpaceEvenly_AddOneMargin_012.left - SpaceEvenly_AddOneMargin_011.right) .assertEqual(SpaceEvenly_AddOneMargin_011.left - SpaceEvenly_AddOneMargin_01.left); expect(SpaceEvenly_AddOneMargin_013.right).assertEqual(SpaceEvenly_AddOneMargin_01.right); @@ -111,9 +111,9 @@ export default function AlignSpaceEvenly_AddOneMargin() { expect(SpaceEvenly_AddOneMargin_011.bottom - SpaceEvenly_AddOneMargin_011.top).assertEqual(vp2px(50)); expect(SpaceEvenly_AddOneMargin_012.bottom - SpaceEvenly_AddOneMargin_012.top).assertEqual(vp2px(100)); expect(SpaceEvenly_AddOneMargin_013.bottom - SpaceEvenly_AddOneMargin_013.top).assertEqual(vp2px(150)); - expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(440/3)); - expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(440/3)); - expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(440/3)); + expect(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left).assertEqual(vp2px(2500/17)); + expect(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left).assertEqual(vp2px(2500/17)); + expect(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left).assertEqual(vp2px(2500/17)); console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600] END'); done(); })